-
Notifications
You must be signed in to change notification settings - Fork 7
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
Changing some code can speed up evaluating in test time. #7
Comments
We greatly appreciate your insightful recommendations for enhancing the project's code. We are committed to incorporating your valuable suggestions by making updates to the code to bolster the speed and stability of testing procedures. Again, we extend our heartfelt gratitude for your constructive insights. |
@Songyeyaosong hello!Thanks for providing some codes for speed up the test phase. However, when I try to follow your codes about speed up the iou computing, some error report: "File "/home/anaconda3/envs/openmmlab/lib/python3.9/site-packages/mmcv/ops/box_iou_rotated.py", line 144, in box_iou_rotated Do you encouter this issue before? |
This error happens after replacing ious = box_iou_rotated( to ious = box_iou_rotated( |
Hello! I did not encouter this issue before. Maybe you can try my pytorch and python version. My version is python3.8 and pytorch1.17.1+cu117 :). I'm sorry I can't provide some help on this issue. |
@Songyeyaosong Hello! I have searched the PyTorch official website(https://pytorch.org/get-started/previous-versions/) for the specific version you mentioned, but unfortunately, I couldn't find it. If you have any alternative suggestions or sources where I might locate this version, please let me know. Your assistance in this matter is greatly appreciated. |
try this: |
Hello, thank you for your code! When I used it, I found that the evaluation results were quite different from those provided in the soda paper. Does this happen to you? for example, when i use oriented-rcnn, get Aps {'mAP_AP': 0.398, 'mAP_AP_50': 0.813, 'mAP_AP_75': 0.324, 'mAP_AP_eS': 0.635, 'mAP_AP_rS': 0.59, 'mAP_AP_gS': 0.555, 'mAP_AP_Normal': 0.636, 'mAP_mAP_copypaste': '0.398 0.813 0.324 0.635 0.590 0.555 0.636 '}, but in soda paper reports APs{34.4 70.7 28.6 12.5 28.6 44.5 36.7} |
Hi, did you apply any other tricks, such as multi-scale training/testing and data augmentation, to get a mAP of 39.8? And why did you get better performance for eS objects than gS objects? |
No, I just run orient-rcnn provided in SODA code, and change the evaluate code with "Songyeyaosong" provide (in this issue). I found the question and i asked for help. |
What's the feature?
Hi, I've had the problems with long test time. So I changed some code to solve this problem. Hope this is useful to someone facing a same problem.
In mmrotate/datasets/sodaa.py at line 520 to line 522:
I changed it to this:
This will use the gpu to speed up merging.
In mmrotate/datasets/sodda_eval/sodaa_eval.py at line 262 to line 265:
I changed it to this:
This will also use the gpu to speed up the iou computing.
And if you want to make it more faster, you can change the metric settings such as iouThrs and areRng to only evaluate the metrics that you want.
For example, if you set the areRng to [[0, 1000000]], which means all areas will be evaluated. At this time you can change the evaluateImg function to:
Because at this time all the bboxes and gts can be used to evaluate, so you can discard the for loop and use numpy and pandas to speed up the evaluation.
I also find that using 1 nproc is the fastest to evaluate results. And when using 1 nproc, evaluating can be done in a very short amount of time like 10 seconds.
But if you want to use multiple nproc to evaluate results, considering that the source code does not implement multiple nproc for iou computation, you can make these changes.
In mmrotate/datasets/sodda_eval/sodaa_eval.py at line 179 to line 180:
If you want to use mutiple nproc to evaluate, you can change it to this:
Hope this will be helpful for you :)
Any other context?
No response
The text was updated successfully, but these errors were encountered: