fix: base64 error

main
Artem-Darius Weber 2 months ago
parent d5f3a8e190
commit 6795d683f2

@ -1,6 +1,7 @@
import cv2
from ultralytics import YOLO
import numpy as np
import base64
class DataProcessor:
def __init__(self, model_path='./../app/models/yolov9e_object_classification.pt'):

@ -21,8 +21,8 @@ def decode_image_from_base64(image_base64: str, color: bool = True) -> np.ndarra
def follow_vector():
try:
data = request.json
data['rgb'] = decode_image_from_base64(data['rgb'], color=True)
data['depth'] = decode_image_from_base64(data['depth'], color=False)
# data['rgb'] = decode_image_from_base64(data['rgb'], color=True)
# data['depth'] = decode_image_from_base64(data['depth'], color=False)
detections_info, annotated_image = data_processor.inline_detection(data)
if not detections_info and annotated_image is None:

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save