yangxue0827 / RotationDetection

This is a tensorflow-based rotation detection benchmark, also called AlphaRotate.
https://rotationdetection.readthedocs.io/
Apache License 2.0
1.08k stars 183 forks source link

Cause error when testing SCRDET #44

Closed phunix9 closed 3 years ago

phunix9 commented 3 years ago

Hello, I succeed in training and testing several detectors such as RRPN, RSDET and R3DET

However, when I tried SCRDET, it caused error.

Traceback (most recent call last): File "test_hrsc2016.py", line 52, in tester.eval() File "test_hrsc2016.py", line 31, in eval image_ext=self.args.image_ext) File "../../tools/test_hrsc2016_base.py", line 81, in eval_with_plac input_img_batch=img_batch) ValueError: too many values to unpack (expected 3)

I don't know why and I can run test_hrsc2016.py successfully for RRPN, RSDET and R3DET

I can also run train.py successfully for SCRDET

Here is the code of test_hrsc2016.py Please help me, thank you!

screenshot

yangxue0827 commented 3 years ago

image

phunix9 commented 3 years ago

Thank you. I changed according to you, but it caused another error.

rotation eval: Writing spike VOC resutls file Traceback (most recent call last): File "test_hrsc2016.py", line 51, in tester.eval() File "test_hrsc2016.py", line 45, in eval test_annotation_path=self.args.test_annotation_path) File "../../libs/val_libs/voc_eval_r.py", line 312, in voc_evaluate_detections self.do_python_eval(test_imgid_list, test_annotation_path) File "../../libs/val_libs/voc_eval_r.py", line 277, in do_python_eval print("cls : {}|| Recall: {} || Precison: {}|| AP: {}".format(cls, recall[-1], precision[-1], AP)) IndexError: index -1 is out of bounds for axis 0 with size 0

error1

phunix9 commented 3 years ago

I am so sorry. It is my fault. I only trained for a few iterations before. Now I can test successfully.

Thank you very much!