Batch Analysis using SLEAP CLI + GUI #754
Replies: 10 comments 1 reply
-
Hi @HaixinLiuNeuro, Glad you've been liking SLEAP! The simplest way to do that would be to just call Here's a quick bash script to do that on every .mp4 file without typing out the filenames individually: for video in path/to/videos/*.mp4
do
sleap-track -m "my/model" "$video"
done Just edit the command inside the loop if you have any additional parameters you need to add. Let me know if that works for you. Cheers, Talmo |
Beta Was this translation helpful? Give feedback.
-
Awesome! Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hello there, I am a beginning programmer and I am having trouble getting this bash script to work. Here is how I modified the code that you wrote and I keep getting the error "video unexpected at this time" for video in "E:\jacobE\psilocybin-HTR\output*.mp4"do sleap-track -m "E:\jacobE\psilocybin-HTR\predictions\models\second-run220425_131610.single_instance.n=142" "$video" done I have to run inference on about 50 videos and it would save me a ton of time if I could run inference on all of them continously. Also, this is for tracking a single animal if that changes anything. Thank you for the help. |
Beta Was this translation helpful? Give feedback.
-
Hi @jjbake, Assuming that the videos are stored in the
Let us know if that works - if not, another thing to try is to either change the direction of the slashes (use forward slashes instead of backslashes as bash treats backslashes as escape characters) or use single quotes instead of double quotes around your paths. Thanks, |
Beta Was this translation helpful? Give feedback.
-
I feel so silly. Fixing the dash on my directory worked. Thank you for your timely input. :) |
Beta Was this translation helpful? Give feedback.
-
We should add documentation for this on the website. |
Beta Was this translation helpful? Give feedback.
-
Hi, Is it possible to add the feature of Batch analysis to the GUI? Thanks for developing SLEAP! A. |
Beta Was this translation helpful? Give feedback.
-
Closing this one, but follow #733 for progress on this issue. |
Beta Was this translation helpful? Give feedback.
-
Hi, Sorry but I've been trying the solutions using the CLI (#497 and #668) and I'm not able to get working any of them. Thanks! A. |
Beta Was this translation helpful? Give feedback.
-
Hi @ARTUR551, We recently added a feature that allows inference on all videos in the project #733, #749. This feature is only on the develop branch for now, so you would need to install SLEAP from the source. The option to predict on "all videos" is what you are looking for. If you are still having trouble and/or still want to run the batch inference through the command line, I'll need a little bit more info before I can help. Do you mind providing the script you are trying to run and a description of the directory tree? Did you get any errors in the command line? Don't hesitate to ask! We are happy to help. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Dear SLEAP community,
I'm new to SLEAP and just found it is exceptionally good especially for mono color movies (whisper: better result with the same labelled data comparing to DLC!)
I'm trying to use the trained model to run batch analysis on HPC.
I read the 'Training and inference on an example dataset' notebook, where it calls a single video file, like .mp4.
I was wondering if I have a folder of .mp4 files, is it possible to ask SLEAP to run prediction on all the video files in that folder?
I read the function usage of sleap-track, I did not find a good answer (I might missed it)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions