Skip to main content

Python scripts for training CNNs for particle classification

Project description

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, will extract the sample as the subfolder 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]
  -f, --in_samples / --no-in_samples
                                  Set this flag if images are stored in
                                  subfolders, using the subfolder names as
                                  sample labels.  [default: no-in_samples]
  -s, --sample TEXT               Default sample name if not using
                                  subdirectories.  [default: unknown]
  --unsure_threshold FLOAT        Threshold below which predictions are
                                  considered unsure.  [default: 0.0]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miso-3.1.11.tar.gz (80.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miso-3.1.11-py3-none-any.whl (102.2 kB view details)

Uploaded Python 3

File details

Details for the file miso-3.1.11.tar.gz.

File metadata

  • Download URL: miso-3.1.11.tar.gz
  • Upload date:
  • Size: 80.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for miso-3.1.11.tar.gz
Algorithm Hash digest
SHA256 58a03022e98299dd1fc413a65e6d59e8669bf1340e31f47ae4d3b9e360cc0f37
MD5 a37f890426e8e694a43634b4aaa233d9
BLAKE2b-256 8154d7f49407784f97439591cd3ab9d721097e32f55ffe64317cb93ddd21c27e

See more details on using hashes here.

File details

Details for the file miso-3.1.11-py3-none-any.whl.

File metadata

  • Download URL: miso-3.1.11-py3-none-any.whl
  • Upload date:
  • Size: 102.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for miso-3.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 81fee3201b1c5550580f814388e6030753486e0711bfcb0e0dd34ab8c8c2bde1
MD5 22a698466d8b97b530e4f0bef9696078
BLAKE2b-256 24ba931cf32bfa9c6efa80e95ca1a36ecec449b628ee118f75e4af6465a4a3b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page