← All models

person re-id Β· vision Β· WASM Β· ~107 MB

Person re-identification β€” is it the same person?

Face recognition looks at a face. Person re-identification looks at the whole body β€” clothing, build, gait, colour β€” to decide whether two crops from different moments or cameras show the same individual. It's how retail analytics, sports tracking, and surveillance re-find a person after they leave one camera's view. YouTu-ReID maps each person crop to a 768-d embedding; the cosine similarity between two embeddings is the match score. Pick two people below and compare β€” entirely on your device, nothing leaves the tab.

At a glance

Modelopencv/person_reid_youtureid β€” YouTu-ReID (ResNet-50-IBN), OpenCV Zoo
Taskperson-reid (whole-body appearance embedding) β€” run via raw ONNX Runtime Web (see note below)
Runtimeonnxruntime-web 1.21 (transformers.js has no person-reid class / no such task)
Inputinput [1, 3, 256, 128] float32 in 0–1 β€” a person crop (plain RGB), tall aspect
Outputoutput [1, 768] float32 β€” an L2-normalised appearance embedding; cosine similarity = match score
Quantizationfp32 ONNX β€” runs on the plain WASM execution provider, no WebGPU needed
BackendWebAssembly (single-threaded on GitHub Pages) β€” ~1 s per crop
Download~107 MB, cached after first load (auto-inits on return)
LicenseApache-2.0 (OpenCV Zoo)
Web APIsWebAssembly, Web Workers, OffscreenCanvas, ImageBitmap β€” all Baseline widely available

Run it

The people below are cropped live from one licensed marathon photo (five distinct runners, plus a second, re-framed crop of the lead runner as a stand-in for a different-camera view). Click two crops to compare their appearance embeddings.

Adds your photo (centre-cropped to a tall person box) to the gallery and selects it.

Pick two people to compare.

Why raw ONNX Runtime Web?

Transformers.js has no person-reid model class or task, so we run YouTu-ReID's ONNX graph directly with onnxruntime-web and hand-write the pre/post a pipeline would own: crop each person to the fixed 128Γ—256 input, pack it as [1,3,256,128] float32 in 0–1, and L2-normalise the 768-d output so cosine similarity is the match score. Everything runs on your device.