Track workflow > Custom Detector

Use Custom Detector (optional)

Purpose

Implement the object detectors created in the Train workflow. Custom object detectors can be used on their own, or for simultaneous tracking of worms and other animals or objects within the same dataset enabling more complex or multi-species experiments.

To use only custom detectors without worm tracking, uncheck Enable Worm Tracking at the top of the Setup Worm Detection and Tracking panel.

Loaded Detector

Select the desired detector from the dropdown menu then click Add to add it to the detector list. Multiple detectors for different objects can be run at the same time.

  • Detector: The detector name.

  • Object: The object the detector is trained to detect.

  • Delete: Click the X to delete the detector from the list.

  • Threshold: Each object generated by the detector has a likelihood measurement (0-100) associated with it. The threshold will help exclude the less likely detections.

  • IoU Threshold: The Intersection over Union (IoU) threshold defines the minimum overlap required between two object bounding boxes to consider them as the same object. This threshold is used during the non-maximum suppression (NMS) step to filter redundant detections.

    • Lower values (e.g., 0.3): More aggressive suppression; fewer overlapping boxes are retained. This reduces duplicate detections but risks removing distinct, nearby objects.

    • Higher values (e.g., 0.7): Less aggressive suppression; more overlapping boxes are kept. This can preserve closely spaced objects but may leave duplicate detections.

  • Detect Use this command to test object detection on a single field of view according to the current parameters. Parameters can then be adjusted and re-tested as desired.

  • Clear Click to clear the detected objects.

Advanced

  • Frames objects can touch boundary: Number of frames in which WormLab tracks an object at the edge of the image. If the object remains at the edge after the specified number of frames, it is dropped from tracking. This is useful for instances where an object is at the edge for a few frames only.

  • Frames objects can overlap: Number of frames in which WormLab tracks overlapping objects. This option is used for faster tracking, limiting the amount of time (in frames) during which WormLab seeks to resolve object overlaps.

    Lower this parameter if tracking becomes unstable while WormLab tracks interacting objects over an extended period of time.
    If WormLab drops interacting tracks for no apparent reason, increase this number to resolve this issue.

  • Position tolerance: Percentage of a position shift (as a fraction of body length) tolerated over consecutive frames to continue a track. For example, if a worm position is outside this value, WormLab generates a new worm track.

  • Shape tolerance: Percentage of a shape difference (length, width) tolerated over consecutive frames to continue a track. For example, if a worm shape is outside this value, WormLab generates a new worm track.

    • If track length is a priority, raise this value.

    • If detection accuracy is a priority, lower this value.

    • If there is only one or very few worms on the plate, a higher value will help to create a continuous track in the presence of noise.

Track Filtering

Use to filter out short, spurious tracks that can occur in the presence of image noise, a cluttered background, or deep tracks.

If a worm track exists for fewer frames than the set value, the program deletes the worm track from the data generated by Track Worms Workflow: Analyze Data.

  • Minimum track duration (frame): Check the box and set a value for a minimum number of frames in which a track must appear to be considered valid.