endernewton / tf-faster-rcnn

Tensorflow Faster RCNN for Object Detection
https://arxiv.org/pdf/1702.02138.pdf
MIT License
3.65k stars 1.58k forks source link

Restoring from checkpoint failed #481

Open CQSamBoom opened 4 years ago

CQSamBoom commented 4 years ago

I have trained a new Faster RCNN using my own training set. It' ok during training and testing. but I using my trained mode to run demo.py for my picture, there are:

Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [2048,84] rhs shape= [2048,24]

who can help me ,please.

rnsandeep commented 4 years ago

check on the number of anchors you have used during train and test. Both should match.

CQSamBoom commented 4 years ago

check on the number of anchors you have used during train and test. Both should match.

I find the code about anchors and find out the question , I forget correct n-class , think you all the same

rnsandeep commented 4 years ago

Yes by default pascal-voc has 21 classes. so 21x4. you could have changed it to 6 so 6x4.

DK223 commented 4 years ago

check on the number of anchors you have used during train and test. Both should match.

I find the code about anchors and find out the question , I forget correct n-class , think you all the same

I have the same question. Could you tell me where you find the code about anchors? I can't find it.