miso


Namemiso JSON
Version 3.1.24 PyPI version JSON
download
home_pagehttps://github.com/microfossil/particle-classification
SummaryPython scripts for training CNNs for particle classification
upload_time2024-02-20 11:52:58
maintainer
docs_urlNone
authorRoss Marchant
requires_python>=3.9,<=3.11
licenseMIT
keywords microfossil cnn
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Particle Classification
Python scripts for particle classification

Used by particle trieur to perform model training.

## Installation

```
conda create -n miso python=3.9
conda activate miso
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
pip install tensorflow==2.10.1
pip install miso
```

## Updating

```
conda activate miso
pip install -U miso
```

## Command line interface (CLI)

### Train a model

TBD

### Classify a folder of images

Classifies a folder of images and saves the result in a CSV. This CSV can be imported into Particle Trieur. If the images are organised by sample into subfolders it will use the subfolder name as the sample name, else specify the sample name manually.

```
Usage: python -m miso classify-folder [OPTIONS]

  Classify images in a folder and output the results to a CSV file.

Options:
  -m, --model PATH              Path to the model information.  [required]
  -i, --input PATH              Path to the directory containing images.
                                [required]
  -o, --output PATH             Path where the output CSV will be saved.
                                [required]
  -b, --batch_size INTEGER      Batch size for processing images.  [default:
                                32]
  -s, --sample TEXT             Default sample name if not using
                                subdirectories.  [default: unknown]
  -u, --unsure_threshold FLOAT  Threshold below which predictions are
                                considered unsure.  [default: 0.0]
```

### Morphology of a folder of plankton images

Does morphology on a folder of plankton images and saves the result in a CSV. This CSV can be imported into Particle Trieur as parameters. If the images are organised by sample into subfolders it will use the subfolder name as the sample name, else specify the sample name manually.

The plankton model must first be downloaded from here: https://1drv.ms/f/s!AiQM7sVIv7fanuNzfcw2O8kAnDU26Q?e=NA5ztG

Make sure to put the `model.onnx` and the `model_info.xml` files in the same folder

```
Usage: python -m miso segment-folder [OPTIONS]

  Segment images in a folder and output the results.

Options:
  -m, --model PATH          Path to the model information.  [required]
  -i, --input PATH          Path to the folder containing images.  [required]
  -o, --output PATH         Path where the morphology csv will be saved.
                            [required]
  -b, --batch_size INTEGER  Batch size for processing images.  [default: 32]
  -s, --sample TEXT         Default sample name  [default: unknown]
  -t, --threshold FLOAT     Threshold for segmentation.  [default: 0.5]
  --save-contours           Whether to save contours or not.
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/microfossil/particle-classification",
    "name": "miso",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<=3.11",
    "maintainer_email": "",
    "keywords": "microfossil,cnn",
    "author": "Ross Marchant",
    "author_email": "ross.g.marchant@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8b/3d/d37b7d628d1570631c4451868204936b321b7a050fcc74c4f1a7a9f4f4bf/miso-3.1.24.tar.gz",
    "platform": null,
    "description": "# Particle Classification\nPython scripts for particle classification\n\nUsed by particle trieur to perform model training.\n\n## Installation\n\n```\nconda create -n miso python=3.9\nconda activate miso\nconda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0\npip install tensorflow==2.10.1\npip install miso\n```\n\n## Updating\n\n```\nconda activate miso\npip install -U miso\n```\n\n## Command line interface (CLI)\n\n### Train a model\n\nTBD\n\n### Classify a folder of images\n\nClassifies a folder of images and saves the result in a CSV. This CSV can be imported into Particle Trieur. If the images are organised by sample into subfolders it will use the subfolder name as the sample name, else specify the sample name manually.\n\n```\nUsage: python -m miso classify-folder [OPTIONS]\n\n  Classify images in a folder and output the results to a CSV file.\n\nOptions:\n  -m, --model PATH              Path to the model information.  [required]\n  -i, --input PATH              Path to the directory containing images.\n                                [required]\n  -o, --output PATH             Path where the output CSV will be saved.\n                                [required]\n  -b, --batch_size INTEGER      Batch size for processing images.  [default:\n                                32]\n  -s, --sample TEXT             Default sample name if not using\n                                subdirectories.  [default: unknown]\n  -u, --unsure_threshold FLOAT  Threshold below which predictions are\n                                considered unsure.  [default: 0.0]\n```\n\n### Morphology of a folder of plankton images\n\nDoes morphology on a folder of plankton images and saves the result in a CSV. This CSV can be imported into Particle Trieur as parameters. If the images are organised by sample into subfolders it will use the subfolder name as the sample name, else specify the sample name manually.\n\nThe plankton model must first be downloaded from here: https://1drv.ms/f/s!AiQM7sVIv7fanuNzfcw2O8kAnDU26Q?e=NA5ztG\n\nMake sure to put the `model.onnx` and the `model_info.xml` files in the same folder\n\n```\nUsage: python -m miso segment-folder [OPTIONS]\n\n  Segment images in a folder and output the results.\n\nOptions:\n  -m, --model PATH          Path to the model information.  [required]\n  -i, --input PATH          Path to the folder containing images.  [required]\n  -o, --output PATH         Path where the morphology csv will be saved.\n                            [required]\n  -b, --batch_size INTEGER  Batch size for processing images.  [default: 32]\n  -s, --sample TEXT         Default sample name  [default: unknown]\n  -t, --threshold FLOAT     Threshold for segmentation.  [default: 0.5]\n  --save-contours           Whether to save contours or not.\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python scripts for training CNNs for particle classification",
    "version": "3.1.24",
    "project_urls": {
        "Homepage": "https://github.com/microfossil/particle-classification",
        "Paper": "https://jm.copernicus.org/articles/39/183/2020/",
        "Source": "https://github.com/microfossil/particle-classification"
    },
    "split_keywords": [
        "microfossil",
        "cnn"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a97240f8109344ac8aa8f5da68090ca07f192032a0bf5839fbae31701f23d6c0",
                "md5": "75cfd740b01f78e7a43465936a866b95",
                "sha256": "dcc411b86b64bae01d0d92b87126c910b4afa5cccf2011f1ae12141d09cd73ca"
            },
            "downloads": -1,
            "filename": "miso-3.1.24-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75cfd740b01f78e7a43465936a866b95",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<=3.11",
            "size": 106021,
            "upload_time": "2024-02-20T11:52:56",
            "upload_time_iso_8601": "2024-02-20T11:52:56.477193Z",
            "url": "https://files.pythonhosted.org/packages/a9/72/40f8109344ac8aa8f5da68090ca07f192032a0bf5839fbae31701f23d6c0/miso-3.1.24-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8b3dd37b7d628d1570631c4451868204936b321b7a050fcc74c4f1a7a9f4f4bf",
                "md5": "ff9c8c8341a0fbb0c21a04c060aa2023",
                "sha256": "072adb5be9b0c2412d781ac040a04f2e9c2205ba4f84b8ffc368911b97c176d9"
            },
            "downloads": -1,
            "filename": "miso-3.1.24.tar.gz",
            "has_sig": false,
            "md5_digest": "ff9c8c8341a0fbb0c21a04c060aa2023",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<=3.11",
            "size": 84450,
            "upload_time": "2024-02-20T11:52:58",
            "upload_time_iso_8601": "2024-02-20T11:52:58.440802Z",
            "url": "https://files.pythonhosted.org/packages/8b/3d/d37b7d628d1570631c4451868204936b321b7a050fcc74c4f1a7a9f4f4bf/miso-3.1.24.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-20 11:52:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "microfossil",
    "github_project": "particle-classification",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "miso"
}
        
Elapsed time: 0.18188s