Implementation-CVPR2015-CNN-for-ReID
Implementation-CVPR2015-CNN-for-ReID copied to clipboard
Folder not found errors
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)"
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
.
it still gives the same error with absolute path to the mat file. Any ideas?
Could be a wrong .mat file of CUHK03? Have you tried a new .mat file?
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.
Try only using the h5py module to read the .mat file, to find out whether there is a "testsets" key in it.
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. ```
Yes, try again with the TensorFlow 1.1 and Keras 2.0
Thanks upgrading tensorflow fixed it.