-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Fix] Fix SegTTAModel with no attribute '_gt_sem_seg' error #3152
Conversation
When using the - tta command for multi-scale prediction, and the test set is not annotated, although format_only has been set true in test_evaluator, but SegTTAModel class still threw error 'AttributeError: 'SegDataSample' object has no attribute '_gt_sem_seg''. The reason is SegTTAModel didn't determine if there were annotations in the dataset, so I added the code to make the judgment and let the program run normally on my computer.
I also encountered this bug.I changed the code with this method, but I can't see the progress bar now. envs/openmmlab/lib/python3.8/site-packages/mmengine/structures/pixel_data.py:83: UserWarning: The shape of value will convert from torch.Size([998, 998]) to torch.Size([1, 998, 998]) |
I would add that I can still see the progress bar.It is because there are too many warnings……
|
I haven't encountered this problem, perhaps you can try increasing the zoom ratio in tta_pipeline to avoid the image being too small. |
Hi @ZiAn-Su, |
|
Update and remove unnecessary code
Modify format
The new PR has been submitted. 😀 |
…ab#3152) ## Motivation When using the - tta command for multi-scale prediction, and the test set is not annotated, although format_only has been set true in test_evaluator, but SegTTAModel class still threw error 'AttributeError: 'SegDataSample' object has no attribute '_gt_sem_seg''. ## Modification The reason is SegTTAModel didn't determine if there were annotations in the dataset, so I added the code to make the judgment and let the program run normally on my computer.
Motivation
When using the - tta command for multi-scale prediction, and the test set is not annotated, although format_only has been set true in test_evaluator, but SegTTAModel class still threw error 'AttributeError: 'SegDataSample' object has no attribute '_gt_sem_seg''.
Modification
The reason is SegTTAModel didn't determine if there were annotations in the dataset, so I added the code to make the judgment and let the program run normally on my computer.