Tierpsy / tierpsy-tracker

Multi-Worm Behaviour Tracker. README here:
https://github.com/Tierpsy/tierpsy-tracker/blob/development/README.md
MIT License
20 stars 18 forks source link

Can't get the boxes after processing #61

Closed mmaatthieuu closed 3 years ago

mmaatthieuu commented 3 years ago

Hey all,

Thanks for sharing this amazing code. I am trying to track single worms and to get their trajectories and speed. I can get good parameters for the mask so that the mask correspond well to the worm, but after processing there is no box around the worm and I cannot plot anything.

Here is the video I am trying to analyze, the parameters and outputs

I am running the last version of the development branch on Ubuntu 20.04

Am I missing something or are there some other parameters to modify ?

Here is what is happening

https://user-images.githubusercontent.com/35799283/121188399-5cdc6100-c869-11eb-84ad-6ca30e245689.mp4

At the end it crashes with the following message

Traceback (most recent call last): File "/home/matthieu/tierpsy-tracker/tierpsy/gui/MWTrackerViewer.py", line 942, in show_plot self.update_plot() File "/home/matthieu/tierpsy-tracker/tierpsy/gui/MWTrackerViewer.py", line 946, in update_plot self.plotter.plot(self.current_worm_index, self.feat_column) File "/home/matthieu/tierpsy-tracker/tierpsy/gui/PlotFeatures.py", line 132, in plot func(worm_index, feature) File "/home/matthieu/tierpsy-tracker/tierpsy/gui/PlotFeatures.py", line 140, in _plot_single_timeseries worm_data = self.traj_worm_index_grouped.get_group(worm_index) File "/home/matthieu/anaconda3/envs/tierpsy/lib/python3.6/site-packages/pandas/core/groupby/groupby.py", line 680, in get_group raise KeyError(name) KeyError: None [1] 1160322 abort (core dumped) tierpsy_gui

Thanks a lot.

luigiferiani commented 3 years ago

Hi @mmaatthieuu,

thank you for sending the data and the json file along, that was very helpful!

Try modifying the line in the json file that says

    "nn_filter_to_use": "pytorch_default",

and set it instead to

    "nn_filter_to_use": "none",

That line instructs Tierpsy tracker to use a neural network to filter out non-worm objects. As the default one was trained on videos that look very different from yours, it mistakenly identifies your worm as a non-worm object and removes it from the analysis. By setting the parameter to "none", Tierpsy Tracker will skip this step, and it will track the worm.

mmaatthieuu commented 3 years ago

Hi @luigiferiani

Great ! Thanks a lot for your quick reply and that actually solves my issue.