tensorflow / models

Models and examples built with TensorFlow
Other
76.94k stars 45.8k forks source link

how to train a custom object detection model ssd_mobilenet_v1_coco and ssd_inception_v2_coco on google colab tensorflow 1.15.2? #9476

Open spurani opened 3 years ago

spurani commented 3 years ago

Prerequisites

Please answer the following questions for yourself before submitting an issue.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/...

2. Describe the bug

A clear and concise description of what the bug is.

3. Steps to reproduce

Steps to reproduce the behavior.

4. Expected behavior

A clear and concise description of what you expected to happen.

5. Additional context

Include any logs that would be helpful to diagnose the problem.

6. System information

Basically I have been trying to train a custom object detection model with ssd_mobilenet_v1_coco and ssd_inception_v2_coco on google colab tensorflow 1.15.2 using tensorflow object detection api. As soon as I start training it throws error for both the models respectively.

I also ran the python object_detection/builders/model_builder_tf1_test.py and it passed all the test without any errors or warnings.

ValueError: ssd_inception_v2 is not supported. See model_builder.py for features extractors compatible with different versions of Tensorflow.

ValueError: ssd_mobilenet_v1_coco is not supported. See model_builder.py for features extractors compatible with different versions of Tensorflow.

I have successfully changed the tensorflow to 1.15.2 by using below command this is my first step before installing any of the dependencies.
%tensorflow_version 1.x
import tensorflow
print(tensorflow.__version__)

When I checked the model_builder.py I can see that they still have support for ssd_mobilenet_v1 and ssd_inception_v2. I want to deploy my custom trained model ssd_mobilenet_v1 or ssd_inception_v2 on jetson tx2 by converting them into trt-tf models . In these 2 documents link1 and link2 we can see object detection models which can be converted to tf-trt models. So my question is how can I train these models as they are supported on google colab on tensorflow 1.15.2 and deploy on jetson txt for converting them to tf-trt models? Can anyone guide me through it would be really helpful to conitue my learning and learn something interesting thanks

ravikyram commented 3 years ago

@spurani

Can you please share the colab link. It helps us in localizing the issue faster. Thanks!

spurani commented 3 years ago

@ravikyram Thank you very much for your prompt response here is the link for the colab Please let me know if you have any questions. Thank you

ravikyram commented 3 years ago

@spurani

Request you to grant me the access for colab link. Thanks!

spurani commented 3 years ago

@ravikyram access granted for colab. Also I would like to mention one more thing I tried to train my model using train.py(after running train.py I would run eval.py in order to save time and compute I would like training and evaluation separately) under models/research/object_detection/legacy folder and model_main.py. Please feel to reach out should you any questions

spurani commented 3 years ago

is this issue valid? or am I missing something? please feel to reach out should you have any questions

spurani commented 3 years ago

May I please get any kind of update on this issue?