In TensorFlow's Object Detection API:
https://github.com/tensorflow/models/tree/master/object_detection
Is it possible to classify using the ImageNet classes (1000 classes)? The 4-5 models in the Model Zoo are all trained on the COCO dataset, which only has 80 classes.
Yes, you can convert imagenet data to torecord, and train imagenet detection model, it is the same with coco or pascal_voc procedure.
Here I write a script tensorflow_object_detection_create_coco_tfrecord to convert coco data to tfrecord for tensorflow object detection API, you can refer to this to convert your own data
Related
I want to train YOLOv3 Darknet on a custom dataset using MS COCO pre-trained weights. Specifically, i want to fine-tune the MS COCO pre-trained weights of the YOLOv3 on a custom dataset.
I followed the instructions of data preparation and detector configuration in the AlexeyAB/darknet Github repository, but in pre-trained weights part, only the use of ImageNet pre-trained convolutional weights was explained. I googled about fine-tuning MS COCO pre-trained weights of the YOLOv3 on a custom dataset, but couldn't found any explanation.
Has the COCO dataset been labeled on this pre-trained model?
I am trying to figure out if the object detection that happens after using this pre-trained model is actually an output of an unlabelled data, or there was some labeling which made the model more efficient.
Thanks in advance
I've annotated new image with new class according to the approach is recommended by http://www.immersivelimit.com/tutorials/create-coco-annotations-from-scratch
then I combined new class annotations with coco json annotate files and create TFrecord by running
create_coco_tf_record.py from this repository : https://github.com/tensorflow/models/tree/master/research/object_detection/dataset_tools
then I retrained faster_rcnn_resnet101 which its pretrained model is available in Tensorflow Model Zoo. I did retrain process according to this tutorial: https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
the problem is that the loss curve didn't converge and also had oscillation!!
how can I do to get better result from retraining models?
I'm using tensorflow objection detection API with the coco dataset provided in the tutorial.
If I use the api to detect custom objects, how do I "add" to the list of objects being detected from the coco dataset? Is there a way to merge?
If you mean using a model which is trained on the COCO dataset to detect objects that are not in the COCO dataset, you cannot do that. I think you will need to train a model, in this case one already trained on COCO, on your new objects that you want to detect. There is a tutorial here that shows how to train a model on a custom dataset.
If you do not want to train a model you need to find one that is already trained for the objects that you want to detect.
Have I understood correctly?
I am trying to use the Inception SSD model in tensorflow object detection API. To initialize the weights i want to use pretrained Inception V2 On image net as the feature extractor. I see the model config file lets you use a pretrained model on COCO but if I want to use an Image net model how should I go about it?
To train on Imagenet classification models, do the following:
1) Download a pre-trained model from the "Pre-trained models" section on the Slim page
2) Point the fine_tune_checkpoint at that directory
3) Set from_detection_checkpoint to be false (as you will now be fine-tuning from a classification checkpoint)
Note that training from an Imagenet classification checkpoint will require significantly more time.