You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f=click.option('--backbone-detector', type=click.Choice(DYNAMICDET_AVAILABLE_MODELS, case_sensitive=False), help='The choice of backbone to be used.', default="yolov7", show_default=True)(f)
53
+
f=click.option('--backbone-detector', type=click.Choice(DYNAMICDET_AVAILABLE_MODELS, case_sensitive=False), help='The choice of backbone to be used.', default="yolov7-w6", show_default=True)(f)
54
54
55
55
returnf
56
56
@@ -60,19 +60,25 @@ def main():
60
60
pass
61
61
62
62
@main.command()
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
-
defsplit(labels, images, output):
67
-
click.echo("Splitting micrographs for training and validation...")
63
+
@click.option("--star", type=str, required=True, help="Path to input STAR file (or labels directory if using --split-only)")
64
+
@click.option("--images", type=str, required=True, help="Path to directory containing micrograph images")
65
+
@click.option("--output", type=str, required=True, help="Path to output directory for organized train/val data")
66
+
@click.option("--class-id", type=int, default=0, help="Class ID to assign to all particles (default: 0)")
67
+
@click.option("--test-size", type=float, default=0.25, help="Proportion of dataset to use for validation (default: 0.25)")
68
+
@click.option("--split-only", is_flag=True, help="Skip STAR conversion and only split existing labels")
@click.option("--labels", type=str, required=True, help="Path to the labels directory")
73
79
@click.option("--images", type=str, required=True, help="Path to the images directory")
74
80
@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")
81
+
@click.option("--conf", type=float, default=0.1, help="Minimum confidence threshold from predictions")
76
82
defstar(labels, images, output,conf):
77
83
click.echo("Generating STAR file...")
78
84
importpartinet.process_utils.star_file
@@ -100,7 +106,7 @@ def train():
100
106
defstep1(**params):
101
107
102
108
# dump params to terminal
103
-
click.echo("Performing DynamicDet training step 1 with config:\n ", nl=False)
109
+
click.echo("Performing PartiNet training step 1 with config:\n ", nl=False)
104
110
params["img_size"] =list(params["img_size"])
105
111
print_params(params)
106
112
@@ -116,7 +122,7 @@ def step1(**params):
116
122
@train_common_args
117
123
defstep2(**params):
118
124
119
-
click.echo("Performing DynamicDet training step 2 with config:\n ", nl=False)
125
+
click.echo("Performing PartiNet training step 2 with config:\n ", nl=False)
120
126
params["img_size"] =list(params["img_size"])
121
127
print_params(params)
122
128
@@ -129,13 +135,13 @@ def step2(**params):
129
135
partinet.DynamicDet.train_step2.main(opt)
130
136
131
137
@main.command()
132
-
@click.option('--backbone-detector', type=click.Choice(DYNAMICDET_AVAILABLE_MODELS, case_sensitive=False), help='The choice of backbone to be used.', default="yolov7", show_default=True)
138
+
@click.option('--backbone-detector', type=click.Choice(DYNAMICDET_AVAILABLE_MODELS, case_sensitive=False), help='The choice of backbone to be used.', default="yolov7-w6", show_default=True)
@click.option('--save-txt', is_flag=True, help='save results to *.txt')
@@ -156,7 +162,7 @@ def detect(**params):
156
162
# "all classes"
157
163
params["classes"] =params["classes"] orNone
158
164
159
-
click.echo("Performing DynamicDet detection with config:\n ", nl=False)
165
+
click.echo("Performing PartiNet particle detection with config:\n ", nl=False)
160
166
print_params(params)
161
167
162
168
importargparse
@@ -167,13 +173,13 @@ def detect(**params):
167
173
partinet.DynamicDet.detect.detect(opt)
168
174
169
175
@main.command()
170
-
@click.option('--backbone-detector', type=click.Choice(["yolov7", "yolov7-w6", "yolov7x"], case_sensitive=False), help='The choice of backbone to be used.', default="yolov7", show_default=True)
176
+
@click.option('--backbone-detector', type=click.Choice(["yolov7", "yolov7-w6", "yolov7x"], case_sensitive=False), help='The choice of backbone to be used.', default="yolov7-w6", show_default=True)
0 commit comments