0

I have some questions about object detections in images/videos.

I tried this tutorial with success: Train Object Detection AI with 6 lines of code

In this tutorial, we train a model to detect hololens. If I wanted to detect cars, I need to train a new model.

My question is: can I take my actual model (hololens) and make it detect hololens and cars?

In the end, I want to have one file (model) that detects all the objects that I put it to train. I will put a directory of 'n' images, and the model will try to detect everything it's trained to detect and return the name of the objects detected.

Sorry my bad english!!

1 Answer 1

1

Yes, you can train your model on any number of object classes. The tutorial is based on YOLOV3 which is one of the state-of-the-art object detection models which is fast enough to be used in real-time and videos. On the page you mentioned, in step 1 it explains how to prepare and annotate your dataset. Your data can have many categories of objects (like cars, hololens, etc) but you need to set this number in before training. Also, in the annotation step (giving label to the objects) you should assign the right names to the objects.

There is a link on this page that explains how to prepare your own data: Object Detection Training — Preparing your custom dataset

If the data is already prepared make sure it is in Pascal Voc format as it is necessary to be consistent with the model you are using. In the end, you only need one model to detect all kinds of objects. The accuracy depends on the number of iterations, the number of objects in each class, variety in shape, size, color, angle, etc of the objects and so on.

Sign up to request clarification or add additional context in comments.

6 Comments

So you say that I just need to create a new data in Pascal Voc, and in the code from step 3 I will set: object_names_array["cars"] | And train_from_pretrained_model="my_model.h5". After that, I will have a new model that can detect hololens and cars, right?
It is explained in the link you mentioned: if your custom dataset annotation has more than one object, simply set the values as shown in the example below object_names_array = ["hololens", "google-glass", "oculus"]
Hum, so in the array I will put just the values that my model have. And then start train. In the next time, if I want detect cats, I put in the array ["hololens", "cars"] and use the model. And I do it "forever".... right? Sorry for ask a lot, I am really a noob, but everyday I read mode articles to learn this area.
No, you should put all the object names in the array before training. If you have two object classes you can put in the array ["hololens", "cars"] before training. Later, if you want to add another object, you can use this model as a pre-trained model for the new one; but the objects should be defined before training.
Nice!! Thank you. May I do more one question? This is the last!! I have my model that detect hololens, is possible to train again this model with new hololens image to improve the detections?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.