ethoscope.trackers package¶
Module contents¶
ethoscope.trackers.trackers module¶
-
class
ethoscope.trackers.trackers.
BaseTracker
(roi, data=None)[source]¶ Bases:
ethoscope.utils.description.DescribedObject
Template class for video trackers. A video tracker locate animal in a ROI. Derived class must implement the
_find_position
method.Parameters: - roi (
ROI
) – The Region Of Interest the the tracker will use to locate the animal. - data – An optional data set. For instance, it can be used for pre-trained algorithms
Returns: -
last_time_point
¶ Returns: The last time point that the tracker used. This is updated even when position is inferred/no animal is found Return type: int
-
positions
¶ Returns: The last few positions found by the tracker. Positions are kept for a certain duration defined by the _max_history_length
attribute.Return type: deque
- roi (
-
exception
ethoscope.trackers.trackers.
NoPositionError
[source]¶ Bases:
exceptions.Exception
Used to abort tracking. When it is raised within the
_find_position
method, data is inferred from previous position.
ethoscope.trackers.single_roi_tracker module¶
ethoscope.trackers.adaptive_bg_tracker module¶
-
class
ethoscope.trackers.adaptive_bg_tracker.
AdaptiveBGModel
(roi, data=None)[source]¶ Bases:
ethoscope.trackers.trackers.BaseTracker
An adaptive background subtraction model to find position of one animal in one roi.
TODO more description here :param roi: :param data: :return:
-
fg_model
= <ethoscope.trackers.adaptive_bg_tracker.ObjectModel object>¶
-
-
class
ethoscope.trackers.adaptive_bg_tracker.
BackgroundModel
(max_half_life=500000.0, min_half_life=5000.0, increment=1.2)[source]¶ Bases:
object
A class to model background. It uses a dynamic running average and support arbitrary and heterogeneous frame rates
-
bg_img
¶
-