https://github.com/cbica/opm

OpenSlide Patch Manager

https://github.com/cbica/opm

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 7 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary

Keywords

extractor histopathology patch patch-extraction patch-generation

Keywords from Contributors

medical-imaging data-augmentation medical-image-analysis labels biomedical-image-processing clinical-workflow medical-informatics fusion itk label-fusion
Last synced: 5 months ago · JSON representation

Repository

OpenSlide Patch Manager

Basic Info
  • Host: GitHub
  • Owner: CBICA
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 192 MB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 6
  • Open Issues: 3
  • Releases: 0
Archived
Topics
extractor histopathology patch patch-extraction patch-generation
Created about 5 years ago · Last pushed about 3 years ago
Metadata Files
Readme License

README.md

OPM

THIS CODE IS NOW DEPRECATED IN FAVOR OF github.com/mlcommons/GaNDLF

Open Patch Manager: parallel reading/writing of patches.

Installation:

For Usage Only

```powershell conda create -p ./venv python=3.8.12 -y conda activate ./venv pip install OpenPatchMiner

alternate

conda install -c conda-forge openpatchminer

```

For OPM Development

powershell git clone https://github.com/CBICA/OPM.git cd OPM/ conda create -p ./venv python=3.8.12 -y conda activate ./venv pip install .

Usage

To try an example: ```powershell

continue from virtual environment shell

Extract 10 tissue patches from images/example_slide.tiff

python patchminer.py -i images/exampleslide.tiff -lm images/example_lm.tiff -o example -c opm/config.yml

Use the output manifest from last run (example/list.csv) to re-extract the same patches for a different replicate

This is useful if you have multiple slides/label maps and you want corresponding coordinates from each of them

python patchminer.py -i images/exampleslide.tiff -lm images/examplelm.tiff -c opm/config.yml -o examplereplicate --input_csv example/list.csv ``` By default it detects tissue and extracts 1000 random patches from the included .svs file. Play with this number as well as the number of parallel threads in example.py (default patches=1000, default threads=100)

Options

There are also a handful of useful options: - READ_TYPE: either 'sequential' or 'random'. If sequential, it repeatedly takes the top-leftmost valid index until quota is met or the slide is saturated. If random, it randomly samples a patch from the valid indices until saturated or the quota is hit.

... and various other parameters such as patch size, thumbnail/valid mask scale, and masking thresholds.

Workflow

OPM follows the following workflow:

Workflow for Open Patch Miner

Project Structure

. ├── images │   ├── example_lm.tiff │   ├── example_slide.tiff │   └── opm_flowchart.png ├── LICENSE.txt ├── opm │   ├── config.py │   ├── __init__.py │   ├── patch_manager.py │   ├── patch.py │   └── utils.py ├── patch_miner.py ├── README.md ├── setup.cfg └── setup.py

Changelog

Dec. 14, 2021: - Replaced slide library with tifffile - Made barebones OpenSlide mimic with tifffile, named SlideObject - Updated requirements, bumped minimum python from 3.6 --> 3.8 (due to zarr requirements) - Updated README

Dec. 9, 2021: - Changed backend to Pandas. - Updated README

Nov. 17, 2020: - Added support for mining patches from label map along with the slide. - Updated README

Jul. 31, 2020: - Changed ALLOW_OVERLAP to OVERLAP_FACTOR. OVERLAP_FACTOR is a float from 0 to 1 that is the portion of patches that are allowed to overlap. If 0, there is no overlap allowed. If 1, they are totally allowed to overlap (except for the origin pixel).

Owner

  • Name: Center for Biomedical Image Computing & Analytics (CBICA)
  • Login: CBICA
  • Kind: organization
  • Email: software@cbica.upenn.edu
  • Location: Philadelphia, PA

CBICA focuses on the development and application of advanced computation techniques.

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 213
  • Total Committers: 7
  • Avg Commits per committer: 30.429
  • Development Distribution Score (DDS): 0.502
Past Year
  • Commits: 35
  • Committers: 2
  • Avg Commits per committer: 17.5
  • Development Distribution Score (DDS): 0.2
Top Committers
Name Email Commits
sarthakpati s****i@h****m 106
grenkoca g****a@g****m 54
Caleb Grenko 3****a@u****m 46
Sarthak Pati s****i@p****u 4
dependabot[bot] 4****]@u****m 1
geeks-sid s****r@g****m 1
Jose L. Agraz, PhD j****1@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 8
  • Total pull requests: 30
  • Average time to close issues: 3 months
  • Average time to close pull requests: 9 days
  • Total issue authors: 2
  • Total pull request authors: 5
  • Average comments per issue: 1.13
  • Average comments per pull request: 0.7
  • Merged pull requests: 26
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sarthakpati (7)
  • katesedykh (1)
Pull Request Authors
  • sarthakpati (18)
  • grenkoca (8)
  • Geeks-Sid (2)
  • shubhaminnani (1)
  • joseagraz (1)
Top Labels
Issue Labels
bug (1) enhancement (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 329 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 14
  • Total maintainers: 1
pypi.org: openpatchminer

A patch miner for large histopathology images

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 329 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 13.3%
Average: 18.7%
Dependent repos count: 21.6%
Stargazers count: 23.1%
Downloads: 25.4%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: openpatchminer
  • Versions: 4
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 47.9%
Forks count: 49.4%
Average: 51.7%
Stargazers count: 57.7%
Last synced: 6 months ago