SainsburyWellcomeCentre / crabs-exploration

A toolkit for detecting and tracking crabs in the field.
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Add flag to omit timestamp in output directory #253

Closed sfmig closed 2 days ago

sfmig commented 1 week ago

Description

What is this PR?

Why is this PR needed? At the moment each run of the command detect-and-track will generate a timestamped directory for the outputs (csv with detections and optionally frames and tracked video).

If we use a bash script to run this command over a set of videos (as we do in the cluster, see #251), we create one timestamped output directory per video, which is inconvenient and confusing.

An easy way to put all outputs from a set of videos under the same directory is to optionally remove the timestamp suffix that is applied by default to each output directory.

What does this PR do?

References

Another option could be for the user to be responsible of specifying the full path to the output directory. This is covered in #246. I opted for this option for now, to keep in line with the model evaluation script and the save_frames and frames_output_dir flags, but this can be reviewed in the future.

How has this PR been tested?

Tests pass locally and in CI.

Does this PR require an update to the documentation?

A comment about the new flag has been added to the README.

Checklist:

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.98%. Comparing base (c3e653d) to head (82df997).

Files with missing lines Patch % Lines
crabs/tracker/track_video.py 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #253 +/- ## ========================================== + Coverage 47.76% 47.98% +0.22% ========================================== Files 24 24 Lines 1564 1567 +3 ========================================== + Hits 747 752 +5 + Misses 817 815 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: