AIWintermuteAI/aXeleRate

Problems training a model for a person and pet detector

Closed this issue · 1 comments

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.

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
  • partial and full support for edge TPU
  • different input dimensions (e.g. 320x240)
  • changing backends to the ones better suited for edge devices, like NASNetMobile(already committed to dev branch)

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 :)