VisionDK: ToolBox Of Image Classification & Face Recognition
Tutorials
Install ☘️
# It is recommanded to create a separate virtual environment
conda create -n vision python=3.10
conda activate vision
# torch==2.0.1(lower is also ok) -> https://pytorch.org/get-started/locally/
conda install pytorch torchvision torchaudio cpuonly -c pytorch # cpu-version
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia # cuda-version
pip install -r requirements.txt
# Without Arial.ttf, inference may be slow due to network IO.
mkdir -p ~/.config/DuKe
cp misc/Arial.ttf ~/.config/DuKe
Training 🌟️
# one machine one gpu
python main.py --cfgs configs/task/pet.yaml
# one machine multiple gpus
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun --nproc_per_node 4 main.py --cfgs configs/classification/pet.yaml
--sync_bn[Option: this will lead to training slowly]
--resume[Option: training from checkpoint]
--load_from[Option: training from fine-tuning]
What's New
[Apr. 2024] Face Recognition Task(FRT) is supported now 🚀️️! We provide ResNet, EfficientNet, and Swin Transformer as backbone; As for head, ArcFace, CircleLoss, MegFace and MV Softmax could be used for training. Note: partial implementation refers to JD-FaceX
[Jun. 2023] Image Classification Task(ICT) has launched 🚀️️! Supporting many powerful strategies, such as progressive learning, online enhancement, beautiful training interface, exponential moving average, etc. The models are fully integrated into torchvision.
[May. 2023] The first initialization version of Vision.