{"id":20041722,"url":"https://github.com/ajithvcoder/pedestrian_attribute_recognition","last_synced_at":"2025-05-05T08:32:22.889Z","repository":{"id":37637818,"uuid":"281369566","full_name":"ajithvcoder/Pedestrian_Attribute_Recognition","owner":"ajithvcoder","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-03T21:59:32.000Z","size":2102,"stargazers_count":9,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T19:48:12.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajithvcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-07-21T10:41:35.000Z","updated_at":"2023-07-17T13:28:14.000Z","dependencies_parsed_at":"2024-01-05T18:28:22.753Z","dependency_job_id":"3a853852-c45e-47ee-9969-98a9d943a127","html_url":"https://github.com/ajithvcoder/Pedestrian_Attribute_Recognition","commit_stats":null,"previous_names":["ajithvcoder/pedestrian_attribute_recognition"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajithvcoder%2FPedestrian_Attribute_Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajithvcoder%2FPedestrian_Attribute_Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajithvcoder%2FPedestrian_Attribute_Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajithvcoder%2FPedestrian_Attribute_Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajithvcoder","download_url":"https://codeload.github.com/ajithvcoder/Pedestrian_Attribute_Recognition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252466836,"owners_count":21752447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T10:47:37.779Z","updated_at":"2025-05-05T08:32:21.765Z","avatar_url":"https://github.com/ajithvcoder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pedestrian_Attribute_Recognition\n\nThis repo is heavily borowed from https://github.com/valencebond/Strong_Baseline_of_Pedestrian_Attribute_Recognition\n\nPaper [Rethinking of Pedestrian Attribute Recognition: Realistic Datasets with Efficient Method](https://arxiv.org/abs/2005.11909).\n\n\n\n\n## Dependencies\n\n- pytorch 1.4.0\n- torchvision 0.5.0\n- tqdm 4.43.0\n- easydict 1.9\n\n\n## Tricks\n- sample-wise loss not label-wise loss\n- big learning rate combined with clip_grad_norm\n- augmentation Pad combined with RandomCrop\n- add BN after classifier layer\n\n\n## Performance Comparision\n\n### Baseline Performance\n\n- Compared with baseline performance of MsVAA, VAC, ALM, our baseline make a huge performance improvement.\n- Compared with our reimplementation of MsVAA, VAC, ALM, our baseline is better.\n- We try our best to reimplement [MsVAA](https://github.com/cvcode18/imbalanced_learning), [VAC](https://github.com/hguosc/visual_attention_consistency) and thanks to their code.\n- We also try our best to reimplement ALM and try to contact the authors, but no reply received.\n\n![BaselinePerf](https://github.com/valencebond/Strong_Baseline_of_Pedestrian_Attribute_Recognition/blob/master/imgs/baseline.png)\n\n\n![BaselinePerf](https://github.com/valencebond/Strong_Baseline_of_Pedestrian_Attribute_Recognition/blob/master/imgs/baseline_rap2.png)\n\n\n### SOTA Performance\n\n- Compared with performance of recent state-of-the-art methods, the performance of our baseline is comparable, even better.\n\n![SOTAPerf](https://github.com/valencebond/Strong_Baseline_of_Pedestrian_Attribute_Recognition/blob/master/imgs/SOTA.png)\n\n\n- DeepMAR (ACPR15) Multi-attribute Learning for Pedestrian Attribute Recognition in Surveillance Scenarios.\n- HPNet (ICCV17) Hydraplus-net: Attentive deep features for pedestrian analysis.\n- JRL (ICCV17) Attribute recognition by joint recurrent learning of context and correlation.\n- LGNet (BMVC18) Localization guided learning for pedestrian attribute recognition.\n- PGDM (ICME18) Pose guided deep model for pedestrian attribute recognition in surveillance scenarios.\n- GRL (IJCAI18) Grouping Attribute Recognition for Pedestrian with Joint Recurrent Learning.\n- RA (AAAI19) Recurrent attention model for pedestrian attribute recognition.\n- VSGR (AAAI19) Visual-semantic graph reasoning for pedestrian attribute recognition.\n- VRKD (IJCAI19) Pedestrian Attribute Recognition by Joint Visual-semantic Reasoning and Knowledge Distillation.\n- AAP (IJCAI19) Attribute aware pooling for pedestrian attribute recognition.\n- MsVAA (ECCV18) Deep imbalanced attribute classification using visual attention aggregation.\n- VAC (CVPR19) Visual attention consistency under image transforms for multi-label image classification.\n- ALM (ICCV19) Improving Pedestrian Attribute Recognition With Weakly-Supervised Multi-Scale Attribute-Speciﬁc Localization.\n\n\n## Dataset Info\nPETA: Pedestrian Attribute Recognition At Far Distance [[Paper](http://mmlab.ie.cuhk.edu.hk/projects/PETA_files/Pedestrian%20Attribute%20Recognition%20At%20Far%20Distance.pdf)][[Project](http://mmlab.ie.cuhk.edu.hk/projects/PETA.html)]\n\nPA100K[[Paper](http://openaccess.thecvf.com/content_ICCV_2017/papers/Liu_HydraPlus-Net_Attentive_Deep_ICCV_2017_paper.pdf)][[Github](https://github.com/xh-liu/HydraPlus-Net)]\n\nRAP : A Richly Annotated Dataset for Pedestrian Attribute Recognition \n- v1.0 [[Paper](https://arxiv.org/pdf/1603.07054v3.pdf)][[Project](http://www.rapdataset.com/)]\n- v2.0 [[Paper](https://ieeexplore.ieee.org/abstract/document/8510891)][[Project](http://www.rapdataset.com/)]\n\n## Zero-shot Protocal\n\nRealistic datasets of PETA and RAPv2 are provided at [Google Drive](https://drive.google.com/drive/folders/1vPtWyJ1Qjf0T6t3zPLi4EzXCMZ46Clqg?usp=sharing).\n\nYou can just replace the 'dataset.pkl' with 'peta_new.pkl' or 'rapv2_new.pkl' to run experiments under new protocal.\n\n## Pretrained Models\n\nPretrained models are provided now at [Google Drive](https://drive.google.com/drive/folders/1t2SG7-jAalF8gx3uvApA6hUzVh_lR-y0?usp=sharing).\n\nBecause we ran the experiments again, so there may be subtle differences in performance.\n\n## Get Started\n1. Run `git clone https://github.com/valencebond/Strong_Baseline_of_Pedestrian_Attribute_Recognition.git`\n2. Create a directory to dowload above datasets. \n    ```\n    cd Strong_Baseline_of_Pedestrian_Attribute_Recognition\n    mkdir data\n\n    ```\n3. Prepare datasets to have following structure:\n    ```\n    ${project_dir}/data\n        PETA\n            images/\n            PETA.mat\n            README\n        PA100k\n            data/\n            annotation.mat\n            README.txt\n        RAP\n            RAP_dataset/\n            RAP_annotation/\n        RAP2\n            RAP_dataset/\n            RAP_annotation/\n    ```\n4. Run the `format_xxxx.py` to generate `dataset.pkl` respectively\n    ```\n    python ./dataset/preprocess/format_peta.py\n    python ./dataset/preprocess/format_pa100k.py\n    python ./dataset/preprocess/format_rap.py\n    python ./dataset/preprocess/format_rap2.py\n    ``` \n5. Train baseline based on resnet50\n    ```\n    CUDA_VISIBLE_DEVICES=0 python train.py PETA\n    ``` \n \n## Acknowledgements\n\nCodes are based on the repository from [Dangwei Li](https://github.com/dangweili/pedestrian-attribute-recognition-pytorch) \nand [Houjing Huang](https://github.com/dangweili/pedestrian-attribute-recognition-pytorch). Thanks for their released code.\n\n\n### Citation\n\nIf you use this method or this code in your research, please cite as:\n\n    @misc{jia2020rethinking,\n        title={Rethinking of Pedestrian Attribute Recognition: Realistic Datasets with Efficient Method},\n        author={Jian Jia and Houjing Huang and Wenjie Yang and Xiaotang Chen and Kaiqi Huang},\n        year={2020},\n        eprint={2005.11909},\n        archivePrefix={arXiv},\n        primaryClass={cs.CV}\n    }\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajithvcoder%2Fpedestrian_attribute_recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajithvcoder%2Fpedestrian_attribute_recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajithvcoder%2Fpedestrian_attribute_recognition/lists"}