Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in running the COVID19-L3-NET code #5

Open
EL-Bakkali-Jaafar opened this issue Sep 4, 2021 · 1 comment
Open

Problem in running the COVID19-L3-NET code #5

EL-Bakkali-Jaafar opened this issue Sep 4, 2021 · 1 comment

Comments

@EL-Bakkali-Jaafar
Copy link

Hello everyone,

I got the following message error when trying to start COVID19-L3-NET code
python3 trainval.py -e open_source_pspnet -d L3netDemoData -sb ./outputs -r 1
widgets not available...
widgets not available...
widgets not available...
widgets not available...
widgets not available...
widgets not available...
{'batch_size': 1,
'dataset': {'name': 'open_source', 'transform': 'basic', 'transform_mode': 3},
'dataset_size': {'train': 'all', 'val': 'all'},
'lr': 1e-05,
'max_epoch': 100,
'model': {'base': 'pspnet',
'encoder': 'inceptionresnetv2',
'loss': 'dice',
'name': 'semseg'},
'num_channels': 1,
'optimizer': 'adam'}
Experiment saved in ./outputs/790f889274d37c4312d9e83020e835ed
100%|████████████████████████████████████████| 829/829 [00:04<00:00, 186.34it/s]
Starting experiment at epoch 0
Training: 0%| | 0/146 [00:00<?, ?it/s]Traceback (most recent call last):
File "trainval.py", line 178, in
trainval(exp_dict=exp_dict,
File "trainval.py", line 106, in trainval
train_dict = model.train_on_loader(train_loader)
File "/home/elbakkali/COVID19-L3-Net-master/src/models/semseg.py", line 68, in train_on_loader
for batch in train_loader:
File "/home/elbakkali/.local/lib/python3.8/site-waspackages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/home/elbakkali/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/elbakkali/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/elbakkali/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/elbakkali/COVID19-L3-Net-master/src/datasets/open_source.py", line 78, in getitem
lung_mask = np.array(Image.open(os.path.join(self.lung_path,
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2809, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'L3netDemoData/LungMasks/L3netDemoData/LungMasks/8_z031.png'

Any advice ?
Thanks

@IssamLaradji
Copy link
Contributor

Thanks for reporting this @EL-Bakkali-Jaafar! I have merged a change to the code that fixes this issue. Could you git pull the latest version and try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants