tensorflow / tensorflow/models

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

Open
#8,884 5 comments 0 reactions 3 assignees View on GitHub

Nobody has claimed this yet.

models:research:odapi type:feature
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.