pupil-labs / pupil

Open source eye tracking
https://pupil-labs.com
GNU Lesser General Public License v3.0
1.47k stars 675 forks source link

Calibration Transfer IndexError #2263

Closed acarayberk closed 2 years ago

acarayberk commented 2 years ago

Hello, When I try to transfer a calibration from one video to another as explained in your youtube video I get the error:

player - [ERROR] launchables.player: Process Player crashed with trace:
Traceback (most recent call last):
  File "launchables\player.py", line 624, in player
  File "plugin.py", line 409, in __init__
  File "plugin.py", line 441, in add
  File "observable.py", line 368, in __call__
  File "gaze_producer\gaze_from_offline_calibration.py", line 199, in init_ui
  File "gaze_producer\ui\select_and_refresh_menu.py", line 65, in render
  File "gaze_producer\ui\select_and_refresh_menu.py", line 83, in _render_item_selector_and_current_item
  File "gaze_producer\ui\calibration_menu.py", line 184, in _on_change_current_item
  File "gaze_producer\ui\select_and_refresh_menu.py", line 90, in _on_change_current_item
  File "gaze_producer\ui\storage_edit_menu.py", line 81, in render_item
  File "gaze_producer\ui\calibration_menu.py", line 65, in _render_custom_ui
  File "gaze_producer\ui\calibration_menu.py", line 71, in _render_ui_normally
  File "gaze_producer\ui\calibration_menu.py", line 96, in _create_range_selector
  File "gaze_producer\gaze_from_offline_calibration.py", line 224, in _index_range_as_str
  File "gaze_producer\gaze_from_offline_calibration.py", line 229, in _index_time_as_str
IndexError: index 3599 is out of bounds for axis 0 with size 1003

World video sources for these two videos are different and they are taken by a DIY headset. I would be glad if you could help me. Thank you.


Edited by @papr for better readability of the stack trace

papr commented 2 years ago

@acarayberk The issue is that the program does not recognize the calibration as "from another recording". To do that, it compares the recording uuid saved in the calibration file and in the recording's info.player.json. Did you copy the latter file, too?

acarayberk commented 2 years ago

Thank you for your answer, I copied calibration folder and info.player.json file but the error persists

papr commented 2 years ago

Let me clarify, the info.player.json file must not be copied. To fix this issue:

  1. Delete the existing calibration files
  2. Open the info.player.json files from both recordings. Ensure the recording_uuid field is different for the two recordings
  3. Open Player and the first recording.
  4. Create a new calibration
  5. Copy only the calibration file to the second recording, no other files
  6. Open the second recording
  7. The calibration should be displayed correctly as a calibration from a different recording
acarayberk commented 2 years ago

Thank you very much, that solved the issue.