-
Notifications
You must be signed in to change notification settings - Fork 605
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
DeepSort tracking enhancements #4372
Conversation
WalkthroughThe recent updates to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Out of diff range and nitpick comments (1)
fiftyone/utils/tracking/deepsort.py (1)
25-25
: Class now explicitly inherits fromobject
, which is good practice in Python 2 but redundant in Python 3. Consider removing if Python 3 is the target.
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- fiftyone/utils/tracking/deepsort.py (2 hunks)
Additional comments not posted (6)
fiftyone/utils/tracking/deepsort.py (6)
10-10
: Ensure the new importeta.core.video as etav
is used appropriately in the file.
14-14
: Ensure the new importfiftyone.core.validation as fov
is used appropriately in the file.
28-60
: Review the changes in thetrack
method:
- Parameter
dataset
changed tosample_collection
to better reflect its functionality.- Added parameter
skip_failures=True
to allow users to choose whether to ignore errors during tracking.- Changed default value of parameter
progress
fromTrue
toFalse
to possibly streamline output and reduce clutter during processing.
66-69
: Validation functions are used to ensure the video collection and label fields are appropriate before tracking. This is a good practice to prevent runtime errors.
71-86
: The loop iterates over samples and applies tracking. Errors are handled based on theskip_failures
flag, and warnings are logged appropriately. This is a robust error handling strategy.
Line range hint
89-164
: Review the newtrack_sample
method:
- Performs object tracking on individual video samples.
- Uses
FFmpegVideoReader
for reading video frames, which is known for its robustness.- Properly handles bounding boxes and tracking, storing results in the specified output field.
- Conditionally stores confidence if
keep_confidence
is True.
This method enhances the granularity of tracking operations and is well-implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- fiftyone/utils/tracking/deepsort.py (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- fiftyone/utils/tracking/deepsort.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, and looks good. Solid enhancements! I'm seeing better performance with the FFmpegVideoReader than with cv2, and the frame field handling is cool, didn't realize we had that!
Change log
select_fields()
to optimize I/Oskip_failures=True/False
flagFFmpegVideoReader
for more robust/idiomatic video processingtrack_sample()
method for running tracking on individual samplesExample usage
Summary by CodeRabbit