AIWintermuteAI / aXeleRate

Keras-based framework for AI on the Edge
MIT License
179 stars 71 forks source link

Problems training a model for a person and pet detector #6

Closed enrique-torres closed 4 years ago

enrique-torres commented 4 years ago

I'm trying to train a model for a person and pet detector (like cat or dog, for example). My question is about what config to use when training a model for a detector with only those classes, that works in Maix Go.

AIWintermuteAI commented 4 years ago

Hello! Currently there is now way to single out some classes for training out of dataset. So, there are a few solutions for your problem(training person and pet detector): 1) Create custom dataset by filtering PASCAL-VOC 2012 dataset, which contains classes "dog", "cat", "bird", "person". That might be the easiest way and only requires some basic Python knowledge - just write a script, that would delete annotations that contain the classes that you don't need. 2) Use this fork of keras-yolo https://github.com/rodrigo2019/keras_yolo2 It can single out certain classes from the dataset. You will need to perform the conversion from .h5 to .tflite to .kmodel yourself after training. I'm cherry-picking some of the features of rodrigo2019's implementation, but because his code and the code from original keras-yolo repository differ quite a lot, it's not as easy as copy-paste and requires significant time. My next goals in roadmap for aXeleRate are

I will eventually get to add the "singling out" certain classes from dataset feature as well, but not quite soon. If you are willing to add this feature, I can provide some guidance on what files to change and then accept the PR request :)