Giter VIP home page Giter VIP logo

Comments (7)

lambdaloop avatar lambdaloop commented on May 24, 2024

Hello! Thank you for filing this issue.

I'm guessing you have a line in your config.toml file which looks like

[calibration]
calibration_init = 'calibration_init.toml'

This is (currently) an undocumented feature which allows you to specify initial parameters for the calibration if you have a guess. It's not needed and you should be able to remove the line to use the automated parameter initialization.

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024

Hi @elhananby ,

Have you resolved this issue?

from anipose.

elhananby avatar elhananby commented on May 24, 2024

Hi Pierre, sorry for the very late response!
I took a small break from the specific project but recently tried to re-run it. I followed your advice and removed the line, however the current error I'm getting after running anipose --config [my config filename] calibrate is:

/home/elhanan_la/Videos/experiment/session1/calibration/calibration.toml
/home/elhanan_la/Videos/experiment/session1/calibration/cam0_calibrate_191029_151437.mp4
43 boards detected
/home/elhanan_la/Videos/experiment/session1/calibration/cam1_calibrate_191029_151437.mp4
61 boards detected
/home/elhanan_la/Videos/experiment/session1/calibration/cam2_calibrate_191029_151437.mp4
95 boards detected
defaultdict(<class 'int'>, {})
Traceback (most recent call last):
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/bin/anipose", line 8, in <module>
    sys.exit(cli())
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/anipose/anipose.py", line 108, in calibrate
    calibrate_all(config)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/anipose/common.py", line 168, in fun
    return process_all(config, process_session, **args)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/anipose/common.py", line 153, in process_all
    output[past_folders] = process_session(config, path, **args)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/anipose/calibrate.py", line 183, in process_session
    n_samp_iter=100, n_samp_full=2000)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/calligator/cameras.py", line 1555, in calibrate_rows
    rvecs, tvecs = get_initial_extrinsics(rtvecs)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/calligator/utils.py", line 174, in get_initial_extrinsics
    extrinsics = compute_camera_matrices(rtvecs, pairs)
  File "/home/elhanan_la/.conda/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/calligator/utils.py", line 164, in compute_camera_matrices
    source = pairs[0][0]
IndexError: list index out of range

From manually running the same videos through OpenCV board detection algorithms I know there are multiple frames where the boards are detected on at least two cameras, so I don't think it's an issue with lack of overlapping frames.

Best,
Elhanan

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024

Huh, that's strange. Could you share your calibration videos and config.toml file so I could reproduce the error?

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024

Looking over the error again, you seem to have very few boards detected, and it's possible there is no overlap between two cameras in those detections. Could it be that you mispecified your calibration board parameters?

from anipose.

elhananby avatar elhananby commented on May 24, 2024

Edit:
Ok, I've actually found the issue was with the camera name regex, which I didn't change from the default. the calibration seems to be working now!

I've ran it again on a longer video and got around 300 detections for each camera, and I still get the same error.
I have attached the calibration videos and my config file (which is mostly the default file, i'm just trying to get the calibration working now) via Google drive:
https://drive.google.com/drive/folders/1lfZFQfoNs-mEefIr1B0XiZD76Y2VmrG4?usp=sharing

from anipose.

lambdaloop avatar lambdaloop commented on May 24, 2024

That's great! I'm glad you got it to work!
I will close this issue then.

Feel free to open another issue if you get another problem!

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.