hellochick / PSPNet-tensorflow

TensorFlow-based implementation of "Pyramid Scene Parsing Network".
326 stars 123 forks source link

No checkpoint file found #57

Closed ga84 closed 5 years ago

ga84 commented 5 years ago

Hello! This is a fairly stupid issue but it brings a lot of trouble. Can you please help me specify the path to checkpoint file? I tried everything including absolute path and specifying name of ckpt... I first copied checkpoint files to a folder 'model' and that should work with default settings in code, however it does not... Suggestions?

@hellochick

intvo commented 5 years ago

did you find a solution to this?

ga84 commented 5 years ago

Unfortunately not yet. Can anyone of you guys who probably got this done please help? @sainttelant @Leequens @PascalWB @anny123123

MAdil45 commented 5 years ago

Same issue. Kindly let us know the solution. We really appreciate that. @hellochick

jiaxinxie97 commented 5 years ago

https://github.com/hellochick/PSPNet-tensorflow/blob/989ac5fba803ce6bfa4a80ade3764746c38a9dcd/inference.py#L103 This function can't work in their dir. Changing ckpt.model_checkpoint_path to $MODEL_PATH/model.ckpt-0 will be ok.

ga84 commented 5 years ago

@jiaxinxie97 thank you for answering! However, I'm afraid it still doesn't work. Did you mean, writing e.g. ./model/pspnet101/model.ckpt-0 instead of ckpt.model_checkpoint_path ? I tried this and still not found.

I also tried setting SNAPSHOT_DIR as './model/pspnet101/model.ckpt-0', also tried './model/pspnet101/' and I tried with absolute paths in all combinations but no success... Can you please tell me where I might be doing wrong? I'd really appreciate that. Thank you!

EDIT: sorry for bad formatting, I have to type from my phone...

ga84 commented 5 years ago

I solved the problem, by deleting the condition: if ckpt and ckpt.model_checkpoint_path And also the "else" part. And then after inserting the path to model.ckpt-0 instead of the ckpt.model_checkpoint_path it is finally possible to load checkpoint files. Thank you for the hint @jiaxinxie97 !

MAdil45 commented 5 years ago

I have solved this by providing the checkpoint path directly at default line. parser.add_argument("--checkpoints", type=str, default='/model/ade20k_model/',

Jason-xin commented 5 years ago

I have solved this by modifying 'checkpoint.txt' to 'checkpoint' image

ga84 commented 5 years ago

Thanks guys, I think we can close this issue!

simardeep1792 commented 4 years ago

Hi Guys, could you explain how you all did it. I repeated all the steps and still it shows checkpoint not found. Could you atleat paste the screenshot of the code. @hellochick