mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
change yolov3 tutorial
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -349,9 +349,8 @@ div.card-img-overlay:hover {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
top: 20px;
|
||||
top: 25px;
|
||||
left: 20%;
|
||||
height: 56px;
|
||||
padding: 0 20px
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
|
||||
<img src="assets\img\related_documents\v-training\v_training.webp" width="100%">
|
||||
|
||||
At present, V-Training provides two model training modes "Classification" (recognize objects and return their corresponding classification) "Detection (using Yolov3 algorithm, recognize the object is located in the image and draw a wireframe)", the user can according to their own use The scenes can be freely selected and used, and the model training methods of these two modes will be introduced below.
|
||||
|
||||
## Burner Firmware
|
||||
|
||||
Users who have already programmed the firmware should start directly from the Second step.[for users who have not burned the firmware, please click here to view the firmware burning tutorial](en/quick_start/m5stickv/m5stickv_quick_start)
|
||||
|
||||
## Material Training
|
||||
## Classification mode
|
||||
|
||||
### boot code
|
||||
|
||||
@@ -47,7 +49,7 @@ Users who have already programmed the firmware should start directly from the Se
|
||||
<mark>"train" and "vaild" should add up over 35. If any Class photos total amount were under 35, please either delete it or copy for back up. After finish the checking, let's compress the "train" and "vaild" to ZIP.
|
||||
</mark>
|
||||
|
||||
## Upload Data to Cloud
|
||||
### Upload Data to Cloud
|
||||
|
||||
>[Click to visit upload page](http://v-training.m5stack.com/),type in your personal information(upload file should under 200MB, and had to be ZIP format)
|
||||
|
||||
@@ -57,7 +59,7 @@ Users who have already programmed the firmware should start directly from the Se
|
||||
|
||||
<img src="assets\img\related_documents\v-training\7.webp" width="60%">
|
||||
|
||||
## Download Model
|
||||
### Download Model
|
||||
|
||||
>After training accomplished, code file will sent to your personal e-mail, copy the download link to download the file to your computer.Unzip the file, copy it to SD card, keep the SD card in the M5StickV
|
||||
|
||||
@@ -65,7 +67,7 @@ Users who have already programmed the firmware should start directly from the Se
|
||||
|
||||
<img src="assets\img\related_documents\v-training\9.webp" width="60%">
|
||||
|
||||
## Run Recognition Program
|
||||
### Run Recognition Program
|
||||
|
||||
>power on to run the progarm automatically.
|
||||
|
||||
@@ -75,6 +77,59 @@ Users who have already programmed the firmware should start directly from the Se
|
||||
|
||||
<img src="assets\img\related_documents\v-training\11.webp" width="60%">
|
||||
|
||||
|
||||
## Detection mode(Yolov3)
|
||||
|
||||
### Footage shooting
|
||||
|
||||
> Similar to the training method of the classification mode above, in the detection mode (Yolov3) we still need to use the camera to shoot the material (here you can continue to use the shooting program in the classification mode). The difference is that in this training mode, multiple recognition objects are allowed in the same image frame. Therefore, when shooting multiple objects, there is no need to group shooting. <mark> The total amount of material shot must be greater than 100. </mark>
|
||||
|
||||
### LabelIMG material label
|
||||
|
||||
> After the shooting is completed, we use the labeling tool LabelIMG to mark the identified objects in the material and generate a mark file. Users can install the Python environment by themselves, run the following command on the command line, and install LabelIMG through its own pip package management tool。
|
||||
|
||||
```
|
||||
pip install LabelIMG
|
||||
```
|
||||
|
||||
> After the installation is complete, run the "LabelIMG" command line to open the labeling tool.
|
||||
|
||||
```
|
||||
LabelIMG
|
||||
```
|
||||
|
||||
> 1. Switch the marking tool to Yolo mode ---> 2. Open the picture storage directory ---> 3. Select the mark file storage directory ---> set the automatic saving mode.
|
||||
|
||||
<img src="assets\img\related_documents\v-training\yolov3_01.webp">
|
||||
|
||||
> Press the "W" key to start drawing the object border and name the object. (After adding the naming, add the record to the list, you can directly use it in the subsequent mark, without repeated input), click the next button, switch pictures, until all the materials are marked.
|
||||
|
||||
<img src="assets\img\related_documents\v-training\yolov3_02.webp">
|
||||
|
||||
> In addition to adding the tag file, we also need to manually add a v-training.config configuration file to tell the training service how many recognition objects we included in this training. (If two recognition objects are marked in the pattern example above, we need to fill in the number of categories in the configuration file as 2, the format is as follows)
|
||||
|
||||
```
|
||||
{
|
||||
"classes":2
|
||||
}
|
||||
```
|
||||
> Complete the above operations, place all the materials in the same folder, refer to the directory structure below. All files are selected and compressed into a compressed package in zip format for upload training.
|
||||
|
||||
```
|
||||
folder----------------------
|
||||
|--v-training.config
|
||||
|--1.jpg
|
||||
|--1.txt
|
||||
|--2.jpg
|
||||
|--2.txt
|
||||
.....
|
||||
```
|
||||
|
||||
> Complete the above operations, place all the materials in the same folder, refer to the directory structure below. All files are selected and compressed into a compressed package in zip format for upload training.
|
||||
|
||||
> For the upload method of material compression package and the model download mode, please refer to the training operation in the classification mode above. After the detection mode is trained, it will return `boot.py`, and` xxxx.model` files. Copy it to the SD card, and then insert the SD card into the device, you can run the identification program at boot.
|
||||
|
||||
|
||||
## Good Practice
|
||||
|
||||
>1. If your Loss line looks like below, there is something wrong with your dataset, you need to either clear it up or add more pictures. If everything is OK, and adding more pictures does not help, our network structure may not good for solve your problem.
|
||||
|
||||
+2
-2
@@ -28,8 +28,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="d-flex a flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm">
|
||||
<h5 class="my-0 mr-md-auto font-weight-normal">
|
||||
<a href="https://m5stack.com/"><img src="//cdn.shopify.com/s/files/1/0056/7689/2250/files/LOGO_70x.jpg?v=1563273356" style="margin-right:30px;margin-top:-5px" width="52"></a><span style="position: relative; top: 5px;">M5Stack Docs</span></h5>
|
||||
<h1 class="my-0 mr-md-auto font-weight-normal">
|
||||
<a href="https://m5stack.com/"><img src="//cdn.shopify.com/s/files/1/0056/7689/2250/files/LOGO_70x.jpg?v=1563273356" style="margin-right:30px;margin-top:-5px" width="52"></a><span style="position: relative;font-size: 20px;">M5Stack Docs</span></h1>
|
||||
<nav class="my-2 my-md-0 mr-md-3">
|
||||
<div id="product" class="p-2 dropdown"><span>Product</span>
|
||||
<div>
|
||||
|
||||
@@ -102,11 +102,11 @@ LabelIMG
|
||||
|
||||
>1.将标记工具切换为Yolo模式--->2.打开图片存放目录--->3.选择标记文件存放目录--->设置自动保存模式。
|
||||
|
||||
<img src="assets\img\related_documents\v-training\yolov3_01.webp" width="40%">
|
||||
<img src="assets\img\related_documents\v-training\yolov3_01.webp">
|
||||
|
||||
>按下"W"键,开始绘制对象边框,并为对象命名。(添加命名后,将记录添加到列表中,在之后的标记中可直接选择使用,无需重复输入),点击下一个按钮,切换图片,直到将素材全部标记完成。
|
||||
|
||||
<img src="assets\img\related_documents\v-training\yolov3_02.webp" width="40%">
|
||||
<img src="assets\img\related_documents\v-training\yolov3_02.webp">
|
||||
|
||||
>除了添加标记文件以外,我们还需要手动添加一个v-training.config配置文件,用来告诉训练服务,我们这次的训练中包含了多少个识别对象。(如上方图案例中标记两个识别对象,我们则需要在配置文件中填写类目数量为2,格式如下)
|
||||
|
||||
@@ -129,7 +129,7 @@ folder----------------------
|
||||
|
||||
>完成以上操作,将所有素材放置至同一个文件夹,参考下方目录结构。全选所有文件,压缩成zip格式的压缩包,用于上传训练。
|
||||
|
||||
>素材压缩包上传及模型下载方式,可参照上方分类模式训练的操作。检测模式训练完后返回的为一个可烧录的kgpkg文件,用户可以使用kflash工具进行烧录。设备启动后,当识别到对象时将自动通过串口发送数据。
|
||||
>素材压缩包上传及模型下载方式,可参照上方分类模式训练的操作。检测模式训练完后将返回`boot.py`,和`xxxx.model`文件。将其复制到SD卡中,然后将SD卡插入设备,开机既可以运行识别程序。
|
||||
|
||||
## 操作建议
|
||||
|
||||
|
||||
Reference in New Issue
Block a user