pse-ecn / pose-sensitive-embedding

Pose Sensitive Embedding for Person Re-Identification (PSE)
112 stars 36 forks source link

Cannot restore the checkpoint file #25

Open MiioCruise opened 5 years ago

MiioCruise commented 5 years ago

Hi, here is a problem when I try to restore model by the ckpt file provided in README. There is only one .meta file for Market dataset model and a .data file for Duke dataset model in the zip file. When I try to restore the model, it gets an error: 'ValueError: The passed save_path is not a valid checkpoint'. Could you please check out that zip file and update another completed ckpt? Thank you for your help!

yangchihyuan commented 5 years ago

There should be a "checkpoint" text file, and its content should be something like model_checkpoint_path: "model.ckpt-104801". However, I still got an error message

InvalidArgumentError (see above for traceback): 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= [7,7,3,64] rhs shape= [7,7,17,64] [[node save/Assign_382 (defined at predictor_preid.py:106) = Assign[T=DT_FLOAT, _class=["loc:@resnet_v1_50/conv1/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](resnet_v1_50/conv1/weights, save/RestoreV2:382)]]

ri-sal commented 5 years ago

You are trying to load the pose model that needs an rgb image (3 channels) and joint pose maps (14 channels) as inputs. You are only giving the rgb image as input.

yangchihyuan commented 5 years ago

I figured it out. If I want to use the pretrained model downloaded from https://bwsyncandshare.kit.edu/dl/fiVyQmjBRDtJ9NzxuEqbSBn1/.zip

I need to use this command python3 predictor_preid.py --model-dir= --data= --dataset-name=market1501 --batch-size=128 --network-name=resnet_v1_50_views but replace the argument --dataset-name=market1501 with --dataset-name=market1501-pose-maps