You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS: Windows, running locally with GPU
SLEAP version: stable v1.0.10
Issue: I have trained a model and successfully used it to run inference over a single video using the GUI exclusively. However, I cannot seem to find a way to run inference over all videos in the project via the GUI. My sense from looking over docs and notebooks is that most users are doing this via the command line. If it doesn't exist already, in a future SLEAP release it would be awesome to have a "Predict on: All Project Videos" option in the following drop down menu:
For anyone else having this issue, here is an ugly, yet functional "batch.py" script that can be used to batch run your model over your videos. Note that batch.py should be placed in your project folder with all the videos you want it to run on.
Copy and paste the following into a text editor and save as "batch.py" in your working directory. Make sure to edit the script to point to the folder containing your model before running it.
##########
import os
import subprocess
subprocess.call('(for %i in (*.mp4) do sleap-track ''%i'' -m "models/210226_161753.single_instance.2819")', shell=True) ### CHANGE FOR SINGLE OR MULTI-ANIMAL MODEL
###########
In the shell:
cd /d /your/working/directory
conda activate sleap
batch.py
Hopefully someone finds this temp fix useful. If there is another (more elegant) way to batch run inference please let me know!
The text was updated successfully, but these errors were encountered:
HI @calebvogt,
Thanks for the feedback and for writing up this workaround that could also help other SLEAP.
We have a list of GUI improvements planned in our queue, and we'll also keep track of this enhancement request.
OS: Windows, running locally with GPU
SLEAP version: stable v1.0.10
Issue: I have trained a model and successfully used it to run inference over a single video using the GUI exclusively. However, I cannot seem to find a way to run inference over all videos in the project via the GUI. My sense from looking over docs and notebooks is that most users are doing this via the command line. If it doesn't exist already, in a future SLEAP release it would be awesome to have a "Predict on: All Project Videos" option in the following drop down menu:
For anyone else having this issue, here is an ugly, yet functional "batch.py" script that can be used to batch run your model over your videos. Note that batch.py should be placed in your project folder with all the videos you want it to run on.
Copy and paste the following into a text editor and save as "batch.py" in your working directory. Make sure to edit the script to point to the folder containing your model before running it.
##########
import os
import subprocess
subprocess.call('(for %i in (*.mp4) do sleap-track ''%i'' -m "models/210226_161753.single_instance.2819")', shell=True) ### CHANGE FOR SINGLE OR MULTI-ANIMAL MODEL
###########
In the shell:
Hopefully someone finds this temp fix useful. If there is another (more elegant) way to batch run inference please let me know!
The text was updated successfully, but these errors were encountered: