Support for Korean Characters in Annotator Function Fonts #1631
-
Search before asking
QuestionI'm using the Annotator function in Roboflow Supervision and would like to add annotations in Korean. However, it seems that the default font doesn't support Korean characters. Are there any workarounds or recommended methods to enable Korean text in annotations? Thanks in advance for your help! AdditionalNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@YoungjaeDev 👋 Hello, Instead of workaround we already have a solution for Label Annotations and that is import cv2
import supervision as sv
import
image = cv2.imread(<SOURCE_IMAGE_PATH>)
model = get_model(model_id="yolov8n-640")
results = model.infer(image)[0]
detections = sv.Detections.from_inference(results)
rich_label_annotator = sv.RichLabelAnnotator(font_path=<TTF_FONT_PATH>)
annotated_image = rich_label_annotator.annotate(scene=image.copy(), detections=detections) But If you mean to run on other text require annotator like "PolygonZoneAnnotator," I am sorry we don't have support but for workaround you can do overrides to make use but for generally speaking making use case for label cases you can use RichLabelAnnotator to make it use as well. Other workaround you can put a "custom" text by making use "PIL" (Pillow) with custom font input and write what you want as well. I hope those help you out Thank you. |
Beta Was this translation helpful? Give feedback.
-
I put the TTF in and found it working fine. thanks |
Beta Was this translation helpful? Give feedback.
@YoungjaeDev 👋 Hello, Instead of workaround we already have a solution for Label Annotations and that is
RichLabelAnnotator
RichLabelAnnotator doc
But If you mean to run on other text require annotator like "PolygonZoneAnnotator," I am sorry we don't have support but for workaround you can do overrides to make use but for…