wvinzh/WS_DAN_PyTorch
wvinzh/WS_DAN_PyTorch has 174 GitHub stars and 33 forks. Star changes are not measured yet. Last checked 2026-11-12 18:07 UTC. Last push 2026-10-31.
PyTorch Implementation Of WS-DAN(See Better Before Looking Closer: Weakly Supervised Data Augmentation Network for Fine-Grained Visual Classification)
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPyTorch Implementation Of WS-DAN
Introduction
This is a PyTorch implementation of the paper "See Better Before Looking Closer: Weakly Supervised Data Augmentation Network for Fine-Grained Visual Classification". It also has an official TensorFlow implementation WS_DAN. The core part of the code refers to the official version, and finally,the performance almost reaches the results reported in the paper.
Environment
- Ubuntu 16.04, GTX 1080 8G * 2, cuda 8.0
- Anaconda with Python=3.6.5, PyTorch=0.4.1, torchvison=0.2.1, etc.
- Some third-party dependencies may be installed with pip or conda when needed.
Result
| Dataset | ACC(this repo) | ACC Refine(this repo) | ACC(paper) |
|---|---|---|---|
| CUB-200-2011 | 88.20 | 89.30 | 89.4 |
| FGVC-Aircraft | 93.15 | 93.22 | 93.0 |
| Stanford Cars | 94.13 | 94.43 | 94.5 |
| Stanford Dogs | 86.03 | 86.46 | 92.2 |
You can download pretrained models from WS_DAN_Onedrive
Install
- Clone the repo
git clone https://github.com/wvinzh/WS_DAN_PyTorch
- Prepare dataset
- Download the following datasets.
| Dataset | Object | Category | Training | Testing |
|---|---|---|---|---|
| CUB-200-2011 | Bird | 200 | 5994 | 5794 |
| Stanford-Cars | Car | 100 | 6667 | 3333 |
| fgvc-aircraft | Aircraft | 196 | 8144 | 8041 |
| Stanford-Dogs | Dogs | 120 | 12000 | 8580 |
- Extract the data like following:
Fine-grained
├── CUB_200_2011
│ ├── attributes
│ ├── bounding_boxes.txt
│ ├── classes.txt
│ ├── image_class_labels.txt
│ ├── images
│ ├── images.txt
│ ├── parts
│ ├── README
├── Car
│ ├── cars_test
│ ├── cars_train
│ ├── devkit
│ └── tfrecords
├── fgvc-aircraft-2013b
│ ├── data
│ ├── evaluation.m
│ ├── example_evaluation.m
│ ├── README.html
│ ├── README.md
│ ├── vl_argparse.m
│ ├── vl_pr.m
│ ├── vl_roc.m
│ └── vl_tpfp.m
├── dogs
│ ├── file_list.mat
│ ├── Images
│ ├── test_list.mat
│ └── train_list.mat
- Prepare the ./data folder: generate file list txt (using ./utils/convert_data.py) and do soft link.
python utils/convert_data.py --dataset_name bird --root_path .../Fine-grained/CUB_200_2011
├── data
│ ├── Aircraft -> /your_root_path/Fine-grained/fgvc-aircraft-2013b/data
│ ├── aircraft_test.txt
│ ├── aircraft_train.txt
│ ├── Bird -> /your_root_path/Fine-grained/CUB_200_2011
│ ├── bird_test.txt
│ ├── bird_train.txt
│ ├── Car -> /your_root_path/Fine-grained/Car
│ ├── car_test.txt
│ ├── car_train.txt
│ ├── Dog -> /your_root_path/Fine-grained/dogs
│ ├── dog_test.txt
│ └── dog_train.txt
Usage
- Train
python train_bap.py train\
--model-name inception \
--batch-size 12 \
--dataset car \
--image-size 512 \
--input-size 448 \
--checkpoint-path checkpoint/car \
--optim sgd \
--scheduler step \
--lr 0.001 \
--momentum 0.9 \
--weight-decay 1e-5 \
--workers 4 \
--parts 32 \
--epochs 80 \
--use-gpu \
--multi-gpu \
--gpu-ids 0,1 \
A simple way is to use sh train_bap.sh or run backgroud with logs using cmd nohup sh train_bap.sh 1>train.log 2>error.log &
- Test
python train_bap.py test\
--model-name inception \
--batch-size 12 \
--dataset car \
--image-size 512 \
--input-size 448 \
--checkpoint-path checkpoint/car/model_best.pth.tar \
--workers 4 \
--parts 32 \
--use-gpu \
--multi-gpu \
--gpu-ids 0,1 \
License
This project is released under the MIT License.
관련 프로젝트 살펴보기
tensorflow/tensorflow
모두를 위한 오픈소스 머신러닝 프레임워크
201,584 스타huggingface/transformers
🤗 Transformers: 텍스트, 비전, 오디오, 멀티모달 분야의 최첨단 머신러닝 모델을 위한 모델 정의 프레임워크로, 추론과 학습을 모두 지원합니다.
168,917 스타AUTOMATIC1111/stable-diffusion-webui
Stable Diffusion 웹 UI
165,300 스타Comfy-Org/ComfyUI
그래프와 노드로 구성된 인터페이스를 갖춘, 가장 강력하고 모듈성이 뛰어난 확산 모델 GUI, API, 백엔드입니다. 세계에서 가장 빠른 로컬 추론 엔진입니다.
146,472 스타