sleap-export: AttributeError: 'CentroidCropGroundTruth' object has no attribute 'keras_model' #2102
-
I'm trying to export a centered instance model, but I get this error, but I get the following error: 2025-01-29 18:23:12.603623: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 I have tried from several computers. My sleap version is 1.4.1 and tensorflow version is 2.8.0 (although I also tried 2.7.0). Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @AgolovaUCL ! We won't be able to export a centered-instance model, because it needs the ground-truth centroids to crop the images. You could export a Let us know if you have any questions! Thanks, Divya |
Beta Was this translation helpful? Give feedback.
-
Thank you! I will try this.
…________________________________
From: DivyaSesh ***@***.***>
Sent: 30 January 2025 00:41
To: talmolab/sleap ***@***.***>
Cc: Golova, Sophia ***@***.***>; Mention ***@***.***>
Subject: Re: [talmolab/sleap] sleap-export: AttributeError: 'CentroidCropGroundTruth' object has no attribute 'keras_model' (Discussion #2102)
⚠ Caution: External sender
Hi @AgolovaUCL<https://github.com/AgolovaUCL> !
We won't be able to export a centered-instance model, because it needs the ground-truth centroids to crop the images. You could export a TopDown model with both centroid and centered-instance model, where the centroid model predicts the centroids of all instances in the image using which the images are cropped. The centered-instance model then predicts the keypoints in this cropped image.
You would be able to run inference (and get eval metrics) on just the centered-instance model, provided you have ground-truth data for centroids to crop the images. Sorry, we didn't explicitly mention in the sleap-export documentation, we just have it under the bonsai export guide<https://sleap.ai/guides/bonsai.html#top-down-model>.
Let us know if you have any questions!
Thanks,
Divya
—
Reply to this email directly, view it on GitHub<#2102 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5XPZKQY6PHUP6ZGFTHFFGL2NFYLJAVCNFSM6AAAAABWDQEZCOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBQGE2TCOI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi, I believe we're resolved it! Thank you, Divya.
…________________________________
From: DivyaSesh ***@***.***>
Sent: 30 January 2025 17:00
To: talmolab/sleap ***@***.***>
Cc: Golova, Sophia ***@***.***>; Mention ***@***.***>
Subject: Re: [talmolab/sleap] sleap-export: AttributeError: 'CentroidCropGroundTruth' object has no attribute 'keras_model' (Discussion #2102)
⚠ Caution: External sender
Hi @AgolovaUCL<https://github.com/AgolovaUCL> !
Are you training with the GUI? It should train both centroid and centered-instance models if we select multi-animal top-down pipeline as shown below. Could you let me know how you're training the models?
image.png (view on web)<https://github.com/user-attachments/assets/0a480b1b-7c0c-412b-b2e5-ad909e0b5f88>
Thanks,
Divya
—
Reply to this email directly, view it on GitHub<#2102 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5XPZKV4RJPM5TTXHTHZGAT2NJLDHAVCNFSM6AAAAABWDQEZCOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMBQHEYTINA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi @AgolovaUCL !
We won't be able to export a centered-instance model, because it needs the ground-truth centroids to crop the images. You could export a
TopDown
model with both centroid and centered-instance model, where the centroid model predicts the centroids of all instances in the image using which the images are cropped. The centered-instance model then predicts the keypoints in this cropped image.You would be able to run inference (and get eval metrics) on just the centered-instance model, provided you have ground-truth data for centroids to crop the images. Sorry, we didn't explicitly mention in the
sleap-export
documentation, we just have it under the bonsai export guide.Let u…