squeezedet-keras icon indicating copy to clipboard operation
squeezedet-keras copied to clipboard

Train squeezedet for own dataset for 1 class

Open Shashikant255 opened this issue 7 years ago • 4 comments

Hi, I am wondering how to do transfer learning for squeezedet using pretrained model. I also want to reduce number of classes to 1.

Shashikant255 avatar Aug 24 '18 06:08 Shashikant255

Hi, I could successfully train my own. You can simply edit squeeze.config created by python ../../main/config/create_config.py. Check it first, it is easy to customize. Regarding pretrained model, you can find following instruction in README.md. Change # of GPU to match to your environment.

python ../../scripts/train.py --gpus 2 --init ../../main/model/imagenet.h5

Hope this helps.

daisukelab avatar Aug 24 '18 23:08 daisukelab

@daisukelab Thanks for your help. I have one more doubt regarding label (bounding box information about object i.e x, y, w, h) file. If any image doesn't have any class or object then its corresponding label file should be empty?

Shashikant255 avatar Aug 27 '18 06:08 Shashikant255

Hi, training code doesn't allow to have empty label, then you need to remove images which have zero class label from your train/valid lists. (I already experienced that training stopped with an error, then removed these entries to solve this issue.)

daisukelab avatar Aug 27 '18 08:08 daisukelab

"CLASSES": 1, "CLASS_NAMES": ["my_object"] is this correct way top modify squeeze.config for single object detection? or background needs to be added in CLASS_NAMES and CLASSES = 2?

Caliber2 avatar Apr 26 '19 11:04 Caliber2