complete refactor javascript to typescript and reorg frontend files and folders

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-05-20 11:40:17 +02:00
parent 4341193b35
commit 4b2f38ab7f
174 changed files with 22603 additions and 3989 deletions
+3 -1
View File
@@ -1,8 +1,10 @@
# VQA Detection Utilities
# Parsing, formatting, and drawing functions for detection results (points, bboxes, gaze)
import os
from PIL import Image, ImageDraw, ImageFont
from modules import shared
from modules.paths import script_path
def parse_points(result) -> list:
@@ -311,7 +313,7 @@ def draw_bounding_boxes(image: Image.Image, detections: list, points: list | Non
# Try to load a font, fall back to default if unavailable
try:
font_size = max(12, int(min(width, height) * 0.02))
font_path = shared.opts.font or "javascript/notosans-nerdfont-regular.ttf"
font_path = shared.opts.font or os.path.join(script_path, "ui", "fonts", "notosans-nerdfont-regular.ttf")
font = ImageFont.truetype(font_path, size=font_size)
except Exception:
font = ImageFont.load_default()