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

Error during training on the Pascal3D #2

Open
cresc134 opened this issue Sep 26, 2022 · 0 comments
Open

Error during training on the Pascal3D #2

cresc134 opened this issue Sep 26, 2022 · 0 comments

Comments

@cresc134
Copy link

Hi,

Great work! I can run the test code using the pretrained model on Pix3D dataset. However, there is one error of "ValueError: Coordinate 'right' is less than 'left'" when I train the model on the Pascal3D dataset. Details can be found below:

Traceback (most recent call last):
File "xx/PoseContrast/src/train.py", line 216, in
train_loss, train_acc = train(logger, train_loader, net_feat, net_vp, optimizer_feat, optimizer_vp)
File "xx/PoseContrast/src/train.py", line 142, in train
for i, data in enumerate(data_loader):
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 681, in next
data = self._next_data()
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1376, in _next_data
return self._process_data(data)
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1402, in _process_data
data.reraise()
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/torch/_utils.py", line 461, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 1.
Original Traceback (most recent call last):
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "xx/PoseContrast/src/dataset/vp_data.py", line 138, in getitem
im = random_crop(im, left, upper, right - left, lower - upper)
File "xx/PoseContrast/src/dataset/data_utils.py", line 63, in random_crop
im_crop = im.crop((left, upper, right, lower))
File "xx/anaconda3/envs/PoseContrast/lib/python3.10/site-packages/PIL/Image.py", line 1171, in crop
raise ValueError("Coordinate 'right' is less than 'left'")
ValueError: Coordinate 'right' is less than 'left'

I tried to debug this issue and found that there are few annotations larger than the image size. One sample can be found below:

bug

May I get your help to fix this issue? Thanks!

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

1 participant