{"id":24744475,"url":"https://github.com/ophiase/microorganism-computer-vision","last_synced_at":"2025-06-21T05:33:55.612Z","repository":{"id":273282892,"uuid":"899722169","full_name":"Ophiase/Microorganism-Computer-Vision","owner":"Ophiase","description":"Computer Vision 🧫  - Analysis of the motion of microorganisms 🦠 | Work in progress","archived":false,"fork":false,"pushed_at":"2025-02-17T00:51:58.000Z","size":60689,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T22:37:26.805Z","etag":null,"topics":["computer-vision","microorganism","motion-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ophiase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-06T21:43:17.000Z","updated_at":"2025-02-17T00:52:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bcaee22-f72c-4c2b-b84f-fea50c8e4502","html_url":"https://github.com/Ophiase/Microorganism-Computer-Vision","commit_stats":null,"previous_names":["ophiase/microorganism-computer-vision"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Ophiase/Microorganism-Computer-Vision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ophiase%2FMicroorganism-Computer-Vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ophiase%2FMicroorganism-Computer-Vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ophiase%2FMicroorganism-Computer-Vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ophiase%2FMicroorganism-Computer-Vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ophiase","download_url":"https://codeload.github.com/Ophiase/Microorganism-Computer-Vision/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ophiase%2FMicroorganism-Computer-Vision/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261068908,"owners_count":23105153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","microorganism","motion-analysis"],"created_at":"2025-01-28T02:18:36.977Z","updated_at":"2025-06-21T05:33:50.591Z","avatar_url":"https://github.com/Ophiase.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microorganism Computer Vision 🧫\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Python 3.11.5+](https://img.shields.io/badge/Python-3.11.5%2B-yellow.svg)](https://www.python.org/)\n\nA comprehensive computer vision pipeline for analyzing microorganism 🦠 motility patterns and diffusion characteristics.\n\nDeadline: 28th February 2025\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./resources/results/342843_original.gif\" width=\"30%\"\u003e\n  \u003cimg src=\"./resources/results/342843_transformed.gif\" width=\"30%\"\u003e\n  \u003cimg src=\"./resources/results/342843.avi/trajectories.png\" width=\"30%\"\u003e\n\u003c/div\u003e\n\n## 🌟 Features\n\n- **Multi-modal Tracking**\n  - Optical flow-based motion estimation\n  - Kalman-filter enhanced object detection\n  - Synthetic trajectory generation\n- **Advanced Diffusion Analysis**\n  - 6 statistical hypothesis tests for motility patterns\n  - Automated trajectory classification\n  - Comprehensive visualization toolkit\n- **Scalable Architecture**\n  - Modular pipeline design\n  - Configurable hypothesis parameters\n  - Batch processing capabilities\n\n## 🧩 Diffusion Hypothesis Tests\n\nOur framework implements sophisticated statistical tests to characterize microbial motion:\n\n| Hypothesis Test | Key Mechanism | Biological Relevance |\n|-----------------|---------------|----------------------|\n| **Circular Motion** \u003cbr\u003e `CircularMotionTest` | Curvature analysis + rotation angle detection | Magnetotactic bacteria, spiral-seeking organisms |\n| **Directional Switching** \u003cbr\u003e `DirectionalSwitchTest` | Fourier analysis of angular changes | Run-and-tumble motility (e.g., *E. coli*) |\n| **Gaussian Random Walk** \u003cbr\u003e `GaussianRandomWalkTest` | Kolmogorov-Smirnov normality test | Passive diffusion in isotropic environments |\n| **MSD Linear Fit** \u003cbr\u003e `MSDLinearTest` | R² evaluation of mean squared displacement | Normal diffusion processes |\n| **Persistent Motion** \u003cbr\u003e `PersistentMotionTest` | Velocity autocorrelation analysis | Active transport mechanisms |\n| **Subdiffusion** \u003cbr\u003e `SubDiffusionTest` | Power law exponent ($\\alpha \u003c 1$) detection | Crowded environments, viscoelastic media |\n\n\n\n## 🚀 Installation\n\n```bash\n# Clone repository\ngit clone git@github.com:Ophiase/Microorganism-Computer-Vision.git\ncd Microorganism-Computer-Vision\n\n# Install dependencies\nmake pip\n\n# Download sample dataset\nmake extract\n```\n\n## 🧪 Usage\n\nProcess real videos:\n```bash\n# Full pipeline execution\nmake transform      # Preprocess videos\nmake detection      # Track microorganisms\nmake render         # Generate gifs\nmake analysis       # Run statistical tests and graphics\n```\nGenerate synthetic data:\n\n```bash\nmake synthetic      # Create trajectory datasets\npython3 -m script.main --task analysis --video synthetic_brownian\n# \"brownian\" can be replaced by directed, sinusoidal, confined, ctrw, ...\n```\n\nKey Makefile Targets:\n\n```makefile\ndetection     # Track objects in videos\nrender        # Generate trajectory visualizations\nanalysis      # Perform statistical testing\nsynthetic     # Generate synthetic trajectories\n```\n\n## 📊 Results Interpretation\n\n\n- \u003cdiv style=\"text-align: center;\"\u003e\n  \u003cimg src=\"./resources/results/342843.avi/angular_distribution.png\" width=\"290\"\u003e\n  \u003cimg src=\"./resources/results/342843.avi/speed_distribution_per_trajectory.png\" width=\"300\"\u003e\n\u003c/div\u003e\n\n- \u003cdiv style=\"text-align: center;\"\u003e\n  \u003cimg src=\"./resources/results/342843.avi/trajectories.png\" width=\"290\"\u003e\n  \u003cimg src=\"./resources/results/342843.avi/speed_distribution.png\" width=\"300\"\u003e\n\u003c/div\u003e\n\n## 📂 Data Structure\n\n```bash\nmicroorganism-cv/\n├── data/                           # Raw and processed data\n│   ├── preprocessed/               # Normalized video tensors\n│   └── tracking/                   # Trajectory datasets\n├── logic/                          # Core algorithms\n│   ├── diffusion/                  # Statistical tests\n│   ├── filters/                    # Image processing\n│   └── structure/                  # Data models\n├── script/                         # Pipeline components\n└── visualization/                  # Plotting utilities\n```\n\n## 📚 Methodology\nOur pipeline implements a multi-stage analysis process:\n\n### Preprocessing\n- Optical flow estimation\n- Spatial normalization\n- Noise reduction\n\n### Object Detection\n- Adaptive thresholding (❌ not implemented)\n- Connected component analysis\n- Kalman-filter based tracking\n\n### Trajectory Analysis\n- [MSD](https://en.wikipedia.org/wiki/Mean_squared_displacement) calculations\n- Velocity autocorrelation\n- Directional persistence metrics\n\n### Statistical Classification\n- Hypothesis testing\n- Confidence interval estimation (❌ not implemented)\n- [Motility](https://en.wikipedia.org/wiki/Motility) pattern classification\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fophiase%2Fmicroorganism-computer-vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fophiase%2Fmicroorganism-computer-vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fophiase%2Fmicroorganism-computer-vision/lists"}