@brainpilot/skills 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/package.json +2 -2
  2. package/skills/01_Meta-Skills/academic-research-hub/SKILL.md +108 -0
  3. package/skills/01_Meta-Skills/academic-research-hub/scripts/requirements.txt +17 -0
  4. package/skills/01_Meta-Skills/academic-research-hub/scripts/research.py +781 -0
  5. package/skills/01_Meta-Skills/beautiful-log/SKILL.md +64 -0
  6. package/skills/01_Meta-Skills/beautiful-log/scripts/beautiful_log.py +274 -0
  7. package/skills/01_Meta-Skills/ethoclaw-daily-paper/SKILL.md +130 -0
  8. package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/config.template.yaml +54 -0
  9. package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/top5_digest_template.md +5 -0
  10. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/build_top5_digest.py +300 -0
  11. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/common.py +137 -0
  12. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/merge_results.py +106 -0
  13. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/run_pipeline.py +177 -0
  14. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_arxiv.py +162 -0
  15. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_pubmed.py +202 -0
  16. package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/SKILL.md +173 -0
  17. package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/scripts/normalize_data.py +874 -0
  18. package/skills/01_Meta-Skills/ethoclaw-pdf-research/SKILL.md +134 -0
  19. package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/confirmation-prompts.md +31 -0
  20. package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/output-patterns.md +45 -0
  21. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_markdown_deliverables.py +41 -0
  22. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_research_log.py +84 -0
  23. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_summary_md.py +63 -0
  24. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/extract_pdf_bundle.py +140 -0
  25. package/skills/01_Meta-Skills/experiment-controller/SKILL.md +140 -0
  26. package/skills/01_Meta-Skills/knowledge-graph-builder/SKILL.md +366 -0
  27. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/entity_resolution.py +120 -0
  28. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/extraction_prompt_template.txt +19 -0
  29. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/graph_query.py +106 -0
  30. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/hypothesis_cli_reference.py +42 -0
  31. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/new_data_source_template.py +116 -0
  32. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/requirements.txt +15 -0
  33. package/skills/01_Meta-Skills/method-design/SKILL.md +61 -0
  34. package/skills/01_Meta-Skills/multi-search-engine/SKILL.md +119 -0
  35. package/skills/01_Meta-Skills/research-idea/SKILL.md +65 -0
  36. package/skills/05_EEG_ERP/eeg-skill/SKILL.md +197 -0
  37. package/skills/05_EEG_ERP/meg-skill/SKILL.md +188 -0
  38. package/skills/05_EEG_ERP/meg-skill/scripts/time_frequency.py +223 -0
  39. package/skills/05_EEG_ERP/mne-eeg-tool/SKILL.md +165 -0
  40. package/skills/05_EEG_ERP/mne-eeg-tool/scripts/eeg_pipeline_reference.py +231 -0
  41. package/skills/05_EEG_ERP/seed-iv-skill/SKILL.md +184 -0
  42. package/skills/05_EEG_ERP/seed-iv-skill/scripts/classify_seed_iv.py +154 -0
  43. package/skills/05_EEG_ERP/seed-iv-skill/scripts/extract_seed_iv_features.py +190 -0
  44. package/skills/05_EEG_ERP/seed-iv-skill/scripts/validate_seed_iv.py +102 -0
  45. package/skills/05_EEG_ERP/seed-vig-skill/SKILL.md +182 -0
  46. package/skills/05_EEG_ERP/seed-vig-skill/scripts/classify_seed_vig.py +165 -0
  47. package/skills/05_EEG_ERP/seed-vig-skill/scripts/extract_seed_vig_features.py +185 -0
  48. package/skills/05_EEG_ERP/seed-vig-skill/scripts/validate_seed_vig.py +88 -0
  49. package/skills/06_fMRI_Neuroimaging/abcd-skill/SKILL.md +308 -0
  50. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/abcd_qc_summary.py +449 -0
  51. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/extract_abcd_phenotype.py +292 -0
  52. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/reorganize_abcd.py +387 -0
  53. package/skills/06_fMRI_Neuroimaging/abide-skill/SKILL.md +302 -0
  54. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/abide_qc_summary.py +317 -0
  55. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/extract_abide_phenotype.py +267 -0
  56. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/reorganize_abide.py +387 -0
  57. package/skills/06_fMRI_Neuroimaging/adhd200-skill/SKILL.md +244 -0
  58. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/adhd200_qc_summary.py +98 -0
  59. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/extract_adhd200_phenotype.py +134 -0
  60. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/reorganize_adhd200.py +206 -0
  61. package/skills/06_fMRI_Neuroimaging/adni-skill/SKILL.md +358 -0
  62. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_adni_task_files.py +1305 -0
  63. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_vqa_from_tasks.py +766 -0
  64. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/reorganize_adni.py +491 -0
  65. package/skills/06_fMRI_Neuroimaging/aibl-skill/SKILL.md +295 -0
  66. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/aibl_qc_summary.py +260 -0
  67. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/extract_aibl_phenotype.py +365 -0
  68. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/reorganize_aibl.py +394 -0
  69. package/skills/06_fMRI_Neuroimaging/aomic-skill/SKILL.md +292 -0
  70. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/aomic_qc_summary.py +258 -0
  71. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/extract_aomic_phenotype.py +284 -0
  72. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/reorganize_aomic.py +322 -0
  73. package/skills/06_fMRI_Neuroimaging/asl-skill/SKILL.md +168 -0
  74. package/skills/06_fMRI_Neuroimaging/asl-skill/scripts/compute_cbf.py +224 -0
  75. package/skills/06_fMRI_Neuroimaging/bids-organizer/SKILL.md +241 -0
  76. package/skills/06_fMRI_Neuroimaging/bold5000-skill/SKILL.md +186 -0
  77. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/bold5000_qc_summary.py +96 -0
  78. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/extract_bold5000_stimulus.py +125 -0
  79. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/reorganize_bold5000.py +102 -0
  80. package/skills/06_fMRI_Neuroimaging/camcan-skill/SKILL.md +213 -0
  81. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/camcan_qc_summary.py +131 -0
  82. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/extract_camcan_phenotype.py +145 -0
  83. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/validate_camcan.py +141 -0
  84. package/skills/06_fMRI_Neuroimaging/cobre-skill/SKILL.md +201 -0
  85. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/cobre_qc_summary.py +95 -0
  86. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/extract_cobre_phenotype.py +104 -0
  87. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/reorganize_cobre.py +140 -0
  88. package/skills/06_fMRI_Neuroimaging/conn-tool/SKILL.md +180 -0
  89. package/skills/06_fMRI_Neuroimaging/dcm2nii/SKILL.md +189 -0
  90. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/SKILL.md +183 -0
  91. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/dmt_har_med_qc_summary.py +96 -0
  92. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/extract_dmt_har_med_phenotype.py +121 -0
  93. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/reorganize_dmt_har_med.py +125 -0
  94. package/skills/06_fMRI_Neuroimaging/dwi-skill/SKILL.md +359 -0
  95. package/skills/06_fMRI_Neuroimaging/fmri-skill/SKILL.md +371 -0
  96. package/skills/06_fMRI_Neuroimaging/fmriprep-tool/SKILL.md +228 -0
  97. package/skills/06_fMRI_Neuroimaging/freesurfer-tool/SKILL.md +286 -0
  98. package/skills/06_fMRI_Neuroimaging/freesurfer-tool/scripts/freesurfer_processor.py +145 -0
  99. package/skills/06_fMRI_Neuroimaging/fsl-tool/SKILL.md +208 -0
  100. package/skills/06_fMRI_Neuroimaging/hbn-skill/SKILL.md +271 -0
  101. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/extract_hbn_phenotype.py +107 -0
  102. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/hbn_qc_summary.py +96 -0
  103. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/reorganize_hbn.py +150 -0
  104. package/skills/06_fMRI_Neuroimaging/hcpa-skill/SKILL.md +210 -0
  105. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/extract_hcpa_phenotype.py +146 -0
  106. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/hcpa_qc_summary.py +120 -0
  107. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/reorganize_hcpa.py +155 -0
  108. package/skills/06_fMRI_Neuroimaging/hcpd-skill/SKILL.md +210 -0
  109. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/extract_hcpd_phenotype.py +148 -0
  110. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/hcpd_qc_summary.py +125 -0
  111. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/reorganize_hcpd.py +146 -0
  112. package/skills/06_fMRI_Neuroimaging/hcpep-skill/SKILL.md +215 -0
  113. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/extract_hcpep_phenotype.py +157 -0
  114. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/hcpep_qc_summary.py +143 -0
  115. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/reorganize_hcpep.py +146 -0
  116. package/skills/06_fMRI_Neuroimaging/hcppipeline-tool/SKILL.md +217 -0
  117. package/skills/06_fMRI_Neuroimaging/hcpya-skill/SKILL.md +214 -0
  118. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/extract_hcpya_phenotype.py +190 -0
  119. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/hcpya_qc_summary.py +152 -0
  120. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/reorganize_hcpya.py +203 -0
  121. package/skills/06_fMRI_Neuroimaging/ixi-skill/SKILL.md +198 -0
  122. package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/ixi_qc_summary.py +137 -0
  123. package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/reorganize_ixi.py +190 -0
  124. package/skills/06_fMRI_Neuroimaging/mnd-skill/SKILL.md +191 -0
  125. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/extract_mnd_phenotype.py +143 -0
  126. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/mnd_qc_summary.py +120 -0
  127. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/validate_mnd.py +107 -0
  128. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/SKILL.md +203 -0
  129. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/analyze_lesions.py +119 -0
  130. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/longitudinal_lesion.py +148 -0
  131. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/mschallenge_qc_summary.py +132 -0
  132. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/validate_mschallenge.py +116 -0
  133. package/skills/06_fMRI_Neuroimaging/nibabel-skill/SKILL.md +184 -0
  134. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/atlas_coordinate_reference.py +61 -0
  135. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/freesurfer_io_reference.py +34 -0
  136. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/nifti_inspection_reference.py +35 -0
  137. package/skills/06_fMRI_Neuroimaging/nifd-skill/SKILL.md +205 -0
  138. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/extract_nifd_phenotype.py +132 -0
  139. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/nifd_qc_summary.py +111 -0
  140. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/validate_nifd.py +111 -0
  141. package/skills/06_fMRI_Neuroimaging/nii2dcm/SKILL.md +143 -0
  142. package/skills/06_fMRI_Neuroimaging/nilearn-tool/SKILL.md +266 -0
  143. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/connectome_reference.py +65 -0
  144. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/denoise_timeseries_reference.py +58 -0
  145. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/hierarchical_parcellation_reference.py +53 -0
  146. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/kmeans_parcellation_reference.py +53 -0
  147. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/preprocess_bold_reference.py +76 -0
  148. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_dictlearning_reference.py +56 -0
  149. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_ica_reference.py +59 -0
  150. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/second_level_glm_reference.py +58 -0
  151. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/spacenet_classifier_reference.py +59 -0
  152. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/svm_classifier_reference.py +60 -0
  153. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/task_glm_reference.py +63 -0
  154. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/zalff_summary_reference.py +109 -0
  155. package/skills/06_fMRI_Neuroimaging/nsd-skill/SKILL.md +210 -0
  156. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/extract_nsd_stimulus.py +171 -0
  157. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/nsd_qc_summary.py +142 -0
  158. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/validate_nsd.py +142 -0
  159. package/skills/06_fMRI_Neuroimaging/oasis-skill/SKILL.md +205 -0
  160. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/extract_oasis_phenotype.py +126 -0
  161. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/oasis_qc_summary.py +115 -0
  162. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/validate_oasis.py +119 -0
  163. package/skills/06_fMRI_Neuroimaging/pet-skill/SKILL.md +173 -0
  164. package/skills/06_fMRI_Neuroimaging/pet-skill/scripts/compute_suvr.py +202 -0
  165. package/skills/06_fMRI_Neuroimaging/pnc-skill/SKILL.md +206 -0
  166. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/extract_pnc_phenotype.py +136 -0
  167. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/pnc_qc_summary.py +116 -0
  168. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/validate_pnc.py +120 -0
  169. package/skills/06_fMRI_Neuroimaging/ppmi-skill/SKILL.md +209 -0
  170. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/extract_ppmi_phenotype.py +138 -0
  171. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/ppmi_qc_summary.py +111 -0
  172. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/validate_ppmi.py +117 -0
  173. package/skills/06_fMRI_Neuroimaging/qsiprep-tool/SKILL.md +320 -0
  174. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/SKILL.md +215 -0
  175. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/extract_rest_mdd_phenotype.py +132 -0
  176. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/harmonize_sites.py +152 -0
  177. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/rest_mdd_qc_summary.py +124 -0
  178. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/validate_rest_mdd.py +103 -0
  179. package/skills/06_fMRI_Neuroimaging/smri-skill/SKILL.md +302 -0
  180. package/skills/06_fMRI_Neuroimaging/tcp-skill/SKILL.md +204 -0
  181. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/extract_tcp_phenotype.py +139 -0
  182. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/tcp_qc_summary.py +111 -0
  183. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/validate_tcp.py +99 -0
  184. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/SKILL.md +217 -0
  185. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/extract_ucla_cnp_phenotype.py +145 -0
  186. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/ucla_cnp_qc_summary.py +111 -0
  187. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/validate_ucla_cnp.py +113 -0
  188. package/skills/06_fMRI_Neuroimaging/ukb-skill/SKILL.md +310 -0
  189. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/build_ukb_survival.py +210 -0
  190. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_cases.py +308 -0
  191. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_phenotype.py +232 -0
  192. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/ukb_qc_summary.py +158 -0
  193. package/skills/06_fMRI_Neuroimaging/wmh-segmentation/SKILL.md +133 -0
  194. package/skills/07_Computational_Modeling/detrending/SKILL.md +118 -0
  195. package/skills/07_Computational_Modeling/dictlearning/SKILL.md +122 -0
  196. package/skills/07_Computational_Modeling/filtering/SKILL.md +121 -0
  197. package/skills/07_Computational_Modeling/glm/SKILL.md +153 -0
  198. package/skills/07_Computational_Modeling/hierarchical/SKILL.md +121 -0
  199. package/skills/07_Computational_Modeling/ica/SKILL.md +122 -0
  200. package/skills/07_Computational_Modeling/kmeans/SKILL.md +119 -0
  201. package/skills/07_Computational_Modeling/run_models/SKILL.md +427 -0
  202. package/skills/07_Computational_Modeling/spacenet/SKILL.md +122 -0
  203. package/skills/07_Computational_Modeling/svm/SKILL.md +120 -0
  204. package/skills/08_Computational_Neuroscience/brain_gnn/SKILL.md +183 -0
  205. package/skills/08_Computational_Neuroscience/dipy-tool/SKILL.md +239 -0
  206. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/dti_metrics_reference.py +70 -0
  207. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/load_and_mask_reference.py +76 -0
  208. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/roi_stats_reference.py +59 -0
  209. package/skills/08_Computational_Neuroscience/fm_app/SKILL.md +195 -0
  210. package/skills/08_Computational_Neuroscience/neurostorm/SKILL.md +151 -0
  211. package/skills/13_Visualization/brain-visualization/SKILL.md +191 -0
  212. package/skills/13_Visualization/brain-visualization/scripts/connectome_reference.py +108 -0
  213. package/skills/13_Visualization/brain-visualization/scripts/freesurfer_ply_reference.py +54 -0
  214. package/skills/13_Visualization/brain-visualization/scripts/zalff_summary_reference.py +116 -0
  215. package/skills/13_Visualization/ethoclaw-paper-figure-layout/SKILL.md +78 -0
  216. package/skills/13_Visualization/ethoclaw-paper-figure-layout/assets/naturecomm_figures.tex +74 -0
  217. package/skills/13_Visualization/ethoclaw-paper-figure-layout/scripts/layout_results_foldered.py +579 -0
  218. package/skills/14_Writing/overleaf-skill/SKILL.md +184 -0
  219. package/skills/14_Writing/overleaf-skill/scripts/install.sh +30 -0
  220. package/skills/14_Writing/paper-writing/SKILL.md +146 -0
  221. package/skills/14_Writing/paper-writing/scripts/data_statement_templates.py +164 -0
  222. package/skills/14_Writing/paper-writing/scripts/figure_templates.py +315 -0
  223. package/skills/14_Writing/paper-writing/scripts/nature_figure_style.py +214 -0
  224. package/skills/14_Writing/paper-writing/scripts/section_phrasebank.py +246 -0
  225. package/skills/16_Animal_Behavior/deeplabcut/SKILL.md +154 -0
  226. package/skills/16_Animal_Behavior/deeplabcut/references/3d-pose.md +89 -0
  227. package/skills/16_Animal_Behavior/deeplabcut/references/maDLC.md +123 -0
  228. package/skills/16_Animal_Behavior/deeplabcut/references/modelzoo.md +98 -0
  229. package/skills/16_Animal_Behavior/deeplabcut/references/standard-pipeline.md +165 -0
  230. package/skills/16_Animal_Behavior/deeplabcut/references/utilities.md +146 -0
  231. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/SKILL.md +274 -0
  232. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.html +112 -0
  233. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.md +21 -0
  234. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/cluster-section.md +5 -0
  235. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/heatmap-section.md +5 -0
  236. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/integrated-interpretation.md +3 -0
  237. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/overview.md +3 -0
  238. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/project-summary.md +3 -0
  239. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/radar-section.md +5 -0
  240. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/raw-trajectory.md +3 -0
  241. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/sample-check.md +3 -0
  242. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/single-subject-section.md +3 -0
  243. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/stats-section.md +5 -0
  244. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/epm.md +52 -0
  245. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/fst.md +37 -0
  246. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/nor.md +39 -0
  247. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/oft.md +43 -0
  248. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tcst.md +45 -0
  249. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tst.md +36 -0
  250. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/input-types.md +59 -0
  251. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/interpretation-guardrails.md +45 -0
  252. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/metadata-schema.md +57 -0
  253. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/report-sections.md +86 -0
  254. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/section-selection-rules.md +169 -0
  255. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/build_report_manifest.py +27 -0
  256. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/render_report.py +34 -0
  257. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/report_utils.py +1121 -0
  258. package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/SKILL.md +390 -0
  259. package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/reference_code.py +98 -0
  260. package/skills/16_Animal_Behavior/ethoclaw-animal-pose-estimation/SKILL.md +336 -0
  261. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/README.md +21 -0
  262. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/SKILL.md +41 -0
  263. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/batch_kinematic_generator.py +663 -0
  264. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/config.json +19 -0
  265. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/generate_kinematic_parameter.py +401 -0
  266. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/kinematic_generator.py +265 -0
  267. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/SKILL.md +72 -0
  268. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/references/config.example.toml +56 -0
  269. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params.py +232 -0
  270. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params_from_config.py +236 -0
  271. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/SKILL.md +68 -0
  272. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/references/notes.md +5 -0
  273. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/scripts/plot_h5_radar.py +513 -0
  274. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/SKILL.md +52 -0
  275. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/config.toml +81 -0
  276. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/references/stats-rule.md +18 -0
  277. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_inspect.py +79 -0
  278. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_batch.py +624 -0
  279. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_stats.py +438 -0
  280. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/SKILL.md +280 -0
  281. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_trajectory.py +790 -0
  282. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_velocity.py +855 -0
  283. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.csv +101 -0
  284. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.h5 +0 -0
  285. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_data_readme.md +126 -0
@@ -0,0 +1,246 @@
1
+ """
2
+ Academic section phrase bank and move orders for manuscript writing.
3
+
4
+ Derived from nature-skills/nature-polishing (MIT License, Copyright 2026 Yuan Yizhe).
5
+ Source: https://github.com/Yuan1z0825/nature-skills
6
+ """
7
+
8
+ SECTION_MOVES = {
9
+ "introduction": {
10
+ "questions": [
11
+ "Why does the topic matter?",
12
+ "What is already known?",
13
+ "What is still missing or contested?",
14
+ "What does the present study ask or do?",
15
+ ],
16
+ "move_order": [
17
+ "establish importance",
18
+ "summarize what is known",
19
+ "identify a gap, limitation, or controversy",
20
+ "state the study aim",
21
+ "indicate value or approach",
22
+ ],
23
+ "useful_phrases": [
24
+ "Recent years have seen increasing interest in ...",
25
+ "X is a central issue in ...",
26
+ "Previous studies have shown that ...",
27
+ "However, the mechanisms underlying ... remain poorly understood.",
28
+ "Few studies have examined ...",
29
+ "Here, we investigate whether ...",
30
+ "This work provides ...",
31
+ ],
32
+ "avoid": [
33
+ "long historical throat-clearing",
34
+ "detailed results",
35
+ "inflated novelty claims before the gap is defined",
36
+ ],
37
+ },
38
+ "literature_review": {
39
+ "questions": [
40
+ "What lines of work define the field?",
41
+ "What has been established?",
42
+ "Where do findings diverge or remain incomplete?",
43
+ "Which gap matters for the present paper?",
44
+ ],
45
+ "move_order": [
46
+ "describe the scope of existing work",
47
+ "identify dominant approaches",
48
+ "state what has been established",
49
+ "note disagreements or contradictions",
50
+ "isolate the missing piece",
51
+ ],
52
+ "useful_phrases": [
53
+ "A substantial body of work has focused on ...",
54
+ "Most studies have relied on ...",
55
+ "Previous work has established that ...",
56
+ "Findings have been mixed regarding ...",
57
+ "By contrast, little attention has been paid to ...",
58
+ "No study has yet examined ...",
59
+ ],
60
+ "avoid": [
61
+ "citation-by-citation summary",
62
+ "treating all prior work as uniformly weak",
63
+ ],
64
+ },
65
+ "methods": {
66
+ "questions": [
67
+ "Could another group reproduce the work from this description?",
68
+ ],
69
+ "move_order": [
70
+ "design or cohort",
71
+ "materials or data source",
72
+ "procedure",
73
+ "outcome measures",
74
+ "analysis and statistics",
75
+ "ethics when relevant",
76
+ ],
77
+ "useful_phrases": [
78
+ "A cross-sectional study was undertaken to ...",
79
+ "Samples were collected from ...",
80
+ "X was quantified using ...",
81
+ "We used ... to assess ...",
82
+ "Differences were analysed using ...",
83
+ "All analyses were performed in ...",
84
+ ],
85
+ "avoid": [
86
+ "under standard conditions",
87
+ "using routine methods",
88
+ "data were analysed statistically",
89
+ ],
90
+ },
91
+ "results": {
92
+ "questions": [
93
+ "What was observed, under which condition, and with what evidence?",
94
+ ],
95
+ "move_order": [
96
+ "orient the reader to the figure, table, or experiment",
97
+ "state the main observation",
98
+ "add quantitative detail",
99
+ "note expected or unexpected patterns",
100
+ "compare with prior work only if it clarifies the result",
101
+ ],
102
+ "useful_phrases": [
103
+ "Figure 1 shows ...",
104
+ "As shown in Table 1, ...",
105
+ "The most notable finding was that ...",
106
+ "Contrary to expectations, ...",
107
+ "No significant difference was observed in ...",
108
+ "These results are consistent with ...",
109
+ "In contrast to earlier reports, ...",
110
+ ],
111
+ "avoid": [
112
+ "discussion-length mechanism explanations",
113
+ "repeating every visual detail from the figure",
114
+ ],
115
+ },
116
+ "discussion": {
117
+ "questions": [
118
+ "What do the main findings mean?",
119
+ "How do they relate to earlier work?",
120
+ "Which explanations are plausible?",
121
+ "What limitations constrain interpretation?",
122
+ "What follows from the findings, and what does not?",
123
+ ],
124
+ "move_order": [
125
+ "restate the main finding",
126
+ "explain plausible reasons",
127
+ "compare with earlier work",
128
+ "note limitations",
129
+ "state implications",
130
+ "point to future work if needed",
131
+ ],
132
+ "useful_phrases": [
133
+ "Taken together, these findings suggest that ...",
134
+ "A possible explanation is that ...",
135
+ "This discrepancy may reflect ...",
136
+ "These results should be interpreted with caution because ...",
137
+ "An implication of this is that ...",
138
+ "Further work is needed to determine whether ...",
139
+ ],
140
+ "avoid": [
141
+ "repeating the Results section in new words",
142
+ "claiming mechanism when only association was shown",
143
+ ],
144
+ },
145
+ "conclusion": {
146
+ "questions": [
147
+ "What was the central contribution?",
148
+ "Which finding matters most?",
149
+ "What implication follows, with what boundary?",
150
+ ],
151
+ "move_order": [
152
+ "return to the aim",
153
+ "summarize the decisive finding",
154
+ "state contribution or significance",
155
+ "give a boundary or forward look",
156
+ ],
157
+ "useful_phrases": [
158
+ "This study set out to ...",
159
+ "The present findings indicate that ...",
160
+ "These results extend our understanding of ...",
161
+ "Notwithstanding these limitations, ...",
162
+ "Further studies are required to ...",
163
+ ],
164
+ "avoid": [
165
+ "introducing new experiments",
166
+ "ending on vague praise of the work",
167
+ ],
168
+ },
169
+ "abstract": {
170
+ "questions": [
171
+ "What problem or gap is being addressed?",
172
+ "What was done?",
173
+ "What was found?",
174
+ "Why should the reader care?",
175
+ ],
176
+ "move_order": [
177
+ "broad context",
178
+ "concrete gap",
179
+ "approach",
180
+ "key result with numbers if available",
181
+ "implication",
182
+ ],
183
+ "useful_phrases": [
184
+ "X remains challenging because ...",
185
+ "Here, we ...",
186
+ "Using ... , we found that ...",
187
+ "We show that ...",
188
+ "These findings suggest ...",
189
+ ],
190
+ "avoid": [],
191
+ },
192
+ "title": {
193
+ "questions": [
194
+ "Which few words make the paper searchable, accurate, and interesting without overclaiming?",
195
+ ],
196
+ "target_properties": ["searchable", "specific", "restrained", "defensible"],
197
+ "useful_patterns": [
198
+ "[Core entity] in/through/by [mechanism or context]",
199
+ "[Process] shapes [outcome] in [system]",
200
+ "[Signature/pattern/framework] of [phenomenon]",
201
+ ],
202
+ "avoid": [
203
+ "A study of ...",
204
+ "vague hooks",
205
+ "unverified 'first'",
206
+ "stacked jargon",
207
+ ],
208
+ },
209
+ }
210
+
211
+
212
+ # ─────────────────────────────────────────────────────────────────────────────
213
+ # Evidence Strength Verbs
214
+ # ─────────────────────────────────────────────────────────────────────────────
215
+
216
+ EVIDENCE_VERBS = {
217
+ "strong": [
218
+ "demonstrate", "establish", "confirm", "show", "reveal",
219
+ ],
220
+ "moderate": [
221
+ "suggest", "indicate", "support", "point to",
222
+ ],
223
+ "speculative": [
224
+ "may reflect", "could imply", "is consistent with", "appears to",
225
+ ],
226
+ }
227
+
228
+ # ─────────────────────────────────────────────────────────────────────────────
229
+ # Transition Families
230
+ # ─────────────────────────────────────────────────────────────────────────────
231
+
232
+ TRANSITIONS = {
233
+ "contrast": [
234
+ "However,", "By contrast,", "In contrast,", "Nevertheless,",
235
+ "On the other hand,", "Conversely,",
236
+ ],
237
+ "addition": [
238
+ "Moreover,", "Furthermore,", "In addition,", "Additionally,",
239
+ ],
240
+ "consequence": [
241
+ "Therefore,", "Consequently,", "As a result,", "Thus,",
242
+ ],
243
+ "qualification": [
244
+ "Notwithstanding,", "Although,", "Despite this,", "While",
245
+ ],
246
+ }
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: deeplabcut
3
+ description: "Toolbox for markerless animal pose estimation with DeepLabCut. Covers single/multi-animal tracking, SuperAnimal pretrained models, 2D/3D pose estimation, keypoint labeling GUI, model training/evaluation, video analysis, and behavioral quantification. Use when the user needs animal pose estimation, behavior tracking, keypoint detection in videos, or mentions DeepLabCut/DLC/SuperAnimal."
4
+ version: "1.0.0"
5
+ authors:
6
+ - "Claude (AI-assisted)"
7
+ review_status: "ai-generated"
8
+ source: "https://github.com/DeepLabCut/DeepLabCut"
9
+ ---
10
+
11
+ # DeepLabCut — Markerless Animal Pose Estimation
12
+
13
+ ## Purpose
14
+
15
+ DeepLabCut is a Python toolbox for state-of-the-art markerless pose estimation of animals. It uses deep learning to track body parts from videos without physical markers. The library is animal-agnostic, supports both single and multi-animal scenarios, and includes the SuperAnimal family of pretrained models for out-of-the-box inference.
16
+
17
+ ## When to Use This Skill
18
+
19
+ Activate when the user:
20
+ - Wants to track animal body parts from video
21
+ - Asks about pose estimation, keypoint detection, or behavioral tracking
22
+ - Mentions DeepLabCut, DLC, SuperAnimal, or markerless tracking
23
+ - Needs to analyze animal movement/kinematics
24
+ - Asks about multi-animal tracking or 3D pose reconstruction
25
+ - Wants to use pretrained animal pose models
26
+
27
+ ## Quick Decision Tree
28
+
29
+ ```
30
+ What does the user need?
31
+ ├── No labeled data, just want to track animals → SuperAnimal (video_inference_superanimal)
32
+ ├── Single animal, have labeled data → Standard single-animal pipeline
33
+ ├── Multiple animals interacting → maDLC (multi-animal pipeline)
34
+ ├── 3D pose reconstruction → 3D pipeline (calibrate_cameras + triangulate)
35
+ └── Just post-process results → filterpredictions, analyzeskeleton
36
+ ```
37
+
38
+ ## Reference Files (Progressive Disclosure)
39
+
40
+ | Topic | File | When to Read |
41
+ |-------|------|--------------|
42
+ | Standard Pipeline | `references/standard-pipeline.md` | Full workflow: create project → train → analyze |
43
+ | SuperAnimal & ModelZoo | `references/modelzoo.md` | Pretrained models, zero-shot inference |
44
+ | Multi-Animal (maDLC) | `references/maDLC.md` | Tracking multiple interacting animals |
45
+ | 3D Pose Estimation | `references/3d-pose.md` | Triangulation from multiple camera views |
46
+ | Video & Data Utilities | `references/utilities.md` | Video cropping, format conversion, data export |
47
+
48
+ ## Installation
49
+
50
+ ```bash
51
+ # Minimal (headless, no GUI):
52
+ pip install deeplabcut
53
+
54
+ # With GUI (label_frames, refine_labels, SkeletonBuilder):
55
+ pip install "deeplabcut[gui]"
56
+
57
+ # PyTorch must be installed separately:
58
+ pip install torch torchvision
59
+ # Or for GPU (check pytorch.org for your CUDA version):
60
+ conda install pytorch cudatoolkit=11.3 -c pytorch
61
+ ```
62
+
63
+ Verify: `python -c "import deeplabcut; print(deeplabcut.__version__)"`
64
+
65
+ ## Standard Pipeline Overview
66
+
67
+ ```python
68
+ import deeplabcut as dlc
69
+
70
+ # 1. Create project
71
+ config_path = dlc.create_new_project(
72
+ "ProjectName", "ExperimenterName", ["/path/to/video.mp4"],
73
+ working_directory="/path/to/projects"
74
+ )
75
+
76
+ # 2. Extract frames for labeling
77
+ dlc.extract_frames(config_path, mode="automatic", algo="kmeans", crop=True)
78
+
79
+ # 3. USER labels frames manually in GUI
80
+ # dlc.label_frames(config_path) # launches the labeling GUI
81
+
82
+ # 4. Create training dataset from labeled frames
83
+ dlc.create_training_dataset(config_path, net_type="resnet_50")
84
+
85
+ # 5. Train the network
86
+ dlc.train_network(config_path, maxiters=100000, saveiters=5000)
87
+
88
+ # 6. Evaluate
89
+ dlc.evaluate_network(config_path, plotting=True)
90
+
91
+ # 7. Analyze videos (predict poses)
92
+ dlc.analyze_videos(config_path, ["/path/to/video.mp4"], videotype=".mp4")
93
+
94
+ # 8. Create labeled videos (overlay predictions)
95
+ dlc.create_labeled_video(config_path, ["/path/to/video.mp4"])
96
+
97
+ # 9. Export results to CSV
98
+ dlc.analyze_videos_converth5_to_csv("/path/to/videoDLC_resnet50_ProjectNameJul9")
99
+ ```
100
+
101
+ ## Key API Reference
102
+
103
+ ### Project Management
104
+
105
+ | Function | Description |
106
+ |----------|-------------|
107
+ | `create_new_project(project, experimenter, videos, working_directory)` | Start a new single-animal project |
108
+ | `create_new_project_3d(project, experimenter, num_cameras, working_directory)` | Start a new 3D project |
109
+ | `create_pretrained_project(path, task, videos, SUPERANIMAL_NAME, model_name, detector_name)` | Create project from SuperAnimal pretrained model |
110
+ | `add_new_videos(config_path, videos)` | Add videos to existing project |
111
+
112
+ ### Training & Evaluation
113
+
114
+ | Function | Description |
115
+ |----------|-------------|
116
+ | `create_training_dataset(config_path, net_type, augmenter_type)` | Prepare training data; `net_type`: `resnet_50`, `resnet_101`, `mobilenet_v2_1.0`, `efficientnet-b0` |
117
+ | `train_network(config_path, maxiters, saveiters)` | Train; key params: `maxiters=100000`, `saveiters=5000` |
118
+ | `evaluate_network(config_path, plotting=True)` | Evaluate on test set, produce metrics |
119
+
120
+ ### Video Analysis
121
+
122
+ | Function | Description |
123
+ |----------|-------------|
124
+ | `analyze_videos(config_path, videos, videotype, save_as_csv)` | Predict poses for all frames in videos |
125
+ | `create_labeled_video(config_path, videos, videotype, filtered)` | Overlay predicted keypoints on video |
126
+ | `video_inference_superanimal(videos, superanimal_name, ...)` | Zero-shot inference with pretrained SuperAnimal models |
127
+
128
+ ### Post-Processing
129
+
130
+ | Function | Description |
131
+ |----------|-------------|
132
+ | `filterpredictions(config_path, video, ...)` | Smooth predictions (ARIMA, median filtering) |
133
+ | `analyzeskeleton(config_path, video, ...)` | Compute bone lengths, joint angles from predictions |
134
+ | `plot_trajectories(config_path, video, ...)` | Plot body part trajectories over time |
135
+
136
+ ### SuperAnimal Pretrained Models
137
+
138
+ Available models for zero-shot inference:
139
+
140
+ | Model | Species | Body Parts |
141
+ |-------|---------|------------|
142
+ | `superanimal_topviewmouse` | Top-view mouse (various strains) | 21 keypoints |
143
+ | `superanimal_quadruped` | Quadrupeds (dog, horse, sheep, etc.) | 39 keypoints |
144
+ | `superanimal_face` | Primate/human faces | 54 keypoints |
145
+ | `superanimal_full` | Full body animals (topview mouse + quadruped) | Combined |
146
+
147
+ ## Common Pitfalls
148
+
149
+ 1. **Wrong PyTorch version**: Always install PyTorch BEFORE deeplabcut. Check [pytorch.org](https://pytorch.org) for the correct CUDA version.
150
+ 2. **GPU out of memory**: Reduce batch size (default 8 → 4 or 2) in `pose_cfg.yaml`.
151
+ 3. **Missing GUI dependencies**: `label_frames` requires `pip install "deeplabcut[gui]"`. On headless servers, use X11 forwarding or label locally.
152
+ 4. **Video codec issues**: If `create_labeled_video` fails, try converting to `.mp4` (H.264) or `.avi` first.
153
+ 5. **maDLC detector**: Multi-animal mode requires a detection model (`fasterrcnn_resnet50_fpn_v2` is the default). Single-animal can work with heatmap regression alone.
154
+ 6. **SuperAnimal scale**: Adjust `scale_list` parameter for SuperAnimal — try `[200, 300, 400]` first; smaller animals may need higher values.
@@ -0,0 +1,89 @@
1
+ # 3D Pose Estimation Reference
2
+
3
+ ## Table of Contents
4
+ 1. [Overview](#overview)
5
+ 2. [Camera Setup & Calibration](#camera-setup-calibration)
6
+ 3. [3D Triangulation](#3d-triangulation)
7
+ 4. [Creating 3D Labeled Videos](#creating-3d-labeled-videos)
8
+
9
+ ## Overview
10
+
11
+ DeepLabCut 3D reconstructs 3D poses from 2+ calibrated camera views. The workflow:
12
+
13
+ ```
14
+ Multiple cameras → Calibrate → Analyze each view (2D) → Triangulate → 3D poses
15
+ ```
16
+
17
+ ## Camera Setup & Calibration
18
+
19
+ ```python
20
+ import deeplabcut as dlc
21
+
22
+ # Create 3D project
23
+ config_path = dlc.create_new_project_3d(
24
+ "3D_Project",
25
+ "ExperimenterName",
26
+ num_cameras=2, # number of camera views
27
+ working_directory="/path/to/projects",
28
+ )
29
+ ```
30
+
31
+ Calibration requires a checkerboard visible in all cameras simultaneously:
32
+
33
+ ```python
34
+ # Calibrate cameras
35
+ dlc.calibrate_cameras(
36
+ config_path,
37
+ cbrow=8, # checkerboard rows (inner corners)
38
+ cbcol=6, # checkerboard cols (inner corners)
39
+ calibrate=False, # True to run calibration
40
+ alpha=0, # 0 = crop to valid region; 1 = keep all pixels
41
+ )
42
+
43
+ # Verify calibration quality
44
+ dlc.check_undistortion(
45
+ config_path,
46
+ cbrow=8,
47
+ cbcol=6,
48
+ )
49
+ ```
50
+
51
+ ## 3D Triangulation
52
+
53
+ Each camera view is analyzed independently, then triangulated:
54
+
55
+ ```python
56
+ # Step 1: Analyze each camera's video separately
57
+ for cam_config in camera_configs:
58
+ dlc.analyze_videos(cam_config, [f"camera{i}_video.mp4"])
59
+ dlc.filterpredictions(cam_config, [f"camera{i}_video.mp4"])
60
+
61
+ # Step 2: Triangulate 2D→3D
62
+ dlc.triangulate(
63
+ config_path,
64
+ video_path="/path/to/videos/",
65
+ filterpredictions=True,
66
+ videotype=".mp4",
67
+ )
68
+ ```
69
+
70
+ ## Creating 3D Labeled Videos
71
+
72
+ ```python
73
+ dlc.create_labeled_video_3d(
74
+ config_path,
75
+ path="/path/to/videos/",
76
+ start=0, # start frame
77
+ end=1000, # end frame
78
+ videotype=".mp4",
79
+ )
80
+ ```
81
+
82
+ ## Calibration Tips
83
+
84
+ - Use a printed checkerboard with known square size (in mm)
85
+ - Film the checkerboard moving through all areas where the animal moves
86
+ - Record at least 30-50 synchronized frames of the checkerboard from each camera
87
+ - `pick_corners`: if `True`, manually click corners on one frame; `False` for automatic detection
88
+ - Sync cameras with a flash/LED or use hardware triggers
89
+ - Higher resolution cameras give better 3D accuracy
@@ -0,0 +1,123 @@
1
+ # Multi-Animal Pose Estimation (maDLC) Reference
2
+
3
+ ## Table of Contents
4
+ 1. [Overview](#overview)
5
+ 2. [Creating a maDLC Project](#creating-a-madlc-project)
6
+ 3. [Training maDLC](#training-madlc)
7
+ 4. [Video Analysis for maDLC](#video-analysis-for-madlc)
8
+ 5. [Tracking & Tracklets](#tracking-tracklets)
9
+
10
+ ## Overview
11
+
12
+ Multi-animal DeepLabCut supports tracking multiple interacting animals simultaneously. It uses a two-step approach:
13
+ 1. **Detection**: Find all animals in each frame (Faster R-CNN)
14
+ 2. **Pose estimation**: Estimate keypoints for each detected animal
15
+
16
+ Then **tracking** links detections across frames to form persistent animal identities.
17
+
18
+ ## Creating a maDLC Project
19
+
20
+ ```python
21
+ import deeplabcut as dlc
22
+
23
+ config_path = dlc.create_new_project(
24
+ "MultiMouseProject",
25
+ "ExperimenterName",
26
+ ["/path/to/video.mp4"],
27
+ working_directory="/path/to/projects",
28
+ multianimal=True, # KEY: enables maDLC mode
29
+ )
30
+ ```
31
+
32
+ In `config.yaml`, the `individuals` field lists the animals to track:
33
+
34
+ ```yaml
35
+ individuals:
36
+ - mouse1
37
+ - mouse2
38
+ - mouse3
39
+ ```
40
+
41
+ The skeleton defines connections both within and optionally between animals.
42
+
43
+ ## Training maDLC
44
+
45
+ maDLC uses two networks: a detector and a pose model.
46
+
47
+ ```python
48
+ # Create training dataset (trains both detector + pose model)
49
+ dlc.create_multianimaltraining_dataset(
50
+ config_path,
51
+ net_type="dlcrnet_ms5", # good for multi-animal
52
+ detector_type="fasterrcnn_resnet50_fpn_v2",
53
+ num_shuffles=1,
54
+ )
55
+
56
+ # Train
57
+ dlc.train_network(
58
+ config_path,
59
+ maxiters=100000,
60
+ saveiters=5000,
61
+ )
62
+ ```
63
+
64
+ **Key differences from single-animal:**
65
+ - Labels include animal identity (which mouse is which)
66
+ - Detector network runs first to find all animals
67
+ - `numframes2pick` is per-animal; label ~20 frames per individual
68
+ - Labeling is more time-consuming; use the GUI's animal switching feature
69
+
70
+ ## Video Analysis for maDLC
71
+
72
+ ```python
73
+ # Analyze
74
+ dlc.analyze_videos(
75
+ config_path,
76
+ ["/path/to/video.mp4"],
77
+ videotype=".mp4",
78
+ auto_track=True, # track animals across frames
79
+ track_method="box", # "box" (IoU) or "skeleton" (pose similarity)
80
+ )
81
+
82
+ # Create labeled video
83
+ dlc.create_labeled_video(
84
+ config_path,
85
+ ["/path/to/video.mp4"],
86
+ filtered=True,
87
+ videotype=".mp4",
88
+ )
89
+ ```
90
+
91
+ ## Tracking & Tracklets
92
+
93
+ After analysis, refine tracking:
94
+
95
+ ```python
96
+ # Convert detections to tracklets
97
+ dlc.convert_detections2tracklets(
98
+ config_path,
99
+ ["/path/to/video.mp4"],
100
+ videotype=".mp4",
101
+ track_method="box",
102
+ )
103
+
104
+ # Manually refine tracklets in GUI
105
+ # dlc.refine_tracklets(config_path, ["/path/to/video.mp4"])
106
+
107
+ # Stitch corrected tracklets into final predictions
108
+ dlc.stitch_tracklets(
109
+ config_path,
110
+ ["/path/to/video.mp4"],
111
+ videotype=".mp4",
112
+ )
113
+ ```
114
+
115
+ ## Common Issues
116
+
117
+ | Problem | Solution |
118
+ |---------|----------|
119
+ | Animals not detected | Lower detection threshold in `inference_cfg.yaml` |
120
+ | ID swaps | Use `track_method="skeleton"` for more robust tracking |
121
+ | Animals too similar | Add distinguishing features (ear tags, fur marks) or use re-identification |
122
+ | Detection too slow | Use `fasterrcnn_mobilenet_v3_large_fpn` as detector |
123
+ | Missing keypoints on occluded animals | Increase `numframes2pick`, add more labeled frames with occlusions |