Closed KamranBinaee closed 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.
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.
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,
)
Closed this PR in favor of #77
Make sure you have:
docs/whatsnew.rst
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.