Skip to content
Snippets Groups Projects
Commit febe26dd authored by Stephane Chavin's avatar Stephane Chavin
Browse files

modify

parent 52956164
No related branches found
No related tags found
No related merge requests found
...@@ -52,9 +52,12 @@ def overlay_annotations(image_path, annotation_path, detection_path, output_dire ...@@ -52,9 +52,12 @@ def overlay_annotations(image_path, annotation_path, detection_path, output_dire
cv2.putText(image, label, text_shape, cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 1) cv2.putText(image, label, text_shape, cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 1)
output_path = os.path.join(output_directory, f'{base_name}.jpg') output_path = os.path.join(output_directory, f'{base_name}.jpg')
if not os.path.exists(output_directory):
os.mkdir(output_directory)
plt.imshow(image, cmap='jet') plt.imshow(image, cmap='jet')
plt.title('Blues : ANNOTATIONS; Greens : YOLO DETECTIONS', loc = 'center') plt.title('Blues : ANNOTATION; Greens : YOLO DETECTION', loc = 'center')
plt.subplots_adjust(top=1, bottom=0, left=0, right=1)
plt.savefig(output_path) plt.savefig(output_path)
plt.close() plt.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment