Commit d4504318 authored by Sikhin VC's avatar Sikhin VC

added engine file

parent d47db010
Pipeline #69096 canceled with stage
......@@ -21,6 +21,7 @@ from scripts.utils.yolov5_trt import YoloV5TRT
from scipy.optimize import linear_sum_assignment as linear_assignment
from edge_engine.common.config import EDGE_CONFIG
import requests
from uuid import uuid1
class CementBagCounter(ModelWrapper):
......@@ -332,11 +333,10 @@ class CementBagCounter(ModelWrapper):
img2 = frame.copy()
img2 = cv2.resize(img2, (64, 64))
bs64 = str(base64.b64encode(img2).decode('utf-8')) # Changed this line. converted byte to string
json = {"eventId": "123", "cameraId": "12", "cameraName": "12", "timestamp": "123", "frame": bs64}
json = {"eventId": str(uuid1()).split('-')[0], "cameraId": EDGE_CONFIG['deviceId'], "cameraName": EDGE_CONFIG['deviceId'], "timestamp": datetime.now(), "frame": bs64}
response = requests.post(url=url, json=json)
logger.info(f"response is : {response.text}")
logger.info(f"Count: {self.count}")
frame = draw_circles_on_frame(
frame, centroid, radius=10, color=(0, 255, 0), thickness=-1
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment