After training Inception Resnet V1 on my custom images using train_softmax.py produces such directory structure :
20180827-104410 20180827-115022 20180827-120731 20180827-121107 20180827-121544 20180827-122058 20180827-122452
20180827-114425 20180827-120607 20180827-120952 20180827-121259 20180827-121920 20180827-122206 20180827-123746
In this arrangement only the last folder 20180827-123746 has checkpoint and meta files like so :
checkpoint model-20180827-123746.ckpt-49.data-00000-of-00001 model-20180827-123746.ckpt-50.index
model-20180827-123746.ckpt-48.data-00000-of-00001 model-20180827-123746.ckpt-49.index model-20180827-123746.meta
model-20180827-123746.ckpt-48.index model-20180827-123746.ckpt-50.data-00000-of-00001
So the problem is I am not getting any .pb file to feed to src/classifier.py
Although it is mentioned in classifier.py file that it takes ckpt_file and meta_file but it is giving the following error
Traceback (most recent call last):
File "src/classifier.py", line 170, in <module>
main(parse_arguments(sys.argv[1:]))
File "src/classifier.py", line 69, in main
facenet.load_model(args.model)
File "/home/ubuntu/facenet/src/facenet.py", line 372, in load_model
graph_def.ParseFromString(f.read())
google.protobuf.message.DecodeError: Error parsing message
I don't know any other approach to make this work. Can you help with any alternate solution ?
I tried running classifier directly on 20180408-102900.pb BUT surprising it gave me accuracy of 0.129
To generate the .pb file, you have to run freeze_graph.py script. This script have two positional arguments: the directory with metagraph and checkpoint files and the output file path where you want the model to be saved.
Most helpful comment
To generate the .pb file, you have to run freeze_graph.py script. This script have two positional arguments: the directory with metagraph and checkpoint files and the output file path where you want the model to be saved.