Ning-Ding / Implementation-CVPR2015-CNN-for-ReID

Implementation for CVPR 2015 Paper: "An Improved Deep Learning Architecture for Person Re-Identification".
MIT License
147 stars 71 forks source link

Folder not found errors #20

Open miladf2 opened 7 years ago

miladf2 commented 7 years ago

I get this error when I try to run the ./CUHK03/create_dataset.py code. can you please let me know how to fix it:

Traceback (most recent call last):
  File "./CUHK03/create_dataset.py", line 92, in <module>
    create_dataset(args.mat_file_path)
  File "./CUHK03/create_dataset.py", line 33, in create_dataset
    val_index = (f[f['testsets'][0][0]][:].T - 1).tolist()
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2846)
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2804)
  File "/Users/mf186053/anaconda/lib/python2.7/site-packages/h5py/_hl/group.py", line 169, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2846)
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2804)
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/h5o.c:3740)
KeyError: "Unable to open object (Object 'testsets' doesn't exist)"
Ning-Ding commented 7 years ago

Try running the command python create_dataset.py --mat $abs_path_to_your_cuhk03.mat The info shows you gave the script a wrong file path to the cuhk03.mat.

miladf2 commented 7 years ago

it still gives the same error with absolute path to the mat file. Any ideas?

Ning-Ding commented 7 years ago

Could be a wrong .mat file of CUHK03? Have you tried a new .mat file?

miladf2 commented 7 years ago

I think it has to do with the username /ilan/minonda which is not my username. I dont know where that is hardcoded or read in.

Ning-Ding commented 7 years ago

Try only using the h5py module to read the .mat file, to find out whether there is a "testsets" key in it.

miladf2 commented 7 years ago

Thanks i downloaded the dataset again and now the first part of the code works. The main code however gives the following error. Is it because of tensorflow new version?


    (dtype.name, repr(mismatch), type(mismatch).__name__))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead. ```
Ning-Ding commented 7 years ago

Yes, try again with the TensorFlow 1.1 and Keras 2.0

miladf2 commented 7 years ago

Thanks upgrading tensorflow fixed it.