Classes available in tensorflow apis

How do I know if a my concerned class in included in the downlowded model?
For instance, if I want to identify sheeps, how do I know if they are included as a class in
“yolo-cppe5/1”

Not sure I understand the question, since to me the classes and categories in the dataset are completely independent of the technology implementing the machine learning models. That is, tensorflow and its API doesn’t know or care about YOLO or the data being passed through it. That said, if it’s a particular model you’re interested in, you could try looking for the research paper describing it. Like

CPPE - 5: MEDICAL PERSONAL PROTECTIVE EQUIPMENT DATASET

which states Our dataset includes 5 object categories (coveralls, face shield, gloves, mask, and goggles). So maybe not the best model to pick to identify sheeps :grin:

My question refers that the pretrained model has been trained on a fixed set of classes. How do I know if sheep is included among these classes?

Did you read all of my reply, or just the first six words?

  1. The classes/categories a model is trained on are not part of TensorFlow or its APIs as suggested by your topic question.

  2. The particular model you mention, yolo-cppe5, appears to be trained on the dataset described in the link in my previous. It is trained to identify medical equipment. No livestock. But in general, if you somehow stumble across a model that doesn’t describe the dataset and process through which it was trained, you probably should find another model.

1 Like

Thank ai_curious you for your answer.
So, there is something that I do not understand.
I understand that the models in tf.hub are pre trained on different datasets, for instance Coco dataset (COCO - Common Objects in Context) .
Coco dataset establishes that “Our dataset contains photos of 91 objects types”.
Or, as other example Imagenet is said to have 1000 classes.
So, the models trained on these datasets, can identify the classes they were trained on, and not others, Am I right?
If I am interested in a particular image, for instance, sheeps, how do I find a model whose training-datasets included them?

Short answer is “yes”

ImageNet, for example, provides a lookup table from coded output to human readable label. See here: https://github.com/formigone/tf-imagenet/blob/master/LOC_synset_mapping.txt

You can’t just modify that table to rename one of the existing entries to sheep. And you can’t just append another row, since it will never be predicted by the model. If you can’t find an existing model that includes your target class or category, you have to train one. Either from scratch or using transfer learning.

1 Like