Simple optimization of fun app for deep learning (suitable for novices)

This article is an advanced version of "How to make an interesting app for deep learning with zero code"

The link to the previous article is as follows:
How to make an interesting app for deep learning with zero code
According to the previous article, a cat classifier can be quickly implemented with zero code.
insert image description here


So the question is, how can we optimize this app?


foreword

This article will take you to optimize some apps together to make the app more beautiful and beautiful. At the same time, it will teach you how to put it on the Huawei AppGallery and sign up for some incentive activities. We have rewritten a beautified version of the cat classifier UniversalClassifier. The download link is
as
follows :

Here I will teach you how to migrate the previously trained model to your new app.


1. Preparations (UnverisalClassifier needs to be downloaded in advance)

sync project

insert image description here

open universalClassifier

Then the following page appears, if it has already appeared, it can be skipped
insert image description here

2. Beautify the app


1. Add model files

Replacing the model file
Open the custom project (mindsporeDemo) that you trained with the hms toolkit plug-in zero code before, and find the model file .ms and the label file under app/src/main/assets.
Copy these two files as the same path app/src/main/assets under this project.

Explanation again:
mindsporeDemo is the demo generated in the previous article. With this article's universalClassifier works for both.
Here is to copy the model file trained by mindsporeDemo and migrate it to the new app.

In app\src\main\java\com.huawei.mlkit.sample\activitys\CustomActivity, if it is a model file generated by mindspore, just modify the name in the red box in the figure below
insert image description here


2. Change the background of the main interface

Put the picture to be replaced in the project app\src\main\res\drawable, if the following interface appears, click split
insert image description here
to open the project app\src\main\res\layout\activity_main
at the top

<androidx.constraintlayout.widget.ConstraintLayout>

In the label, change android:background="#000" to android:background="@drawable/image name to be changed"

*Note: #000 is a black background,
*Note that android:background="@drawable/picture to be changed" must be written in ">"
*Note android:background="@drawable/picture to be changed" must be in the last "/ "Add the name of the picture in the drawable just now. The name is in English without spaces and without suffixes. For example: if there is a png picture named abc_vector_test in the drawable, then set android:background="@drawable/abc_vector_test" *
Note There can only be one android:background (there can only be one background)


3. Change the button background

Method 1:
Refer to app\src\main\res\layout\activity_main file

The call step is to use android:background="@drawable/filename" for the button that needs to change the background. The storage address of the button image is
app\src\main\res\drawable (no Chinese characters)
insert image description here

Modify the circle_stroke_background image name in android:background="@drawable/circle_stroke_background" to replace the button background.

Method 2:
Open
insert image description here
the content of which is
insert image description here

You can also add your own Android controls to the app. And modify it according to the above picture, the control can also refer to csdn:

https://blog.csdn.net/qq_21993785/article/details/95069485

All buttons and text positions can be dragged and dropped


4. Change the main interface text

Find the label in app\src\main\res\layout\activity_main and find android:text="MLKIT", MLKIT is the set replacement font, replace android:textColor by yourself and set the font color (for "#" +
hexadecimal Color code)
insert image description here
android:textSize set the font size (positive integer)
android:testStyle set the font
insert image description here
position and place yourself Baidu
insert image description here

3. Generate a digital signature and package the releaseable apk step process

1. Generate jks and related configuration

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here

2. Start packaging the apk

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
Note: If the build variants button on the left does not exist
, click this button (regardless of the pop-up pop-up box)

insert image description here
insert image description here
to generate the final releaseable apk location

insert image description here
insert image description here

insert image description here
The last generated releaseable apk location


4. Put on Huawei AppGallery

1. Log in to the official Huawei developer website

https://developer.huawei.com/consumer/cn/
Click on the management center. If there is no management center, please log in as a user first. If you have not registered a developer, please refer to the group
announcement.
insert image description here

2. Click AppGallery connect

insert image description here

3. Click My Apps

insert image description here

4. Click My Apps

insert image description here

5. Click New

insert image description here

6. Fill in the application profile according to your own needs

insert image description here
insert image description here
insert image description hereinsert image description here
insert image description here

7. (Important!!) It is recommended to choose Hong Kong, China as the release area. If you select Mainland China, electronic copyright review will be required.

insert image description here

8. Upload the prepared release version apk

insert image description here

9. Privacy statement is required

You need to publish the permissions used in your own app and related data processing operations on the public network.
For example:
http://www.miquyouxi.com/privacy-policy.html
http://106.75.22.43/x2/ljl.html
https://www.labolado.com/apps-privacy-policy.html
insert image description here

10. Submit the listing application

insert image description here


5. Related activities

Huawei has launched a series of incentive policies for developers to put on shelves and go overseas. Here is a summary:

After developing the above app, you can participate in all the following activities.


1. Campus incentive activities (for students)

https://developer.huawei.com/consumer/cn/activity/101594178508936552
insert image description here

2. Shining Star Project (for the society)

https://developer.huawei.com/consumer/cn/activity/detail/101596179826759080
insert image description here

3. AI innovative application integration courtesy activities (for the society)

https://developer.huawei.com/consumer/cn/activity/301605774533111234insert image description here

4. Recruitment with rewards for Huawei HMS Core games overseas (not necessarily applicable)

https://developer.huawei.com/consumer/cn/activity/301605774533111234
must be a game app
insert image description here

Summarize

If you have any questions, please contact WeChat account: HMSMachineLearning

Guess you like

Origin blog.csdn.net/weixin_38132951/article/details/110928574