[go: nahoru, domu]

Skip to content

Commit

Permalink
sa
Browse files Browse the repository at this point in the history
  • Loading branch information
hathienloc131 committed Jun 30, 2024
1 parent 3c57efc commit 7945f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/apis/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async def upload(file: UploadFile, request: Request) -> UploadRes:
print(final_bbox)
rgb_color = [tuple(random.randint(0, 255) for _ in range(3)) for _ in final_bbox]
np_img = np.array(img)
np_img = cv2.cvtColor(np_img, cv2.COLOR_RGB2BGR)
np_img = cv2.cvtColor(np_img, cv2.COLOR_BGR2RGB)
for i, box in enumerate(final_bbox):
xyxy = box["box"]
np_img = cv2.rectangle(np_img, (int(xyxy[0]), int(xyxy[1])),(int(xyxy[2]), int(xyxy[3])), rgb_color[i], thickness=3)
Expand Down

0 comments on commit 7945f03

Please sign in to comment.