1.5 KiB
1.5 KiB
Market-1501 Person Attribute Recognition
이미지 URL(또는 로컬 경로)과 사람 영역(xywh)으로 나이, 성별, 의상 색상 등 Market-1501 속성을 추론합니다.
가중치 파일 net_last.pth를 person_attr.py와 같은 디렉터리에 두세요.
로컬 추론
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를 출력합니다.
$ uv run python register_models.py
ClearML Task: created new task id=4b8598d8fec24432bd9e0d85326873fd
ClearML results page: http://203.254.171.99:20680/projects/d9ea04a0ba33464e9c6af8a07bfd54b2/tasks/4b8598d8fec24432bd9e0d85326873fd/output/log
Registering Person Attribute Model (net_last.pth)...
2026-08-20 16:21:06,923 - clearml.model - INFO - No output storage destination defined, registering local model net_last.pth
------------------------------
Person Attr Model ID: 246dd122ed2b4c81bddbeea33e859498
------------------------------
$
Serving
ClearML Serving용 진입점은 다음 파일입니다.
serve_roformer.py:PersonAttrService(모델 로드 /predict)preprocess.py: 요청 JSON의url또는image_url과xywh를 전처리