foolwood / SiamMask

[CVPR2019] Fast Online Object Tracking and Segmentation: A Unifying Approach
http://www.robots.ox.ac.uk/~qwang/SiamMask
MIT License
3.47k stars 819 forks source link

siam_mask_dataset error #168

Open ksoy0128 opened 4 years ago

ksoy0128 commented 4 years ago

Traceback (most recent call last): File "/home/soyeon/SiamMask/tools/train_siammask.py", line 292, in main() File "/home/soyeon/SiamMask/tools/train_siammask.py", line 168, in main train(train_loader, dist_model, optimizer, lr_scheduler, args.start_epoch, cfg) File "/home/soyeon/SiamMask/tools/train_siammask.py", line 186, in train for iter, input in enumerate(train_loader): File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 819, in next return self._process_data(data) File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/opt/conda/lib/python3.6/site-packages/torch/_utils.py", line 385, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/soyeon/SiamMask/datasets/siam_mask_dataset.py", line 551, in getitem search_mask = (cv2.imread(search[2], 0) > 0).astype(np.float32) TypeError: '>' not supported between instances of 'NoneType' and 'int'

How can I fix this error? Please... I want to use training set without ytb. (I use only coco, vid, det)

humeranoor commented 4 years ago

I also have this error. Could you resolve yours?

antdimarino commented 4 years ago

I also came across this error. Practically cv2.imread(search[2], 0) returns None when it does not find the image at the path contained in search[2].

Maybe you made a mistake in preprocessing the datasets, recheck the paths you used.

My error consisted in not executing the preprocessing correctly and consequently my crop511 folder contained all empty folders.

ahmedosamaz commented 3 years ago

I also came across this error. Practically cv2.imread(search[2], 0) returns None when it does not find the image at the path contained in search[2].

Maybe you made a mistake in preprocessing the datasets, recheck the paths you used.

My error consisted in not executing the preprocessing correctly and consequently my crop511 folder contained all empty folders.

i have the same problem my crop511 folder for ytb_vos contained all empty folders!! did you solve this problem ?!!

antdimarino commented 3 years ago

I also came across this error. Practically cv2.imread(search[2], 0) returns None when it does not find the image at the path contained in search[2]. Maybe you made a mistake in preprocessing the datasets, recheck the paths you used. My error consisted in not executing the preprocessing correctly and consequently my crop511 folder contained all empty folders.

i have the same problem my crop511 folder for ytb_vos contained all empty folders!! did you solve this problem ?!!

Have you already checked that you have entered all the paths correctly before starting the preprocessing?

ahmedosamaz commented 3 years ago

I also came across this error. Practically cv2.imread(search[2], 0) returns None when it does not find the image at the path contained in search[2]. Maybe you made a mistake in preprocessing the datasets, recheck the paths you used. My error consisted in not executing the preprocessing correctly and consequently my crop511 folder contained all empty folders.

i have the same problem my crop511 folder for ytb_vos contained all empty folders!! did you solve this problem ?!!

Have you already checked that you have entered all the paths correctly before starting the preprocessing?

Yes in (par_crop.py) in ytb_vos (https://github.com/foolwood/SiamMask/blob/master/data/ytb_vos/par_crop.py)

It need dataDir path and crop path and anno file path Its ouput is a crop511 folder contain train folder contain empty folders Could you help me?!