Train any image classification network on custom dataset

Sorry, how can I train image classification network (ResNeXt is preferred) on my own dataset with 12 classes, not on ImageNet?

Any docs, posts and issues that I read, was about training on ImageNet dataset or about training custom object detection network (yolov3, for example), not about training any image classification network on custom (and completely different from ImageNet1k) dataset.

I was try adopt script for my needs, but no luck. Classification still based on ImageNet classes, even if I restrict number of classes from 1000 to 12 in load model script.

Thanks and sorry again.

How did you train your customized network? Did you use a pre-trained model? Your project is related to transfer learning, especially when your data set is not big and diverse enough.

This post about “transfer learning from pre-trained models” may be helpful. We would like to hear your success story.

I tried to use this script with own train.rec and val.rec data, net.save_parameters() and minor fixes.

But after training attempts to use was fail. It’s print ImageNet classes only.