tensorflow / models

Models and examples built with TensorFlow
Other
77.16k stars 45.76k forks source link

Fine tuining Faster RCNN Inception V2 - Object Detection API Colab TF2 #8885

Open tazu786 opened 4 years ago

tazu786 commented 4 years ago

Prerequisites

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

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/eager_few_shot_od_training_tf2_colab.ipynb

2. Describe the feature you request

I would like to restore the checkpoint of the pretrained model Faster R-CNN with Inception Resnet v2.

3. Additional context

How to set what to restore and what to re-initialize in this case? What I did so far:

When I run the colab just applying these changes I get: ValueError: Checkpoint was expecting a trackable object (an object derived fromTrackableBase), got <object_detection.models.faster_rcnn_inception_resnet_v2_keras_feature_extractor.FasterRCNNInceptionResnetV2KerasFeatureExtractor object at 0x2b1081747da0>. If you believe this object should be trackable (i.e. it is part of the TensorFlow Python API and manages state), please open an issue.

4. Are you willing to contribute it? (Yes or No)

Yes

tazu786 commented 4 years ago

In the meantime, I am trying to use the model_train_tf2.py with the config file. Question, I cannot find the config file for training the faster_rcnn_inception_v2 here, can I use the file pipeline.config within the zip file that I download from the model zoo page? Thank you

koles289 commented 4 years ago

Hi, did you somehow solved this issue? I have a similar problem with the checkpoint. I have a feeling that I am passing an incorrect file, but I do not know, which file from zip is the right one, because for all of them I have the same error

tazu786 commented 4 years ago

I gave up in using that colab and trying with model_main_tf2.py and config files, but in that case I have the issue to not get the mAP values during evaluation (discussing this issue here https://github.com/tensorflow/models/issues/8856#issuecomment-665072871 and here https://github.com/tensorflow/models/issues/8887).

agosdorano commented 3 years ago

Hi, I have the same issue.. someone solved?

jjuanvision commented 1 year ago

I do have same issue with faster rcnn and resnet50v1. Impossible to restore the weights with the _feature_extractor is not a trackable object. Also, experimenting problems passing dummy images.

Did you be able to solve this issue? Thanks in advance!