|
1 | 1 | import click |
2 | 2 | import sys, os |
3 | 3 |
|
4 | | -__version__ = "0.1.1" |
| 4 | +__version__ = "0.2.0" |
5 | 5 |
|
6 | 6 | DYNAMICDET_AVAILABLE_MODELS = ["yolov7", "yolov7x", "yolov7-w6", "yolov7-e6", "yolov7-d6", "yolov7-e6e"] |
7 | 7 |
|
@@ -60,31 +60,32 @@ def main(): |
60 | 60 | pass |
61 | 61 |
|
62 | 62 | @main.command() |
63 | | -@click.option("--labels", required=True, help="Path to the labels directory") |
64 | | -@click.option("--images", required=True, help="Path to the images directory") |
65 | | -@click.option("--output", required=True, help="Path to the output directory") |
| 63 | +@click.option("--labels", type=str, required=True, help="Path to the labels directory") |
| 64 | +@click.option("--images", type=str, required=True, help="Path to the images directory") |
| 65 | +@click.option("--output", type=str, required=True, help="Path to the output directory") |
66 | 66 | def split(labels, images, output): |
67 | 67 | click.echo("Splitting micrographs for training and validation...") |
68 | 68 | import partinet.process_utils.split_train |
69 | 69 | partinet.process_utils.split_train.main(labels, images, output) |
70 | 70 |
|
71 | 71 | @main.command() |
72 | | -@click.option("--labels", required=True, help="Path to the labels directory") |
73 | | -@click.option("--images", required=True, help="Path to the images directory") |
74 | | -@click.option("--output", required=True, help="Path to the output STAR file") |
75 | | -@click.option("--conf", default=0.0, help="Minimum confidence threshold from predictions") |
| 72 | +@click.option("--labels", type=str, required=True, help="Path to the labels directory") |
| 73 | +@click.option("--images", type=str, required=True, help="Path to the images directory") |
| 74 | +@click.option("--output", type=str, required=True, help="Path to the output STAR file") |
| 75 | +@click.option("--conf", type=float, default=0.0, help="Minimum confidence threshold from predictions") |
76 | 76 | def star(labels, images, output,conf): |
77 | 77 | click.echo("Generating STAR file...") |
78 | 78 | import partinet.process_utils.star_file |
79 | 79 | partinet.process_utils.star_file.main(labels,images,output,conf) |
80 | 80 |
|
81 | 81 | @main.command() |
82 | | -@click.option("--source", required=True, help="Path to Raw micrographs") |
83 | | -@click.option('--project', required=True, help='save denoised micrographs to project/denoised', show_default=True) |
84 | | -def denoise(source, project): |
| 82 | +@click.option("--source", type=str, required=True, help="Path to Raw micrographs") |
| 83 | +@click.option('--project', type=str, required=True, help='save denoised micrographs to project/denoised', show_default=True) |
| 84 | +@click.option('--num_workers', type=int, default=None, help='Number of workers for denoising micrographs') |
| 85 | +def denoise(source, project, num_workers): |
85 | 86 | click.echo("Denoising micrographs...") |
86 | 87 | import partinet.process_utils.pooled_denoise_proc |
87 | | - partinet.process_utils.pooled_denoise_proc.main(source,project) |
| 88 | + partinet.process_utils.pooled_denoise_proc.main(source,project,num_workers) |
88 | 89 |
|
89 | 90 |
|
90 | 91 | @main.group() |
|
0 commit comments