ExplainableML / czsl

PyTorch CZSL framework containing GQA, the open-world setting, and the CGE and CompCos methods.
GNU General Public License v3.0
111 stars 27 forks source link

FileNotFoundError: [Errno 2] No such file or directory #37

Open Rxx01 opened 1 year ago

Rxx01 commented 1 year ago

when i run :

python train.py --config configs/compcos/mit/compcos_cw.yml 

in windows, cannot find the house-design-exterior-ancient-greek-temple-views-portrait-with-characteristics-of-greek-architecture-designs-great-ancient-building-with-characteristics-of-greek-architecture-designs-600x480.jpg The image is clearly in the folder, but it cannot be found.Could it be that the filename is too long?

Traceback (most recent call last): File "C:\Users\rxx\Desktop\czsl-main\train.py", line 232, in main() File "C:\Users\rxx\Desktop\czsl-main\train.py", line 38, in main trainset = dset.CompositionDataset( File "C:\Users\rxx\Desktop\czsl-main\data\dataset.py", line 204, in init self.generate_features(feat_file, model) File "C:\Users\rxx\Desktop\czsl-main\data\dataset.py", line 404, in generate_features imgs = list(map(self.loader, files)) File "C:\Users\rxx\Desktop\czsl-main\data\dataset.py", line 25, in call img = Image.open(ospj(self.root_dir,img)).convert('RGB') #We don't want alpha File "C:\Users\rxx.conda\envs\test\lib\site-packages\PIL\Image.py", line 3218, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'DataBase\mit-states\images\ancient_building\house-design-exterior-ancient-greek-temple-views-portrait-with-characteristics-of-greek-architecture-designs-great-ancient-building-with-characteristics-of-greek-architecture-designs-600x480.jpg'