Open ztcuthbertlo opened 6 years ago
You can just adapt your custom config class and write NUM_CLASSES =
class CustomConfig(Config):
"""Configuration for training on MS COCO.
Derives from the base Config class and overrides values specific
to the COCO dataset.
"""
# Give the configuration a recognizable name
NAME = "custom"
# Number of classes (including background)
NUM_CLASSES =1 + 80 +1 # Background + Coco + Balloon
Thank you for the reply.
Does the size of the samples of all classes matter? The Coco original dataset has tenths of thousand images for each class, is it necessary to have the same size or only a small portion, like 100 images each class, will be good enough?
For only training the heads, 100 to 1000 samples for each class clould be enough. Just try it out.
Do we need to get the whole coco dataset (images of all the 80 class)+ images of balloon/new class and then start to train ...or can we use the pretrained weight+ images of balloon/new class and then train.Is this method will work? Please let me know how to use transfer learning in this..
@parul19 I think once the final layer is modified, you can use the pretrained weights from all other layers and train the modified layers. This explains it well except the repo link is broken: transfer learning
@parul19 how did you do it? I want to add a new class without losing the 80 COCO classes, but I don't know how to do it. Thank you.
I've been wondering how to do the same thing. I would like to add a few classes to the existing COCO class. I'm using just basic object detection, no Mask_RCNN. How do you do that?
need help steps or any documents to achive these,
1.How can I retrain the existing ssd_inception_v2_coco_2018_01_28 model with addition class. my question is 'How to add custom classes while preserving the classes in original'. and otherone question is, 2.How can I train a new model only with my own dataset which has only two classes.
@ManjuAlchemy I know the answer for second question is described by authors in the article: https://engineering.matterport.com/splash-of-color-instance-segmentation-with-mask-r-cnn-and-tensorflow-7c761e238b46 This quite comprehensive guide to train a model (from scratch or transfer learn the trained) to mask your own classes.
I would like to add custom classes (like the sample adding Ballon) while retain the original 80 classes COCO already has. For example, after re-training with Ballon dataset with pre-trained COCO model, how can I do object detection on classes like Balloon, Person, Cat, Car?