mjq11302010044 / RRPN_pytorch

RRPN in pytorch 1.0 ----- Arbitrary-Oriented Scene Text Detection via Rotation Proposals
MIT License
262 stars 56 forks source link

Train loss for IC15 is always nan #64

Open xyqqqfs opened 2 years ago

xyqqqfs commented 2 years ago

Hello. When I use "e2e_rrpn_R_50_C4_1x_ICDAR13_15_trial.yaml" to train IC15 data , I found that loss_objectness and loss_rpn_box_reg is always nan. I have tried to reduce base_lr to 0.0001 but it didn't work. Does anyone know how to fix it? Thanks!

sjtuherisson commented 1 year ago

have u solved this problem ?

sjtuherisson commented 1 year ago

have u solved this problem ?

In my case,it caused a UserWarning 'indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. ' which in 'maskrcnn_benchmark/modeling/rrpn/loss.py:62' and i modify the code 'labels_per_image[~anchors_per_image.get_field("visibility")] = -1' to 'labels_per_image[~anchors_per_image.get_field("visibility").bool()] = -1' then figure out the NaN issue. my env : python3.8 + pytorch1.6 + torchvison0.8 + cuda10.2 FYI