lck1201 / win_det_heatmaps

Window Detection in Facade Using Heatmaps Fushion
MIT License
48 stars 18 forks source link

Training crashes at 118 epochs #4

Closed r-213 closed 2 years ago

r-213 commented 3 years ago

Hello, when I run the training script and use the training data you provided, the script crashes at 118 epochs with the error message of "Assertion error: (1, index error('too many indices for array: array is 1-dimensional but 2 were indexed') as seen below. Can you please tell me what is the cause of this and how it can be fixed? Thank you error

lck1201 commented 3 years ago

Does infer.py work well?

r-213 commented 3 years ago

Infer.py works well. And now the training code works as well- when I put all the data it works.

In reference to enhancing detection, can an extra class label for walls be added (and annotated in the labelled data)? Does the current architecture allow for this addition?

lck1201 commented 3 years ago

Of course. But I'm not sure whether window/wall/door detecion can be done in one branch(or network). Maybe you can try multi-branch or other customized architecture.

arelav99 commented 3 years ago

The same thing happens to me during inference, it seems like function get_coords_from_heatmaps_with_NMS doesn't always find peaks and returns arrays with shape (0,), which causes the error.

lck1201 commented 3 years ago

It depends on training policy and data quality to learn heatmap peaks. Maybe you can try focal loss and add sigmoid after heatmap outputs. See https://github.com/xingyizhou/CenterNet/blob/master/src/lib/models/networks/msra_resnet.py https://github.com/xingyizhou/CenterNet/blob/master/src/lib/models/losses.py#L114