2
votes

I am training an object detection model up to 10 checkpoints using the tensorflow object detection api version 2. Exporting the final checkpoint using the exporter_main_v2.py works with no problems, however I would also like to export eg checkpoints 3, 6 and 8 to compare how they do in the actual setup. Is this possible?

I've tried deleting the later checkpoints and then running exporter_main_v2.py but this results in an error stating that there are later events in the events.out.tfevents file than the one I'm trying to export so it cant continue.

1
why you cant export frozen graph? pls attach the error so that people can take a look. - dtlam26
also, you can check whether the cpkt file is exist in the checkpoint by opening the checkpoint file. It will have the lastest one and other older checkpoint that it kept - dtlam26
I can export frozen graph from the latest checkpoint, but I want to export it from an earlier checkpoint. There is no real error, when you run the export script it automatically selects the latest checkpoint, I want to select an older/specific checkpoint. - Joram
It is easy, you just need to replace the checkpoint key in the checkpoint file to the correspond ckpt u want - dtlam26
So you're saying i should rename ckpt-3 as ckpt-10 (and backup ckpt-10 as ckpt-10.bak eg) if I want to use the script to export 3 instead of 10? - Joram

1 Answers

5
votes

In your trained folder where checkpoints are, there is checkpoint key file, open that and change the "model_checkpoint_path" checkpoint-number in the first line. Generally it will be saved the last checkpoint.