All Projects → layumi → Person Reid 3d

layumi / Person Reid 3d

Licence: mit
🗽 Parameter-Efficient Person Re-identification in the 3D Space 🗽

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Person Reid 3d

Visvis
Visvis - the object oriented approach to visualization
Stars: ✭ 180 (-6.74%)
Mutual labels:  3d
Awesome Webgpu
😎 Curated list of awesome things around WebGPU ecosystem.
Stars: ✭ 182 (-5.7%)
Mutual labels:  3d
Pixel2meshplusplus
Pixel2Mesh++: Multi-View 3D Mesh Generation via Deformation. In ICCV2019.
Stars: ✭ 188 (-2.59%)
Mutual labels:  3d
Robot Gui
A three.js based 3D robot interface.
Stars: ✭ 181 (-6.22%)
Mutual labels:  3d
Babylonhx
Port of Babylon.js 3D engine to Haxe.
Stars: ✭ 182 (-5.7%)
Mutual labels:  3d
Cq Editor
CadQuery GUI editor based on PyQT
Stars: ✭ 183 (-5.18%)
Mutual labels:  3d
3d Bat
3D Bounding Box Annotation Tool (3D-BAT) Point cloud and Image Labeling
Stars: ✭ 179 (-7.25%)
Mutual labels:  3d
Dicomtomesh
A command line tool to transform a DICOM volume into a 3d surface mesh (obj, stl or ply). Several mesh processing routines can be enabled, such as mesh reduction, smoothing or cleaning. Works on Linux, OSX and Windows.
Stars: ✭ 191 (-1.04%)
Mutual labels:  3d
Tinyobjloader
Tiny but powerful single file wavefront obj loader
Stars: ✭ 2,363 (+1124.35%)
Mutual labels:  3d
Lambdacube Edsl
Previous version of LambdaCube 3D as Embedded Domain Specific Language in Haskell. Check the latest system:
Stars: ✭ 186 (-3.63%)
Mutual labels:  3d
Armory
3D Engine with Blender Integration
Stars: ✭ 2,350 (+1117.62%)
Mutual labels:  3d
I3s Spec
This repository hosts the specification for Scene Layers which are containers for arbitrarily large amounts of geographic data. The delivery and persistence model for Scene Layers, referred to as Indexed 3d Scene Layer (I3S) and Scene Layer Package (SLPK) respectively, are specified.
Stars: ✭ 182 (-5.7%)
Mutual labels:  3d
Vu
Virtual Universe 3D Engine
Stars: ✭ 183 (-5.18%)
Mutual labels:  3d
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-6.22%)
Mutual labels:  3d
Pywavefront
Python library for importing Wavefront .obj files
Stars: ✭ 189 (-2.07%)
Mutual labels:  3d
Euc
A software rendering crate that lets you write shaders with Rust
Stars: ✭ 180 (-6.74%)
Mutual labels:  3d
Awesome Person Re Identification
Awesome Person Re-Identification
Stars: ✭ 184 (-4.66%)
Mutual labels:  person-reidentification
3d Human Body Shape
[ICIMCS'2017] Official Code for 3D Human Body Reshaping with Anthropometric Modeling
Stars: ✭ 192 (-0.52%)
Mutual labels:  3d
Gfm
3D maths for D gamedev. This library is deprecated, see README.md
Stars: ✭ 190 (-1.55%)
Mutual labels:  3d
Aframe
🅰️ web framework for building virtual reality experiences.
Stars: ✭ 13,428 (+6857.51%)
Mutual labels:  3d

Person Re-id in the 3D Space

Python 3.6 License: MIT

Thanks for your attention. In this repo, we provide the code for the paper [Parameter-Efficient Person Re-identification in the 3D Space ].

News

  • 30 Oct 2020. I simply modify code on three points to further improve the performance:
  1. More training epochs help; (Since we are trained from scratch)

  2. I replace the dgl to more efficient KNN implementation to accelebrate training; (DGL does not optimize KNN very well, and Matrix Multiplication works quicker. )

  3. For MSMT-17 and Duke, some classes contain too many images, while other categories are under-explored. I apply the stratified sampling, which takes training samples of each class with equal probability.

  • You may directly download my generated 3D data of the Market-1501 dataset at [OneDrive] or [GoogleDrive], and therefore you could skip the data preparation part. Just put the datasets in the same folder of the code.
├── 2DMarket\
│   ├── query/  
│   ├── train_all/
│   ├── ...
├── 3DMarket+bg\
│   ├── query/  
│   ├── train_all/
│   ├── ...
├── train.py
├── test.py 
├── ...

Prerequisites

  • Python 3.6 or 3.7
  • GPU Memory >= 4G (e.g., GTX1080)
  • Pytorch = 1.4.0 (Not Latest. Latest version is incompatible, since it changes the C++ interfaces.)
  • dgl

Install

Here I use the cuda10.1 by default.

conda create --name OG python=3.7
conda activate OG
conda install pytorch=1.4.0 torchvision=0.5.0 cudatoolkit=10.1 -c pytorch
conda install -c dglteam dgl-cuda10.1=0.4.3
pip install -r requirements.txt

If you face any error, you may first try to re-install open3d. It helps.

Prepare Data

  • You may directly download my generated 3D data of the Market-1501 dataset at [OneDrive] or [GoogleDrive], and therefore you could skip the data preparation part.

Download Market-1501, DukeMTMC-reID or MSMT17 and unzip them in the ../

Split the dataset and arrange them in the folder of ID.

python prepare_market.py
python prepare_duke.py
python prepare_MSMT.py

Link the 2DDataset

ln -s ../Market/pytorch  ./2DMarket
ln -s ../Duke/pytorch  ./2DDuke
ln -s ../MSMT/pytorch  ./2DMSMT

Generate the 3D data via the code at https://github.com/layumi/hmr (I modified the code from https://github.com/akanazawa/hmr and added 2D-to-3D color mapping.)

Training

  • Market-1501

OG-Net

python train_M.py --batch-size 16 --name Efficient_ALL_Dense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000 --slim 0.5 --flip --scale  --lrRate 4e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 64,128,256,512   --efficient

OG-Net-Small

python train_M.py --batch-size 16 --name Efficient_ALL_SDense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000 --slim 0.5 --flip --scale  --lrRate 4e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 48,96,192,384   --efficient 

OG-Net-Deep

python train_M.py --batch-size 16 --name Efficient_ALL_2SDDense_b16_lr3.5_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e500_id2_bn_k9_conv2  --id_skip 2 --slim 0.5 --flip --scale  --lrRate 3.5e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 500  --feature_dims 48,96,96,192,192,384,384  --norm_layer bn --efficient --k 9  --num_conv 2
  • DukeMTMC-reID

OG-Net

python train_M.py --batch-size 16 --name Efficient_Duke_ALL_Dense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000_balance --slim 0.5 --flip --scale  --lrRate 4e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 64,128,256,512   --efficient --dataset 2DDuke --balance

OG-Net-Small

python train_M.py --batch-size 16 --name Efficient_Duke_ALL_SDense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000 --slim 0.5 --flip --scale  --lrRate 4e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 48,96,192,384   --efficient --dataset 2DDuke

OG-Net-Deep

python train_M.py --batch-size 16 --name Duke_Efficient_ALL_2SDDense_b16_lr3.5_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000_id2_bn_k9_conv2_balance  --id_skip 2 --slim 0.5 --flip --scale  --lrRate 3.5e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 48,96,96,192,192,384,384  --norm_layer bn --efficient --k 9  --num_conv 2  --dataset 2DDuke --balance
  • CUHK-NP

OG-Net

python train_M.py --batch-size 16 --name Efficient_CUHK_ALL_Dense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000 --slim 0.5 --flip --scale  --lrRate 4e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 64,128,256,512   --efficient --dataset 2DCUHK

OG-Net-Small

python train_M.py --batch-size 16 --name Efficient_CUHK_ALL_SDense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000 --slim 0.5 --flip --scale  --lrRate 4e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 48,96,192,384    --efficient --dataset 2DCUHK

OG-Net-Deep

python train_M.py --batch-size 32 --name CUHK_Efficient_ALL_2SDDense_b32_lr3_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000_id2_bn_k9_conv2  --id_skip 2 --slim 0.5 --flip --scale  --lrRate 3e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 48,96,96,192,192,384,384  --norm_layer bn --efficient --k 9  --num_conv 2  --dataset 2DCUHK
  • MSMT-17

OG-Net

python train_M.py --batch-size 16 --name Efficient_MSMT_ALL_Dense_b16_lr3_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e800_wa0.9_balance --slim 0.5 --flip --scale  --lrRate 3e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 800  --feature_dims 64,128,256,512    --efficient --dataset 2DMSMT  --id_skip 0  --wa --wa_start 0.9 --balance

OG-Net-Small

python train_M.py --batch-size 16 --name Data_Efficient_MSMT_ALL_SDense_b16_lr3_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000_balance --slim 0.5 --flip --scale --lrRate 3e-4 --gpu_ids 0 --warm_epoch 10 --erase 0 --droprate 0.7 --use_dense --bg --adam --init 768 --cluster xyzrgb --train_all --num-epoch 1000 --feature_dims 48,96,192,384 --efficient --dataset 2DMSMT --id_skip 0 --balance

OG-Net-Deep

python train_M.py --batch-size 32 --name MSMT_Efficient_ALL_2SDDense_b32_lr3_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000_id2_bn_k9_conv2_balance  --id_skip 2 --slim 0.5 --flip --scale  --lrRate 3e-4 --gpu_ids 0 --warm_epoch 10  --erase 0  --droprate 0.7   --use_dense  --bg   --adam  --init 768  --cluster xyzrgb  --train_all   --num-epoch 1000  --feature_dims 48,96,96,192,192,384,384  --norm_layer bn --efficient --k 9  --num_conv 2  --dataset 2DMSMT --balance

Evaluation

  • Market-1501
python test_M.py  --name  Efficient_ALL_SDense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000 
  • DukeMTMC-reID
python test_M.py  --data 2DDuke --name   Efficient_Duke_ALL_SDense_b16_lr4_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000
  • MSMT-17
python test_MSMT.py  --name MSMT_Efficient_ALL_2SDDense_b32_lr3_flip_slim0.5_warm10_scale_e0_d7+bg_adam_init768_clusterXYZRGB_e1000_id2_bn_k9_conv2_balance

Pre-trained Models

Since OG-Net is really small, I has included trained models in this github repo ./snapshot.

Results

[Person Re-ID Performance]

Model name Market Duke MSMT
OG-Net-Small 85.90(66.93) 75.67(55.72) 46.67(22.24)
OG-Net 86.19(68.09) 76.93(57.20) 47.82(22.82)

[ModelNet Performance]

I add OG-Net code to https://github.com/layumi/dgcnn
Results on ModelNet are 93.3 Top1 Accuracy / 90.5 MeanClass Top1 Accuracy.

Citation

You may cite it in your paper. Thanks a lot.

@article{zheng2020person,
  title={Parameter-Efficient Person Re-identification in the 3D Space},
  author={Zhedong Zheng, Yi Yang},
  journal={arXiv 2006.04569},
  year={2020}
}

Related Work

We thank the great works of hmr, DGL, DGCNN and PointNet++. You may check their code at

The baseline models used in the paper are modified from:

Acknowledge

I would like to thank the helpful comments and suggestions from Yaxiong Wang, Yuhang Ding, Qian Liu, Chuchu Han, Tianqi Tang, Zonghan Wu and Qipeng Guo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].