# Market-1501 Person Attribute Recognition 이미지 URL(또는 로컬 경로)과 사람 영역(`xywh`)으로 나이, 성별, 의상 색상 등 Market-1501 속성을 추론합니다. 가중치 파일 `net_last.pth`를 `person_attr.py`와 같은 디렉터리에 두세요. ## 로컬 추론 ```bash uv run python person_attr.py \ --image_url "https://example.com/image.jpg" \ --xywh "404,290,74,193" ``` - `--image_url`: 이미지 URL 또는 로컬 경로 - `--xywh`: 좌상단 기준 `x,y,w,h` 결과는 ClearML Task(`Person_Attribute_Recognition` / `person_attribute`)에 `final_result` artifact로 업로드됩니다. ## 모델 등록 ClearML에 `net_last.pth`를 등록하고 Model ID를 출력합니다. ```bash $ uv run python register_models.py ClearML Task: created new task id=4848f30bd22f47108b545043f943c2a6 ClearML results page: https://ml.ketidev.kr/projects/33e4867258ba45d085aeb16ee4fef9ba/tasks/4848f30bd22f47108b545043f943c2a6/output/log Registering Person Attribute Model (net_last.pth)... 2026-08-20 16:38:35,882 - clearml.model - INFO - No output storage destination defined, registering local model net_last.pth ------------------------------ Person Attr Model ID: 26e4a421c5984edcbece9520dd2f5504 ------------------------------ $ ``` ## Serving ClearML Serving용 진입점은 다음 파일입니다. - `serve_roformer.py`: `PersonAttrService` (모델 로드 / `predict`) - `preprocess.py`: 요청 JSON의 `url` 또는 `image_url`과 `xywh`를 전처리