dk - edit
This commit is contained in:
@@ -11,16 +11,6 @@ from clearml import Task # 1. ClearML 임포트
|
||||
model = YOLO("./weights/yolo26m.pt") # Medium 크기 가중치 자동 다운로드
|
||||
|
||||
|
||||
def init_acai_task(output):
|
||||
task = Task.init(
|
||||
project_name="Normal_Object_Detection",
|
||||
task_name="model-yolo26-human"
|
||||
)
|
||||
|
||||
result_data = {"output": output, "status": "PASS"}
|
||||
task.upload_artifact(name="final_result", artifact_object=result_data)
|
||||
|
||||
|
||||
def xyxy_to_xywh(box: dict) -> dict:
|
||||
x1 = math.floor(box["x1"])
|
||||
y1 = math.floor(box["y1"])
|
||||
@@ -57,7 +47,20 @@ def main(image_path: str):
|
||||
}
|
||||
print(json.dumps(output, indent=2, ensure_ascii=False))
|
||||
|
||||
init_acai_task(output)
|
||||
return output
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
task = Task.init(
|
||||
project_name="Normal_Object_Detection",
|
||||
task_name="model-yolo26-human"
|
||||
)
|
||||
def init_acai_task(output):
|
||||
result_data = {"output": output, "status": "PASS"}
|
||||
task.upload_artifact(name="final_result", artifact_object=result_data)
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
@@ -77,4 +80,6 @@ if __name__ == "__main__":
|
||||
f.write(image_data)
|
||||
image_path = "image.jpg"
|
||||
|
||||
main(image_path)
|
||||
output = main(image_path)
|
||||
|
||||
init_acai_task(output)
|
||||
Reference in New Issue
Block a user