vedb / pupil_recording_interface

A pythonic interface for the Pupil Core system
https://vedb.github.io/pupil_recording_interface
GNU General Public License v3.0
1 stars 0 forks source link

A fully functional validation module for tracking the pupil marker #74

Closed KamranBinaee closed 3 years ago

KamranBinaee commented 3 years ago

Make sure you have:

This is an almost complete working marker detector. The parameter passing is not optimal though. I tried using kwargs but it didn't work. It might be due to the fact that in line 124 base.py the kwargs are not being passed correctly? I'm not sure. Ideally the circle detector parameters should be passed through yaml and **kwargs.

phausamann commented 3 years ago

@KamranBinaee I did some refactoring before merging the Validation class. Should have mentioned that earlier, sorry about that. I did a rebase onto devel to incorporate those changes.

phausamann commented 3 years ago

The parameter passing isn't optimal, I agree, but I don't see another way to do it tbh. Keyword arguments need to be written out so that the @process decorator can pick them up for the config mechanism.

phausamann commented 3 years ago

One possibility would be to pass a tracker_params argument as a dictionary to the CircleDetector like this:

@process("circle_detector")
class CircleDetector(BaseProcess):
    """ Circle detector for the world video stream. """

    def __init__(
        self,
        scale=0.5,
        detection_method="pupil",
        tracker_params,
        **kwargs,
    ):
        """ Constructor. """
        super().__init__(**kwargs)

        self.circle_tracker = CircleTracker(
            scale=scale,
            detection_method=detection_method,
            **tracker_params,
            **kwargs,
        )
KamranBinaee commented 3 years ago

Closed this PR in favor of #77