Practical overview
When it fits
Use it when you have one of the supported image datasets and its attribute annotations, and want a documented baseline for training, evaluation or sample-image inference.
Who it is for
- Computer-vision researchers experimenting with pedestrian attribute classification.
- Developers comparing results on the named annotated pedestrian datasets.
- Practitioners who want to inspect attribute predictions from sample pedestrian images.
Documented uses
- Train a baseline model using Market-1501 or DukeMTMC-reID data and annotations.
- Evaluate attribute predictions with the repository's testing script.
- Run inference on a sample image and inspect predicted attributes.
Requirements & limits
- Requires dataset images and matching attribute annotations for the documented training and evaluation workflow.
- The README lists Python 3.5, PyTorch >= 0.4.1 and torchvision >= 0.2.1.
- The model uses a 0.5 threshold and treats attributes as independent binary classification problems.
- The README reports that some precision, recall and F1 cases are ill-defined.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare a dataset for training or evaluation
Arrange a supported Market-1501 or DukeMTMC-reID dataset and its attribute annotations in the documented folder structure.
Before you start
- The Market-1501 or DukeMTMC-reID image dataset.
- The corresponding Market-1501-attribute or DukeMTMC-reID-attribute annotations.
- Python 3.5, PyTorch >= 0.4.1 and torchvision >= 0.2.1 for the project dependencies.
Steps
Download the image dataset and its corresponding attribute annotations.
Create an
attributefolder under the dataset path.Place the corresponding annotations in that folder; for DukeMTMC-reID, the example annotation filename is
duke_attribute.mat.
Expected outcome
A dataset directory organized for the repository's documented training and testing commands.
Guide limitations
- The README gives a DukeMTMC-reID directory example; it does not give a complete Market-1501 folder example.
- This guide covers data preparation only, not execution or successful training.
Run documented image inference
Use the repository's inference script with a sample image and the Market or Duke dataset option.
Before you start
- Python 3.5, PyTorch >= 0.4.1 and torchvision >= 0.2.1.
- A sample image, such as the documented
test_sample/test_market.jpgpath. - A downloaded trained checkpoint with its
checkpointsfolder moved to the project root.
Steps
Download one of the trained models linked in the README.
Move the downloaded
checkpointsfolder to the project root.Use the documented inference command format: the command below; the README also documents a Duke sample and dataset option.
python3 inference.py test_sample/test_market.jpg --dataset market --model resnet50
Expected outcome
The script is documented to produce pedestrian attribute predictions, such as clothing, bags and headwear.
Guide limitations
- The README documents commands and sample outputs but does not establish results for other images or environments.
- The example uses supplied sample-image paths; instructions for preparing arbitrary input images are not detailed.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- Yukun-Huang/Person-Attribute-Recognition-MarketDuke · Official homepage title · retained in its source language

