mooch443 / trex

TRex, a fast multi-animal tracking system with markerless identification, and 2D estimation of posture and visual fields.
https://trex.run
GNU General Public License v3.0
82 stars 8 forks source link

Flipping body axis between head and taill while drosophila tracking #219

Open beepathu opened 9 months ago

beepathu commented 9 months ago

Describe the bug I am encountering an issue with the Trex tracking software while attempting to analyze the turning of flies. The software frequently flips between detecting the head and tail as the body axis, leading to inaccuracies in the data, mainly angle of turning. Any guidance on adjusting parameters to address the flipping body axis problem would be greatly appreciated.

The parameter settings that i currently use for trex are: meta_real_width = 11.3 frame_rate = 20 posture_direction_smoothing = 16 outline_smooth_step = 12 midline_invert = true track_max_speed = 24 output_invalid_value = "nan" output_format = "csv" individual_prefix = "fly" gui_show_number_individuals = true gui_playback_speed = 0.4 gui_show_selections = false track_max_individuals = 19 auto_minmax_size = true

I am attaching some images below in hope that you get a better idea of the issue.

Here is a screenshot of our video in the Trex that shows a circular arena with 20 flies: image (16)

Here is an example of how the head and tail switches in a fly, these images were taken in consecutive frames: trex_error_2 trex_error

mooch443 commented 8 months ago

Hey,

this is difficult to determine from the images alone. But,

If this does not help, then it's likely a data-problem. Meaning the shapes are just not pointy enough to be automatically determined. I think it should though!