Giter VIP home page Giter VIP logo

Comments (10)

lambdaloop avatar lambdaloop commented on May 24, 2024 1

Hello @MMathisLab ,

Thank you for this detailed issue!

As you noticed, we have started revamping the documentation in preparation for an Anipose pre-print release and there is still much work to be done! In particular, you found our WIP Anipose tutorial and Calligator API.

Just so we're on the same page, there will be two options for users integrating their DLC models with anipose/calligator:

  1. Place their files into a folder structure that Anipose expects and process with the Anipose pipeline
  2. Write their own custom data processing by importing calligator and using the python functions directly

If they go with the first route, they would need help with:

  • placing their files into an Anipose structure
  • creating a minimal Anipose config.toml file
  • running commands from the terminal or within a Jupyter notebook

If they go with the second route, they would need:

  • better documentation on each of the calligator functions
  • some tutorial or example script of how to use the calligator functions by themselves

Is that right?

Please let me know if that makes sense, and if there are additional key improvements to the documentation that I missed.

from anipose.

MMathisLab avatar MMathisLab commented on May 24, 2024 1

That sounds exactly right to me, thanks! Please let us know if we can be helpful - we had lots of discussions on 3D options at the hack-a-thon, and Iā€™m sure some users would be happy to chip in testing workflows, esp path 2 seemed a highly preferable option :). Thanks again!

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024 1

Sounds good! It sounds like the most pressing missing thing is a Calligator tutorial then.
We'll put that together in the coming weeks!

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024 1

@SjoerdBruijn
I don't know Simi, but most tools (including Anipose) use the same camera model, so it's doable to translate across them. The calibration file for Anipose is a toml file, which you could write to based on your Simi parameters. Here's an example file:

[cam_0]
name = "54138969"
size = [ 1000, 1000,]
rotation = [ 0.4673375748186822, 2.173592643964762, -1.778427743746773,]
translation = [ -219.3059666108619, 544.4787497640639, 5518.740477016156,]
distortions = [ -0.207098910824901, 0.247775183068982, -0.00142447157470321, -0.000975698859470499, -0.00307515035078854,]
matrix = [ [ 1145.04940458804, 0.0, 512.541504956548,], [ 0.0, 1143.78109572365, 515.4514869776,], [ 0.0, 0.0, 1.0,],]

[cam_1]
name = "55011271"
size = [ 1000, 1000,]
rotation = [ 1.75656787919027, 0.3622445290737643, -0.2740327492410326,]
translation = [ 103.9028206775199, 395.6716946895197, 5767.97265758172,]
distortions = [ -0.194213629607385, 0.240408539138292, -0.0027408943961907, -0.001619026613787, 0.00681997559022603,]
matrix = [ [ 1149.67569986785, 0.0, 508.848621645943,], [ 0.0, 1147.59161666764, 508.064917088557,], [ 0.0, 0.0, 1.0,],]

Similarly, if you use calligator (now renamed to anipose-lib), you can create a CameraGroup object and update the parameters by calling the appropriate functions.

When converting calibration parameters across systems in the past, the main issue that I found has been the rotation and translation parameters, which may be in a different format.
Anipose uses the OpenCV format for calibration parameters, with rotation specified as an axis rotation vector (can be converted to/from matrix using the Rodrigues function).

from anipose.

SjoerdBruijn avatar SjoerdBruijn commented on May 24, 2024

OK, don't know if this is the right place to ask, but seems my question is highly related. We have data collected with Simi, which doesnt do a good job in labelling (or even 3d reconstructing) the data (actually, it's horrible). We are now thinking of going the anipose/DLC route. Since we have the calibration for the camera's already (was done using simi softwar, this part is still kind of OK, we have all the necesary transforms etc), could we use these calibrations with data that was labelled in DLC? (we could use anipose for the calibration as well, but we don't have checkerboard calibration for each measurement, only with a wand)

It would seem that setting these camera parameters (via calligator set_camera_matrix(matrix)), and then using triangulate would work?
Any answer is highly appreciated. I understand from the above that you are working on the documentation etc, but I would just like to get an idea if the way I'm thinking is going to work, or if it is going to require excessive amounts of rewriting stuff....
Thanks,
Sjoerd

from anipose.

MMathisLab avatar MMathisLab commented on May 24, 2024

in case useful, I don't know simi, but here is helper code for wand-based calibration: https://github.com/DeepLabCut/DLCutils i.e. see https://github.com/DeepLabCut/DLCutils#3d-reconstruction-with-easywandargus-dlt-system-with-deeplabcut-data

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024

@SjoerdBruijn
If you figure out how to convert calibration formats from Simi to Anipose, let me know and we can make a tutorial on that together in the Anipose docs.

from anipose.

SjoerdBruijn avatar SjoerdBruijn commented on May 24, 2024

Tnx for all the suggestions. I think this will work; I have the data in the attached screenshots (still working on finding where this is stored in the simi software). Looks like all we need, right?
We will start working on it, and of course are happy to help in making a tutorial so that others can follow our workflow.

calibration validation -3
calibration validation - 2

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024

@SjoerdBruijn that looks great! It seems that there is enough information there, and the parameters look similar to the OpenCV ones so it's probably the same camera model.
I think the next step would be to figure how to easily export the numbers for all cameras for easy conversion.

To make the Simi conversion more visible to other users (and also keep this issue conversation focused), I've made a separate issue here for this case: #18

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024

Closing this as the documentation has changed quite a bit since this was written.

from anipose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.