文件最后提交记录最后更新时间
init 4 年前
!4671 【fix】批量修改模型python版本,兼容环境上的python3.8版本 * fix python version 3 年前
init 4 年前
init 4 年前
init 4 年前
init 4 年前
init 4 年前
init 4 年前
init 4 年前
!5261 【pytorch】【contrib】【cv】 模型公网地址整改 * 【pytorch】【contrib】【cv】 模型公网地址整改 2 年前
init 4 年前
init 4 年前
!941 [西安交通大学][高校贡献][Pytorch][OSNet训练]-初次提交 !941 [西安交通大学][高校贡献][Pytorch][OSNet训练]-初次提交 3 年前
init 4 年前
init 4 年前
fix link validity Co-authored-by: frozenleaves<914814442@qq.com> # message auto-generated for no-merge-commit merge: !7517 merge master into master fix link validity Created-by: frozenn Commit-by: frozenleaves Merged-by: ascend-robot Description: ## Motivation Please describe the motivation of this PR and the goal you want to achieve through this PR. ## Modification Please briefly describe what modification is made in this PR. ## Self-test (Optional) If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached. ## BC-breaking (Optional) If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR. ## Checklist **Before PR**: - [ ] The new code needs to comply with the Clean Code specification. - [ ] The PR content is self-checked, and the expression can be clear and the writing standardized **After PR**: - [ ] CLA has been signed and all committers have signed the CLA in this PR. - [ ] The ci-pipeline is passed, Code Check is passed. See merge request: Ascend/ModelZoo-PyTorch!75171 个月前
init 4 年前
init 4 年前
README.md

OSNet

This implements training of OSNet on the Market-1501 dataset, mainly modified from KaiyangZhou/deep-person-reid.

OSNet Detail

As of the current date, Ascend-Pytorch is still inefficient for contiguous operations.Therefore, OSNet is re-implemented using semantics such as custom OP.

Requirements

  • Install PyTorch (pytorch.org)

  • pip install -r requirements.txt

  • Install torchreid

    • python setup.py develop
      
  • Download the Market-1501 dataset from https://paperswithcode.com/dataset/market-1501

    • unzip Market-1501-v15.09.15.zip
      
  • Move Market-1501 dataset to 'reid-data' path

    • mkdir path_to_osnet/reid-data/
      mv Market-1501-v15.09.15 path_to_osnet/reid-data/market1501 
      

Training

To train a model, run main.py with the desired model architecture and the path to the ImageNet dataset:

# training 1p accuracy
bash test/train_full_1p.sh

# training 1p performance
bash test/train_performance_1p.sh

# training 8p accuracy
bash test/train_full_8p.sh

# training 8p performance
bash test/train_performance_8p.sh

# finetuning
bash test/train_finetune_1p.sh --data_path=real_data_path --weight=real_weight_path

# Online inference demo
python demo.py
## 备注: 识别前后图片保存到 `inference/` 文件夹下

# To ONNX
python pthtar2onnx.py 

OSNet training result

mAP AMP_Type Epochs FPS
1p-GPU - O2 1 371.383
1p-NPU - O2 1 366.464
8p-GPU 80.3 O2 350 1045.535
8p-NPU 80.2 O2 350 1091.358

公网地址说明

代码涉及公网地址参考 public_address_statement.md