Skip to content

Commit

Permalink
Typo in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
geometrikal committed Feb 8, 2024
1 parent 7ac83b4 commit 2e6c043
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions miso/__main__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import argparse
from miso.training.trainer import train_image_classification_model
from miso.training.parameters import MisoParameters

import click
from miso.inference.classify import classify_folder

# Cant have name same as cli method name
from miso.inference.classify import classify_folder as miso_classify_folder


@click.group()
Expand All @@ -18,17 +16,18 @@ def cli():
@click.option('--batch_size', '-b', type=int, default=32, show_default=True, help='Batch size for processing images.')
@click.option('--in_samples/--no-in_samples', '-f', default=False, show_default=True, help='Set this flag if images are stored in subfolders, using the subfolder names as sample labels.')
@click.option('--sample', '-s', type=str, default='unknown', show_default=True, help='Default sample name if not using subdirectories.')
@click.option('--unsure_threshold', 'u', type=float, default=0.0, show_default=True, help='Threshold below which predictions are considered unsure.')
@click.option('--unsure_threshold', '-u', type=float, default=0.0, show_default=True, help='Threshold below which predictions are considered unsure.')
def classify_folder(model, input, output, batch_size, in_samples, sample, unsure_threshold):
"""
Classify images in a folder and output the results to a CSV file.
"""
classify_folder(model, input, output, batch_size, in_samples, sample, unsure_threshold)
miso_classify_folder(model, input, output, batch_size, in_samples, sample, unsure_threshold)


if __name__ == "__main__":
cli()


# if __name__ == "__main__":
# parser = argparse.ArgumentParser(description="Train a CNN to classify images")
# parser.add_argument("-i", "--input", required=True, help="Directory of images, URL link to zipped directory of images, or ParticleTrieur project file")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='miso',
version='3.1.12',
version='3.1.14',
description='Python scripts for training CNNs for particle classification',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 2e6c043

Please sign in to comment.