Skip to content

Commit eebabeb

Browse files
committed
Change naming from predictions to detections
1 parent 3fcb7e1 commit eebabeb

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

operate/actions/actions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
client = config.initialize_openai_client()
4242

43-
4443
yolo_model = None
4544

4645

operate/utils/labeling.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ def add_labels(base64_data, yolo_model):
6868
) # Create a separate draw object for the debug image
6969
font_size = 45
7070

71-
predictions_dir = "predictions"
71+
detections_dir = "detections"
7272
label_coordinates = {} # Dictionary to store coordinates
7373

74-
if not os.path.exists(predictions_dir):
75-
os.makedirs(predictions_dir)
74+
if not os.path.exists(detections_dir):
75+
os.makedirs(detections_dir)
7676

7777
counter = 0
7878
drawn_boxes = [] # List to keep track of boxes already drawn
@@ -117,14 +117,10 @@ def add_labels(base64_data, yolo_model):
117117

118118
# Save the image
119119
timestamp = time.strftime("%Y%m%d-%H%M%S")
120-
print("[app.py][process_image] image", f"prediction_{timestamp}_labeled.png")
121-
output_path = os.path.join(predictions_dir, f"prediction_{timestamp}_labeled.png")
122-
output_path_debug = os.path.join(
123-
predictions_dir, f"prediction_{timestamp}_debug.png"
124-
)
125-
output_path_original = os.path.join(
126-
predictions_dir, f"prediction_{timestamp}_original.png"
127-
)
120+
print("[app.py][process_image] image", f"img_{timestamp}_labeled.png")
121+
output_path = os.path.join(detections_dir, f"img_{timestamp}_labeled.png")
122+
output_path_debug = os.path.join(detections_dir, f"img_{timestamp}_debug.png")
123+
output_path_original = os.path.join(detections_dir, f"img_{timestamp}_original.png")
128124

129125
image_labeled.save(output_path)
130126
image_debug.save(output_path_debug)

0 commit comments

Comments
 (0)