self learning classifier
No need to train separately, learn the object features directly on the development board, and then use it directly
Demo video: youtube or bilibili
Instructions
- Here Download version >= v0.5.0-33 firmware
- Download kmodel
- Use kflash_gui to download firmware and model
- Run Sample script
If use the lite version kmodel, you should add
fea_lenarg as512when create classifier object, when use the bigger kmodel this param is not needed:
classifier = kpu.classifier(model, class_num, sample_num, fea_len=512)
Then start learning objects after running
- Press the
boot buttonon the development board to capture 3 categoriesmobile,car,keyboard, each category only needs to be captured once - Then capture 15 pictures, no order is required, such as capturing 5 pictures of
mobile phone, 5cars, 5 pictures ofkeyboard - Then it will automatically learn the features of these 15 pictures
- The last recognized image category will be displayed in the upper left corner
Save/load learned features
- Use
classifier.save(path)to save the learned features to thepathfile - Use
KPU.classifier.load()to load features, refer to self_learning_classifier_load.py file