lightning-kitti icon indicating copy to clipboard operation
lightning-kitti copied to clipboard

Number of classes should be 1 more than the number of valid classes

Open aditya-anulekh opened this issue 1 year ago • 1 comments

Shouldn't the number of classes be one more than the length of DEFAULT_VALID_LABELS to account for background class as well?

https://github.com/borisdayma/lightning-kitti/blob/fece8f080a32af25fb4b76c7d08bde6e55e2e36f/train.py#L19

https://github.com/borisdayma/lightning-kitti/blob/fece8f080a32af25fb4b76c7d08bde6e55e2e36f/train.py#L149

Consider the case where you have just one class that you want to detect. In this case, if the num_classes is 1, then the model would always predict that class irrespective of whether it is a background pixel or a pixel we wish to detect.

Please let me know if I'm thinking in the right direction here. I can open a PR if required.

aditya-anulekh avatar Mar 21 '23 21:03 aditya-anulekh

@borisdayma Any update on this?

aditya-anulekh avatar Apr 17 '23 17:04 aditya-anulekh