surajdakua / Crowd-Counting-Using-Pytorch

Pytorch based Crowd-Counting model to estimate the number of people in crowdy areas such as Stadium, Music festival etc.
40 stars 9 forks source link

error generate goundntruth #2

Open Anislar opened 4 years ago

Anislar commented 4 years ago

(base) C:\Users\larguet\Desktop\Crowd-Counting-Using-Pytorch-master>python GenerateGroudnTruth.py C:/Users/larguet/Desktop/Crowd-Counting-Using-Pytorch-master/shanghaitech_part_B/train_data/images\IMG_1.jpg Traceback (most recent call last): File "C:\Users\larguet\Anaconda3.1\lib\site-packages\scipy\io\matlab\mio.py", line 39, in _open_file return open(file_like, mode), True FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/larguet/Desktop/Crowd-Counting-Using-Pytorch-master/shanghaitech_part_B/train_data/ground-truth\GT_IMG_1.mat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "GenerateGroudnTruth.py", line 65, in mat = io.loadmat(imgpath.replace('.jpg','.mat').replace('images','ground-truth').replace('IMG','GTIMG')) File "C:\Users\larguet\Anaconda3.1\lib\site-packages\scipy\io\matlab\mio.py", line 216, in loadmat with _open_file_context(file_name, appendmat) as f: File "C:\Users\larguet\Anaconda3.1\lib\contextlib.py", line 112, in enter return next(self.gen) File "C:\Users\larguet\Anaconda3.1\lib\site-packages\scipy\io\matlab\mio.py", line 19, in _open_file_context f, opened = _open_file(file_like, appendmat, mode) File "C:\Users\larguet\Anaconda3.1\lib\site-packages\scipy\io\matlab\mio.py", line 45, in _open_file return open(file_like, mode), True FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/larguet/Desktop/Crowd-Counting-Using-Pytorch-master/shanghaitech_part_B/train_data/ground-truth\GT_IMG_1.mat'

help ?

surajdakua commented 4 years ago

Check the directory path. It seems you have given wrong path to the directory.