-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Training centered_instance model with input_scaling < 1.0 #1993
Comments
Hi! (I also worked with autocrop, tried changing that, scaling the input and it still didn't work.)
...
|
Hi @BenjaminBo, We are working to fix this. In the mean time, what happens when you only use input scaling for the centroid model? """ The centroid model will always result in cropping around the animal instance. Are the features on your animal very small compared to the animal itself? This would be the only time when the centered-instance model needs input scaling < 1. Best, Elizabeth |
Bug description
I am training the topdown model remotely on a cluster server, since I don't have a local GPU to properly train a sleap model on.
My videos are pretty high in dimensionalilty (2160, 3840, 3), not allowing me to train in their original size. Which brings me to the
input_size
parameter:For the centroid model everything works fine. I can set the input scale to <1.0 and it runs without issues.
Running the centered_instance model though, is when I get the following error (here with
input_scale = 0.4
):This is interesting, because the non-scaled input size, with
auto_crop
on, is 3840.Assumption 1
What seems to be happening is that
input_scaling
is applied twice, since3840 * 0,4 = 1536 and
1536 * 0,4 = 614 (rounded).
So I try to find the section where it is applied repetitively.
Following the error message above I looked at the following code section in #sleap/nn/training.py, line 1315-1340:
, more specifically:
Assumption 2
This might be the section that applies the scaling factor repetitively.
It also seems to be "less relevant", since I understand it to be a section handling visualization only.
I adjust line 1318 in the following way:
As opposed to before, the training runs through now. But I get the following error next:
This is where I get confused.
This suggest that the section before might've not only been handling visual issues? Or that the problem runs deeper? But the error above only happens after training, not in between epochs.
At this point there, must've been images from both the training- and validation-set of size 1536 running through the model, unless I understand something wrong. Why did I not get errors then? Also: are the assumptions that I made above incorrect?
Scaling
Also at this point I am not sure if I am addressing my core issue. I want to scale the input data down. I do not want to crop it (which works with an input_scale of 1.0). The reason being that I need all of the information in the frames.
input_scaling
. I will try to further understand the error above and maybe adjust your code in a way to make it work for me, but I am not sure if I can. Can you help me with the issues that I described above?Labels()
-object. My problem is that I am a bit overwhelmed and not quite sure where to start, since the object looks like this:Meaning, there are quite a few attributes in this object, some containing frames, instances and bounding_boxes. I am just not sure which I'd have to scale and which I shouldn't touch. Do you have a function/ a simpler way for me to use to scale the dataset?
3. There doesn't seem to be a way to scale the data in sleap-label (which is where I created my ground truth and where I created and exported my dataset). I want to avoid to go all the way back to the original videos and scale them down, because I'd have to relable all of the hundreds of instances I have now.
The text was updated successfully, but these errors were encountered: