Esteban
Esteban

Reputation: 41

Use Image classification model trained with coco

i need to work with an image classification trained with the dataset named coco. I searched on internet but i only find objects detectors.

Anyone know pre-trained models image classification for tensorflow 2?

Upvotes: 0

Views: 1479

Answers (1)

papaya
papaya

Reputation: 1535

Object Detection is different from Image Classification.

Object Detection algorithms act as a combination of image classification and object localization. It takes an image as input and produces one or more bounding boxes with the class label attached to each bounding box. These algorithms are capable enough to deal with multi-class classification and localization as well as to deal with the objects with multiple occurrences. ref

You can however use the coco dataset to strip out each and every localisation box and create a new dataset which can now be fed for your image classifier. You will have to do processing of the coco dataset to achieve this.

For eg. If your dataset annotations looks like this: (contains 4 objects localised namely the following):

  1. 123, 23, 13, 45, kite, image_1.jpg
  2. 133, 43, 213, 77, bird image_1.jpg
  3. 133, 13, 413, 73, bird, image_2.jpg
  4. 12, 233, 440, 34, tree, image_1.jpg

You can write a script to convert into this:

  1. kite_123231345image_1.jpg
  2. bird_1334521377image_1.jpg
  3. bird_1331341373image_2.jpg
  4. tree_1223344034image_1.jpg

and create those images with cut out boxes.

And use this annotation to train your classifier. I have personally done this on cocodataset before and gives decent precision.

Upvotes: 1

Related Questions