juliencarponcy / trialexp

MIT License
2 stars 4 forks source link

Deeplabcut pipeline #57

Closed teristam closed 11 months ago

teristam commented 11 months ago

This PR implements the Deeplabcut (DLC) pipeline for our Snakemake workflow. The pipeline

  1. Downscale the original video to 640x512 (should take around 20min to process a 30min file, without downscaling it will take 1.5 hrs)
  2. Use a trained DLC model to analyze the body markers of the animal
  3. Clean up the marker coordinate by interpolation and low-pass filtering
  4. Synchronize with pycontrol
  5. Analyze the movement type and get the average photometry response
  6. Generate a processed/dlc_synced_video.mp4 for showing the results of the DLC together with video and pycontrol event for verification. It also generates some samples of movement initiation video under the processed\deeplabcut folder

A sample of the output can be seen at reaching_go_spout_bar_nov22\TT002-2023-06-26-103625\processed. I will merge it soon if there is no significant concern.