facebookresearch / ov-seg

This is the official PyTorch implementation of the paper Open-Vocabulary Semantic Segmentation with Mask-adapted CLIP.
Other
676 stars 61 forks source link

Finetuning CLIP #19

Closed BKINGING closed 11 months ago

BKINGING commented 11 months ago

bash /media/hubu/Data1/202131116023006_bky/ov-seg-main/open_clip_training/src/scripts/coco_gt_171cls_finetune_VitL.sh 2023-10-01,13:03:34 | INFO | Running with a single process. Device cuda:0. 2023-10-01,13:03:34 | INFO | Loading pretrained ViT-L-14 from OpenAI. 2023-10-01,13:03:45 | INFO | Model: 2023-10-01,13:05:35 | INFO | Finished zero-shot imagenet. 2023-10-01,13:05:35 | INFO | Eval Epoch: 0 ade150-zeroshot-val-top1: 0.2742 ade150-zeroshot-val-top5: 0.5465 2023-10-01,13:05:35 | INFO | Start epoch 0 Traceback (most recent call last): File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/media/hubu/Data1/202131116023006_bky/ov-seg-main/open_clip_training/src/training/main.py", line 320, in main() File "/media/hubu/Data1/202131116023006_bky/ov-seg-main/open_clip_training/src/training/main.py", line 268, in main train_one_epoch(model, data, epoch, optimizer, scaler, scheduler, ema, args, writer) File "/media/hubu/Data1/202131116023006_bky/ov-seg-main/open_clip_training/src/training/train.py", line 69, in train_one_epoch for i, batch in enumerate(dataloader): File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/torch/_utils.py", line 434, in reraise raise exception FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/media/hubu/Data1/202131116023006_bky/ov-seg-main/open_clip_training/src/training/data.py", line 47, in getitem images = self.transforms(Image.open(str(self.images[idx]))) File "/home/hubu/anaconda3/envs/bpy38/lib/python3.8/site-packages/PIL/Image.py", line 3236, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'coco_gt_171cls/2/000000129379.jpg'

This photo is in the dataset, but the error can't be found, and some other photos can be found。

Jeff-LiangF commented 11 months ago

Hi @BKINGING , Could you please double-check if the path of the image is correct, or the dataset is downloaded correctly. If the error still exists, you may want to delete some corrupted samples in the dataset.

I closed this issue. Feel free to reopen it if you have further questions.