-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @Kagiro-K, SLEAP uses the Can you try putting quotes around the Can you also add a try, except block around the try:
!sleap-track "{file_path}" # Add the rest of your command
except Exception as e:
print(f"filepath: {file_path}")
raise e This will let us know what the Let us know how it goes. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your response!
Adding the quotations seemed to do the trick! It's unusual because my file names did not have any spaces. But I also moved the trained model into the same folder as the videos, instead of having those files in a subfolder.
This will greatly speed things up in CoLab where I can train, update labels locally, and continue to improve the model.
Thank you!
I really appreciate the speedy response!
…________________________________
From: Liezl Maree ***@***.***>
Sent: Tuesday, June 20, 2023 5:50 PM
To: talmolab/sleap ***@***.***>
Cc: Harmain Rafi ***@***.***>; Mention ***@***.***>
Subject: Re: [talmolab/sleap] Batch Labeling Videos in CoLab (Discussion #1356)
Hi @Kagiro-K<https://urldefense.com/v3/__https://github.com/Kagiro-K__;!!IaT_gp1N!3lRFlQYZl6ZaYVVRttDUii5w3O-2_Fzg0X93U3rcJy4HgpOKJRrENqJNXjHqQQDp5QJOCGFCLsKKlCgND3NAeJqVfnzVlw$>,
SLEAP uses the from_filename method from the Video class to determine what the backend type should be (i.e. MediaVideo for mp4/avi). We should really also print the "specified filename" in the ValueError.... My guess would be that your filename might have a space which would then be parsed in as multiple arguments.
Can you try putting quotes around the {file_path} s.t. you call sleap-track "{file_path}". If spaces are the problem, then this will ensure that the spaces do not separate your filepath into multiple arguments.
Can you also add a try, except block around the sleap-track command to print the filename (which we should be printing for you in the ValueError, but are not at the moment):
try:
!sleap-track "{file_path}" # Add the rest of your command
except Exception as e:
print(f"filepath: {file_path}")
raise e
This will let us know what the file_path is (only if the command errors out) and give us some insight into why it is causing problems.
Let us know how it goes.
Thanks,
Liezl
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/talmolab/sleap/discussions/1356*discussioncomment-6235526__;Iw!!IaT_gp1N!3lRFlQYZl6ZaYVVRttDUii5w3O-2_Fzg0X93U3rcJy4HgpOKJRrENqJNXjHqQQDp5QJOCGFCLsKKlCgND3NAeJoUxSdRKQ$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/A6IXUSPCRC5VO424FNDKH43XMILLFANCNFSM6AAAAAAZJ5NKPM__;!!IaT_gp1N!3lRFlQYZl6ZaYVVRttDUii5w3O-2_Fzg0X93U3rcJy4HgpOKJRrENqJNXjHqQQDp5QJOCGFCLsKKlCgND3NAeJotb8-sOw$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi @Kagiro-K,
SLEAP uses the
from_filename
method from theVideo
class to determine what the backend type should be (i.e.MediaVideo
for mp4/avi). We should really also print the "specified filename" in theValueError
.... My guess would be that your filename might have a space which would then be parsed in as multiple arguments.Can you try putting quotes around the
{file_path}
s.t. you callsleap-track "{file_path}"
. If spaces are the problem, then this will ensure that the spaces do not separate your filepath into multiple arguments.Can you also add a try, except block around the
sleap-track
command to print the filename (which we should be printing for you in theValueError
, but are n…