-
Notifications
You must be signed in to change notification settings - Fork 0
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
Run Inference on cluster #189
base: main
Are you sure you want to change the base?
Conversation
nikk-nikaznan
commented
Jun 21, 2024
•
edited
Loading
edited
- Bash scripts to run tracking on single video Run inference on the cluster #186
- Bash script to loop over all escape events for Produce tracking csv files for escape events #213
- Guide on how to run tracker on cluster
- Have tested this on cluster pointed to this branch, these bash scripts have been edited to pointed back to main
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.
thanks @nikk-nikaznan and sorry for the delay!
Just two small suggestions.
The first one is to infer whether the path to the videos is a file or a directory from the path itself, rather than passing that with an extra CLI argument. We can do this easily with pathlib
's is_dir()
or is_file()
.
The second suggestion is to keep the same output filenaming approach if we pass a directory of videos or a single video as input. Right now, if we pass a directory of videos, the output tracked videos are in a directory which is not timestamped. This is different to the behaviour when we pass a single video and will also overwrite the data if we run the command twice. I gave a suggestion in the comments.
If you have time to implement these changes that would be great! If not let me know and I will do it no problem.
GIT_BRANCH=main | ||
|
||
# Check if the target is not a directory | ||
if [ ! -d "$VIDEO_DIR" ]; then |
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.
nice! ✨
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.
I like this one! ✨
Maybe going forwards I can combine them to read a dir or a single video, but this is a great starting point
crabs/tracker/track_video.py
Outdated
@@ -299,6 +308,11 @@ def tracking_parse_args(args): | |||
action="store_true", | |||
help="Save frame to be used in correcting track labelling", | |||
) | |||
parser.add_argument( |
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.
Maybe instead of an additional CLI argument saying if the input is a directory or not, we could derive it from the path.
We can do this with is_dir()
and is_file()
from Pathlib
(example here)
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.
@sfmig Just comeback to this. The directory is in the bash, we only pass each video path as args. I am not quite sure what's the best way to do unless we want to do the loop of the bash in the code. But doesn't seem to be neater
Co-authored-by: sfmig <[email protected]> Signed-off-by: nikk-nikaznan <[email protected]>
…meCentre/crabs-exploration into nikkna/inference_cluster
Co-authored-by: sfmig <[email protected]> Signed-off-by: nikk-nikaznan <[email protected]>