{"id":28716440,"url":"https://github.com/rybakov-ks/particleanalyzer","last_synced_at":"2026-05-13T21:35:38.961Z","repository":{"id":291317249,"uuid":"977263314","full_name":"rybakov-ks/ParticleAnalyzer","owner":"rybakov-ks","description":"A Computer Vision-based tool for automatic segmentation and size analysis of particles in  Scanning Electron Microscope (SEM) images.","archived":false,"fork":false,"pushed_at":"2025-06-13T19:57:15.000Z","size":109209,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T03:01:47.264Z","etag":null,"topics":["computer-vision","data-analysis","deep-learning","detectron2","electron-microscopy","image-segmentation","materials-characterization","microscopy-images","nanotechnology","object-detection","particle-analysis","scanning-electron-microscopy","scientific-research","sem","sem-image-analysis","yolo"],"latest_commit_sha":null,"homepage":"https://sem.rybakov-k.ru","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rybakov-ks.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,"zenodo":null}},"created_at":"2025-05-03T19:46:57.000Z","updated_at":"2025-06-13T19:57:18.000Z","dependencies_parsed_at":"2025-06-15T03:01:14.484Z","dependency_job_id":null,"html_url":"https://github.com/rybakov-ks/ParticleAnalyzer","commit_stats":null,"previous_names":["rybakov-ks/particleanalyzer"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rybakov-ks/ParticleAnalyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakov-ks%2FParticleAnalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakov-ks%2FParticleAnalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakov-ks%2FParticleAnalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakov-ks%2FParticleAnalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rybakov-ks","download_url":"https://codeload.github.com/rybakov-ks/ParticleAnalyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakov-ks%2FParticleAnalyzer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259914865,"owners_count":22931323,"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","data-analysis","deep-learning","detectron2","electron-microscopy","image-segmentation","materials-characterization","microscopy-images","nanotechnology","object-detection","particle-analysis","scanning-electron-microscopy","scientific-research","sem","sem-image-analysis","yolo"],"created_at":"2025-06-15T03:00:59.054Z","updated_at":"2026-05-13T21:35:38.923Z","avatar_url":"https://github.com/rybakov-ks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 📑 Table of Contents\n\n1. 🔎 [ParticleAnalyzer](#particleanalyzer)\n2. ✨ [Key Features](#-key-features)\n3. 📥 [Installation Guide](#-installation-guide)\n4. 🛠 [Segmentation Optimization Guide](#-segmentation-optimization-guide)\n5. 📊 [Analysis Outputs](#-analysis-outputs)\n6. ⚙️ [Advanced Settings](#-advanced-settings)\n7. 📏 [Scale Calibration](#-scale-calibration)\n8. 📧 [Contributors](#-contributors)\n\n## ParticleAnalyzer\n[![Try Online](https://img.shields.io/badge/TRY%20ONLINE-Available%20at%20sem.rybakov--k.ru-brightgreen)](https://sem.rybakov-k.ru/)\n[![Download from PyPI](https://img.shields.io/pypi/v/particleanalyzer?label=Download%20from%20PyPI)](https://pypi.org/project/particleanalyzer/)\n[![Downloads per month](https://static.pepy.tech/badge/particleanalyzer/month)](https://pepy.tech/project/particleanalyzer)\n\nA Computer Vision Tool for Automatic Particle Segmentation and Size Analysis in Scanning Electron Microscope (SEM) Images.\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eVideo demonstrations:\u003c/strong\u003e\u003cbr\u003e\n  \u003ca href=\"Images/ParticleAnalyzer.mp4\"\u003eLocal video (MP4)\u003c/a\u003e | \n  \u003ca href=\"https://youtu.be/qlCuZDjDyqk\"\u003eYouTube demonstration\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"Images/example.gif\" alt=\"Example\"\u003e\n\u003c/div\u003e\n\n*If you encounter any errors while using ParticleAnalyzer, please open an issue in our GitHub repository or contact us directly at rybakov-ks@ya.ru for support.\nIf the model fails to segment your images correctly, please send them to rybakov-ks@ya.ru. Your submissions will be used to retrain and improve the model’s performance.*\n## ✨ Key Features\n- Automated particle segmentation in SEM images\n- SAHI mode enables accurate detection of small particles in high-resolution images via a sliding window method\n- Comprehensive statistical analysis of particle characteristics\n- Interactive visualization of size distributions\n- Dual unit support — switch between pixels and micrometers (µm)\n- Supports multiple AI models: YOLOv11, YOLOv12, and Detectron2\n- Advanced configuration options for fine-tuning detection accuracy\n- Multi-language interface: English, Russian, Simplified Chinese, Traditional Chinese (en, ru, zh-CN, zh-TW)\n- Try it online: [sem.rybakov-k.ru](https://sem.rybakov-k.ru/)\n\n## 🛠 Installation Guide\n\n ### 1. 📥 Install PyTorch with CUDA support\nMake sure your system has an NVIDIA GPU with CUDA. Install [PyTorch](https://pytorch.org/get-started/locally/) using the appropriate CUDA version (e.g., CUDA 11.8):\n   ```python\n   pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n   ```\nIf you do not have a CUDA-capable GPU, use the CPU version instead:\n   ```python\n   pip install torch torchvision torchaudio\n   ```\n### 🧪 2. Install Detectron2 (Optional)\n\nIf you want to enable advanced instance segmentation, install Detectron2:\n```python\npip install 'git+https://github.com/facebookresearch/detectron2.git'\n```\n⚠️ *There may be problems installing Detectron2. Use the official [documentation](https://detectron2.readthedocs.io/en/latest/tutorials/install.html).*\n### 📦 3. Install ParticleAnalyzer\nFinally, install ParticleAnalyzer from PyPI:\n```python\npip install ParticleAnalyzer\n```\n✅ Now you're ready to run the application:\n```python\nParticleAnalyzer run\n```\nOpen in browser: http://127.0.0.1:8000\n## 🛠 Segmentation Optimization Guide\n🔧 Core Parameters:\n   - Model Selection\n   - Detection Confidence Threshold (0-1)\n     - Increase (e.g., 0.7→0.85) to reduce false positives\n     - Decrease (e.g., 0.5→0.3) to detect faint particles\n   - IoU Threshold (0-1)\n     - Increase (e.g., 0.5→0.7) to eliminate duplicate detections\n     - Decrease for dense particle fields\n   - Enable SAHI Processing (split-analyze-merge)\n\n🧩 SAHI Configuration (for large images):\n   - Slice Size: Start with 400×400\n   - Overlap Ratio: 0.2-0.3 (prevents edge artifacts)\\\n*SAHI mode helps detect small objects in high-resolution images by using a sliding window approach*\n\n🔄 Model Selection:\n\u003cdiv align=\"center\"\u003e\n   \n| Model       | Best For                   | Speed     | Recommended Use Case               |\n|-------------|----------------------------|-----------|------------------------------------|\n| **YOLOv11** | General use (balanced)      | ⚡⚡⚡ Fast | Quick analysis of standard samples |\n| **YOLOv12** | High precision detection    | ⚡⚡ Medium | Critical measurements              |\n| **Cascade_X152** | Challenging morphology   | ⚡ Slow    | Irregular/overlapping particles    |\n\n\u003c/div\u003e\n\n## 📊 Analysis Outputs\n\n### Statistical Data Table\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"Images/2.png\" alt=\"Statistics Table\"\u003e\n\u003c/div\u003e\n\n*Comprehensive metrics including mean, median, min/max, standard deviation values for:*\n- Area (px² or µm²)\n- Perimeter (px or µm)\n- Equivalent diameter (px or µm)\n- Eccentricity (unitless)\n- Intensity values (grayscale units)\n\n### Size Distribution Visualization\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"Images/3.png\" alt=\"Distribution Plots\"\u003e\n\u003c/div\u003e\n\n*Normal distribution fitting for all measured parameters showing particle population characteristics*\n\n## Advanced Settings Panel\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"Images/4.png\" alt=\"Settings Menu\"\u003e\n\u003c/div\u003e\n\n*Configuration options include:*\n- **Model Selection**: YOLOv11, YOLOv12, Detectron2\n- **SAHI Mode**: Enable/disable sliced inference for large images\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"Images/6.gif\" alt=\"SAHI Mode\"\u003e\n\u003c/div\u003e\n\n- **Detection Threshold**: Confidence level (0-1)\n- **IOU Threshold**: Overlap threshold for NMS (0-1)\n- **Max Detections**: Maximum number of particles to detect\n- **Scaling Mode**: Pixel/µm unit selection\n- **Image Resolution**: Output resolution control\n- **Result Rounding**: Decimal places for metrics\n- **Single Particle Mode**: Detailed individual analysis\n- **Histogram Bins**: Number of intervals for distribution plots\n\n## 📐 Scale Calibration\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"Images/5.png\" alt=\"Scale Calibration\"\u003e\n\u003c/div\u003e\n\nMicrometer values are calculated by:\n1. Identifying the SEM image's scale bar using two marker points\n2. Manually specifying the known real-world distance between markers\n3. Automatically computing the pixel-to-µm conversion ratio\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"Images/7.png\" alt=\"Real Scale\"\u003e\n\u003c/div\u003e\n\n*Note: For accurate µm measurements, please ensure:*\n- The scale bar is clearly visible in your image\n- You input the correct reference distance when prompted\n- The scale bar was created at the same magnification as your particles\n\n## 📧 Contributors\nRybakov Kirill (Saratov State University): rybakov-ks@ya.ru\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frybakov-ks%2Fparticleanalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frybakov-ks%2Fparticleanalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frybakov-ks%2Fparticleanalyzer/lists"}