Implementation-CVPR2015-CNN-for-ReID icon indicating copy to clipboard operation
Implementation-CVPR2015-CNN-for-ReID copied to clipboard

Folder not found errors

Open miladf2 opened this issue 7 years ago • 8 comments

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)"

miladf2 avatar May 23 '17 04:05 miladf2

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.

Ning-Ding avatar May 23 '17 06:05 Ning-Ding

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

miladf2 avatar May 23 '17 15:05 miladf2

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

Ning-Ding avatar May 23 '17 16:05 Ning-Ding

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.

miladf2 avatar May 23 '17 16:05 miladf2

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

Ning-Ding avatar May 23 '17 16:05 Ning-Ding

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. ```

miladf2 avatar May 24 '17 06:05 miladf2

Yes, try again with the TensorFlow 1.1 and Keras 2.0

Ning-Ding avatar May 24 '17 06:05 Ning-Ding

Thanks upgrading tensorflow fixed it.

miladf2 avatar May 24 '17 16:05 miladf2