mirror of
https://github.com/m5stack/UNITV_TRAIN.git
synced 2026-05-20 11:05:22 -07:00
2265817dc0d5be40d214f82a486333da0175960f
train_scripts
You can also train on Maixhub.com, just upload your datasets and you will get the result(kmodel and usage code)
Train type
- Object classification(Mobilenet V1): judge class of image
- Object detection(YOLO v2): find a recognizable object in the picture
Usage
0. Prepare
- only support
Linux - Prepare environment, use CPU or GPU to train At your fist time train, CPU is recommended, just
pip3 install -r requirements.txt
or use aliyun's source if you are in China
pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
- Download nncase and unzip it to
tools/ncc/ncc_v0.1, and the executable path istools/ncc/ncc_v0.1/ncc python3 train.py init- Edit
instance/config.pyaccording to your hardware - Prepare dataset, in the
datasetsdirectory has some example datasets, input size if224x224or you just fllow maixhub's conduct
1. Object classification (Mobilenet V1)
python3 train.py -t classifier -z datasets/test_classifier_datasets.zip train
or assign datasets directory
python3 train.py -t classifier -d datasets/test_classifier_datasets train
more command seepython3 train.py -h
and you will see output in the out directory, packed as a zip file
2. Object detection (YOLO V2)
python3 train.py -t detector -z datasets/test_detector_xml_format.zip train
more command seepython3 train.py -h
and you will see output in the out directory, packed as a zip file
License
Apache 2.0, see LICENSE
Languages
Python
100%