Skip to content

Append a save/restore example to colab tutorial for TF2 Object Detection API #8884

@IvanBrasilico

Description

@IvanBrasilico

Prerequisites

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

  • [X ] I checked to make sure that this feature has not been requested already.

1. The entire URL of the file you are using

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

2. Describe the feature you request

The notebook go through the steps necessary to modify number of classes and fine tune an existing model to detect new classes, but do not show how to save the model for using in other contexts, like tensorflow serving or restoring the model in other scripts/notebooks.I have successfully trained a model, but I tried to restore the checkpoints, tried many common tensorflow save model commands, but they do not worked. Can't figure out how to save the model.

3. Additional context

In the modified notebook:

https://github.com/IvanBrasilico/ajna_bbox/blob/master/notebooks/eager_few_shot_od_training_tf2.ipynb

I do a very simple test training to detect containers bounds on xray inspection images. The training works well, even with a few training. I do some predictions on new images with the model in memory and save the images to see the results. Then I save the model weights to a checkpoint and recreate the model, restoring the checkpoints and something goes wrong, the model do not do predictions anymore. Can figure out how to do it.

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

Yes

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions