fizyr / keras-retinanet

Keras implementation of RetinaNet object detection.
Apache License 2.0
4.38k stars 1.96k forks source link

RetinaNet not detecting all instance of target class #1045

Closed zerovirus123 closed 5 years ago

zerovirus123 commented 5 years ago

Hello all,

I am training RetinaNet to detect tree crowns in aerial photos. I am working on a dataset with 3100 annotated images, of size 224x224. There is only class to be detected (palm tree).

1-P17B

The classification loss drops much quicker than the regression loss, which I suppose is normal given that I only have one target class.

training_rate

However, my model missed out on a lot of target class instances during inference, as shown below.

result1 result2

My colleague suggested that there is something wrong with the classification part of the model, since there are a lot of false negatives. I think that the regression part is fine, since the trees can be localized fairly well. Another thing to note is that there are repeated bounding boxes drawn on target object. Which files should I modify to tune the NMS?

Are there hyperparameters that I should tune? I added Spatial2DDropout layers in the classification model. It slows down the cross entropy loss decrease, but does not improve the result much. I would only tune alpha and gamma if the other hyperparameters do not work, since the original authors have already fine tuned those two parameters.

hgaiser commented 5 years ago

Closing this as it is not an issue with the code.

That said, try updating tensorflow to the latest version to see if that makes a difference. I've seen it make quite an impact in the past.

EDIT: ps. try the keras-retinanet Slack channel for usage questions, as described in the README.md

mariaculman18 commented 5 years ago

Hi @zerovirus123, did the update of TensorFlow to the latest version worked for you?