diff --git a/main.py b/main.py index 9c09ff0..1ed8ca2 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,18 @@ +from serve_roformer import RoformerService + def main(): print("Hello from model-yolo-person-classify-market!") + # uv run python person_attr.py --image_url "https://acai.ketidev.kr:20443/detect/image/202606/20260619_145116_image.jpg" --xywh "404,290,74,193" + + roformer_service = RoformerService() + roformer_service.load("net_last.pth") + result = roformer_service.predict({ + "image_url": "https://acai.ketidev.kr:20443/detect/image/202606/20260619_145116_image.jpg", + "xywh": "404,290,74,193" + }) + print(result) + if __name__ == "__main__": main() diff --git a/serve_roformer.py b/serve_roformer.py index 7629527..b29bdd6 100644 --- a/serve_roformer.py +++ b/serve_roformer.py @@ -4,7 +4,7 @@ # from person_attr import PersonAttributeModel -class PersonAttrService(PersonAttribute): +class RoformerService(PersonAttribute): def __init__(self): # ClearML이 load(model_filepath)로 가중치를 주입하므로 초기 로드는 생략 super().__init__(auto_load=False)