Skip to content

Conversation

@pfaion
Copy link
Contributor

@pfaion pfaion commented Aug 25, 2020

This PR adds a plugin for the pye3d pupil detector.

The plugin will only be loaded if pye3d is available. In this case, it will replace the default 3D pupil detector.
Please note that pye3d is distributed under a different license than Pupil.

Open Questions

  1. Since the base class PupilDetectorPlugin abstracts away handle_events() and child classes only implement detect(), we generally do not have access to detection results of other detectors in detect().
    However, any 3D detector needs the 2D result. To increase confusion, the old 3D detector does not work with the 2D pupil datum, but with the raw binary blob. Pye3D on the other hand needs the 2D pupil datum. We should come up with a better way of passing this, maybe just give access to the events dict in detect()?

  2. Should we merge this even if the integration is not yet fully complete? Theoretically, we can release this code, even if it does not yet have all features (e.g. freezing the eye model), as it won't be used without having pye3d available anyways. I think that's a great chance for working incrementally without having one massive feature branch in the end.

@pfaion pfaion requested a review from papr August 25, 2020 09:56
@pfaion pfaion marked this pull request as ready for review August 25, 2020 12:17
@papr
Copy link
Contributor

papr commented Sep 7, 2020

I am getting this error when running the pye3d detector during post-hoc detection:

Traceback (most recent call last):
  File "/Users/papr/work/pupil/pupil_src/launchables/player.py", line 672, in player
    p.recent_events(events)
  File "/Users/papr/work/pupil/pupil_src/shared_modules/pupil_producers.py", line 422, in recent_events
    assert pm.PupilTopic.match(topic, eye_id=pupil_datum["id"])
AssertionError

P.S. it might be necessary to delete the user_settings_eye* files from your player_settings since the eye process tries to restore the legacy 3d detector if it was loaded in the previous session.

@pfaion pfaion requested a review from papr September 7, 2020 12:10
Copy link
Contributor

@papr papr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested all pupil-related plugins. Works as expected.

@pfaion pfaion merged commit e0ab2c3 into develop Sep 7, 2020
@pfaion pfaion deleted the pye3d branch September 7, 2020 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants