当前位置:网站首页>深度学习的趣味app简单优化(适合新手)
深度学习的趣味app简单优化(适合新手)
2022-07-29 05:19:00 【量化NPC】
本文是“如何零代码制作深度学习的趣味app”的进阶版本
上篇的链接如下:
如何零代码制作深度学习的趣味app
根据上篇文章可以零代码快速实现一个猫咪分类器。
那么问题来了,我们该如何优化这个app呢?
文章目录
前言
本文将带着大家一起进行一些app的优化,让app变得更加美观好看,同时教大家如何上架华为应用市场,并报名参加一些激励活动
我们重新写了一个美化版的猫咪分类器UniversalClassifier
下载链接如下:
在此教大家如何将之前训练好的模型迁移到自己新的app中。
一、准备工作(需要提前下载UnverisalClassifier)
sync工程
打开universialClassifier
然后出现以下页面,如已经出现可跳过
二、美化app
1.添加模型文件
更换模型文件
打开自己之前利用hms toolkit插件零代码训练好的自定义工程(mindsporeDemo),在app/src/main/assets下找到模型文件.ms,和标签文件。
复制这两个文件如本工程下的相同路径app/src/main/assets。
再次说明:
mindsporeDemo是上篇文章中生成的demo。与本文的universalClassifier为两个工程。
在这里是把mindsporeDemo训练的模型文件复制出来迁移到新的app中。
在app\src\main\java\com.huawei.mlkit.sample\activitys\CustomActivity中如果是mindspore生成的模型文件只需修改下图红框中名称
2.更换主界面背景
在项目app\src\main\res\drawable 中放入待换图片,若出现以下界面点击split
打开项目app\src\main\res\layout\activity_main
在顶部
<androidx.constraintlayout.widget.ConstraintLayout>
标签中更改android:background="#000"为 android:background="@drawable/待换图片名"
*注意:#000为黑色背景,
*注意android:background="@drawable/待换图片"一定要写在">“里面
*注意android:background=”@drawable/待换图片"在最后一个“/”后添加刚刚在drawable中的图片名,名字用英文不带空格,不加后缀,例如:在drawable中有一张名为abc_vector_test的png图片,那么设置android:background="@drawable/abc_vector_test"
*注意只能有一个android:background(背景只能有一个)
3.更换按钮背景
方式一:
参考app\src\main\res\layout\activity_main文件
调用步骤为需要更换背景的button按钮使用android:background="@drawable/文件名" button图片存放地址为
app\src\main\res\drawable (不要有中文字符)
修改android:background="@drawable/circle_stroke_background" 中的circle_stroke_background图片名称可替换button背景。
方式二:
打开
其中内容为
也可在app中添加自己的安卓控件。并仿照上图进行修改,控件使用也可参考csdn:
https://blog.csdn.net/qq_21993785/article/details/95069485
所有按钮和文字位置摆放可拖拽
4. 更换主界面文字
app\src\main\res\layout\activity_main 中找到标签 找到里面android:text=“MLKIT”,MLKIT即为设置的更换字体,自己更换
android:textColor 设置字体颜色(为”#”+十六进制颜色代码)
android:textSize 设置字体大小(正整数)
android:testStyle设置字体
位置摆放自己百度
三、生成数字签名及打包可发布的apk步骤流程
1.生成jks及相关配置
2. 开始打包apk
注意:如果左侧的build varitants按钮不存在
点击此按钮(不用管弹出的弹框)
最后生成的可发布的apk位置
最后生成的可发布的apk位置
四、上架华为应用市场
1.登录华为开发者官网
https://developer.huawei.com/consumer/cn/
点击管理中心,如果没有管理中心,请先进行用户登录,如没有注册开发者,请参考群
公告。
2.点击 AppGallery connect
3.点击我的应用
4.点击我的应用
5.点击新建
6.按照自己的需求填写应用简介
7.(重要!!)建议选择中国香港作为发布地区,如果勾选中国大陆,会需要电子版权审核。
8.上传已经准备好的 release 版本 apk
9.隐私声明为必填项
需要在公网上发布自己app中使用到的权限和数据处理的相关操作。
比如:
http://www.miquyouxi.com/privacy-policy.html
http://106.75.22.43/x2/ljl.html
https://www.labolado.com/apps-privacy-policy.html
10.提交上架申请
五、相关活动
华为推出了一系列针对开发者上架并出海的一些激励政策,在此做一个总结:
开发完以上的app即可参加下面的所有活动。
1. 校园激励活动(针对学生)
https://developer.huawei.com/consumer/cn/activity/101594178508936552
2.耀星计划(面向社会)
https://developer.huawei.com/consumer/cn/activity/detail/101596179826759080
3. AI创新应用集成有礼活动(面向社会)
https://developer.huawei.com/consumer/cn/activity/301605774533111234
4. 华为HMS Core游戏出海有奖招募(不一定适用)
https://developer.huawei.com/consumer/cn/activity/301605774533111234
必须为游戏类app
总结
如果有任何问题请联系微信号:HMSMachineLearning
边栏推荐
- [C language series] - three methods to simulate the implementation of strlen library functions
- Wechat applet change attribute value -setdata- bidirectional binding -model
- Merge the same items in the same column in table
- [sword finger offer] - explain the library function ATOI and simulate the realization of ATOI function
- Selection options of uniapp components (such as package selection)
- 学习、研究编程之道
- Qframe class learning notes
- Qt设置背景图片方法
- Cmu15-213 shell lab experiment record
- Hcia-r & s self use notes (27) comprehensive experiment
猜你喜欢
Seay源代码审计系统
MySQL decompressed version windows installation
Detailed installation and use tutorial of MySQL (nanny installation with pictures and texts)
Wechat applet - screen height
Windows下cmd窗口连接mysql并操作表
我的理想工作,码农的绝对自由支配才是最重要的——未来创业的追求
Starfish OS:以现实为纽带,打造元宇宙新范式
[C language series] - three methods to simulate the implementation of strlen library functions
[C language series] - storage of deep anatomical data in memory (II) - floating point type
DAY15(DAY16拓展):文件包含漏洞
随机推荐
Record the SQL injection vulnerability of XX company
Selection options of uniapp components (such as package selection)
Basic concepts of MySQL + database system structure + extended application + basic command learning
Extreme deflation and perpetual motion machine model will promote the outbreak of platofarm
[typescript] in depth study of typescript functions
QPalette学习笔记
The openatom openharmony sub forum was successfully held, and ecological and industrial development entered a new journey
Okaleido Tiger 7.27日登录Binance NFT,首轮已获不俗成绩
Seay源代码审计系统
表格与表单相关知识点总结
麦当娜“Hellbent”购买130万美元的nft无聊猿,现在被认为太贵了
php写一个购买全网最低价的纸尿裤
Wechat applet - component parameter transmission, state management
QT layout management -- Part stretch principle and sizepolicy
改哭了,终于解决了Cannot read properties of undefined (reading ‘parseComponent‘)
相对定位和绝对定位
Merge the same items in the same column in table
DAY4:SQL Sever 简单使用
The difference between link and @import importing external styles
Solve the problem that the prompt information of form verification does not disappear and the assignment does not take effect