-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Master obb #1791
base: master
Are you sure you want to change the base?
Master obb #1791
Conversation
…b string to match AssociationFunction.ASSO_FUNCS
…od way should be to decorate the method to handle dets[idx] args
… doing differently
Great job here @LilBabines! I would like to add some tests before merging this first version. Do you know if a obb tracking dataset exists? I think KITTI could be projected to the ground plane but that will require quite a lot of work. Would you be okay if I used the data you provided for the tests? |
I believe it does make sense to check wether the len of each prediction is 7 and activate the obb tracker version based on this? |
Hey @mikel-brostrom ! I don’t know of or use any public OBB dataset. I can try to find one to add a case study. I'll send a data sample once the upload is complete so you can test whatever you want for the OBB tracker. The OBB-tracker version and the Tracker version are quite similar, which is why I tried to create an adaptive class. However, I think it makes sense to separate them, as it will also help clarify the code. |
FileSender, images + labels predictions. |
We could just do something similar as in here: boxmot/tests/unit/test_trackers.py Lines 138 to 160 in 7f5dcea
but for obb. Let me know if you would be interested in adding this as well 😄 under |
Yes, of course! I can perform some tests for obb and add them under |
Nice 😄 |
I propose an adaptation of OCSort to handle Oriented Bounding Boxes (OBB).
The bounding box (Bbox) format for the Kalman Filter is:
c_x, c_y, w, h, angle
.All modifications are controlled by the
OcSort.is_obb
attribute. To enable OBB functionality, simply passis_obb=True
during the initialization of the OcSort tracker.Main Modifications:
KalmanBoxTrackerOBB Class
KalmanBoxTrackerOBB
is created based on theKalmanBoxTracker
.KalmanFilterXYWHA
, which extendsKalmanFilterXYSR
.BaseTracker Updates
is_obb
attribute to handle OBB-specific logic.asso_func_name
:BaseTracker.check_inputs()
method to validate OBB inputs. OBB has 7 dimensions:c_x, c_y, w, h, angle, conf, cls
(compared to 6 for standard bounding boxes).OcSORT Updates
OcSORT.update()
to handle the additional OBB dimension:dets[:, idx + self.is_obb]
.KalmanBoxTrackerOBB
andKalmanBoxTracker
based onself.is_obb
.Association Functions
AssociationFunction
:iou_batch_obb
centroid_batch_obb
iou_batch_obb
function relies on an external helper functioniou_obb_pair
. This implementation could be improved for better integration.Other Changes
k_previous_obs()
to include a newis_obb
argument.speed_direction_obb()
function used byKalmanBoxTrackerOBB
.