doubleheadsrcnn icon indicating copy to clipboard operation
doubleheadsrcnn copied to clipboard

Regreesion and Classification Heads in Code

Open SamihaSara opened this issue 4 years ago • 3 comments

Could you please advise where in this project I can find the classification and regression heads? How the regression head gets bounding box coordinates as inputs to regress the object's bounding box coordinates in the next frame.

SamihaSara avatar Jun 04 '21 15:06 SamihaSara

@SamihaSara

Heads are at https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py.

For the second question, that's a general process in object detection. Check this function: https://github.com/wuyuebupt/doubleheadsrcnn/blob/a744b4121d52935741f49d845bae7878270ea291/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py#L52

wuyuebupt avatar Jun 05 '21 18:06 wuyuebupt

@wuyuebupt If I want to add a new field in annotation and regress it. input will be bounding box coordinates, and I have to regress this score ranging from 0 to 1. Could you please suggest which files I will need to modify for that? This operation is similar to bounding box regression. Thanks.

SamihaSara avatar Jun 11 '21 03:06 SamihaSara

@SamihaSara

In my understanding, you will need to modify, data loader, head strucutre and loss.

For data loader, https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/maskrcnn_benchmark/data/datasets/coco.py#L39

For head strucutre, https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py

For loss, https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/maskrcnn_benchmark/modeling/roi_heads/box_head/inference.py https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py

Hope these help.

wuyuebupt avatar Dec 02 '21 18:12 wuyuebupt