Welcome to K210 Module repository
1.k210 model training
k210 model training
k210 model training1.Collect data to identify road signs2.Upload the dataset to the training website2.1 Create project2.2 Create dataset2.3 Upload dataset2.4 Label data2.5 Model training3.Run the trained model4.Important Notes for Running Source Code
1.Collect data to identify road signs
Use the angle of view of the k210 angle of view module to shoot road signs, so that the recognition effect obtained can be greatly improved, and the size of pictures taken with other electronic devices should not exceed 320*240. The following are some materials collected by the author using k210 to take pictures. Under certain circumstances, the influence of misidentification and non-identification can be eliminated. Note: Collect at least 50 pictures for each icon, and data collection can be performed in different positions and different lights

2.Upload the dataset to the training website
This tutorial uses the official website of Canaan Model Training for model training, so the trained model must burn the firmware provided by yahboom. If you want to use the training model from other websites, please burn the corresponding firmware yourself.
Official Training URL:https://www.kendryte.com/en/products
2.1 Create project
Since Canaan officially does not provide an English version of the training entrance, you need to select the Chinese language, and then find the entrance of the training model.
Open the official training website, click the language option in the upper right corner, and select CH (Chinese).
Click Model Training, fill in your user name, email address and registration password to log in.
Note: If you do not have an account name, you can register yourself first.


After filling in the project name and other options, click Submit and select it.

2.2 Create dataset
Select the dataset, then click Create dataset, enter the page, fill in the information and click Submit.

Then click Bind, bind the project you created and you will enter this interface.

2.3 Upload dataset

Click the serial number 1 in the above picture to collect data function. Select number 2 to select the pictures you collected. Finally, click on the serial number 3 to upload the picture. After the upload is complete, the data can be marked. (Each icon should not be less than 50, pictures can be uploaded repeatedly)
2.4 Label data

Select serial number 1 to add a label,select serial number 2 to create callout, and then press and hold the left mouse button to select the picture. Mark it with a green box(As shown in number 3). Finally, select the serial number 4 to save the callout.
2.5 Model training
Click on the upper right corner to create a task. Select the number of iterations required and the size of the batch. Finally click OK and wait for the system training to complete.

After the training is completed, it will be as shown in the figure below. Do not click delete

Click to download, and then unzip to get the file as shown below.

Then open the det.py file, replace the content in the lable.txt and anchor.txt files to the corresponding position of det.py, there are comments in it, just replace according to the comments, this tutorial will not elaborate.
3.Run the trained model
Finally, transfer the det.py file and the corresponding model (usually directly to the root directory of the SD card) to the TF card of the k210 viewing angle module, and rename the det.py file to main.py. Re-power on the k210 viewing angle module, it will run normally and recognize the trained icons under normal circumstances.。

For the trained program, if you want to combine the car for data transmission, you need to write the serial part by yourself. For how to write it, please refer to the source code of the k210 part
4.Important Notes for Running Source Code
Be sure to burn the factory firmware of the k210 viewing angle module of the Yabo board to run the trained program or the k210 camera program, and change the running program to the main.py program