lenscloth/RKD has 420 GitHub stars and 51 forks. GitHot measured -1 stars in 24 hours and -1 in 7 days. Last checked 2026-11-12 08:54 UTC. Last push 2021-05-17.
Official pytorch Implementation of Relational Knowledge Distillation, CVPR 2019
측정된 스타 증가
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalRelational Knowledge Distillation
Official implementation of Relational Knowledge Distillation, CVPR 2019
This repository contains source code of experiments for metric learning.
Quick Start
python run.py --help
python run_distill.py --help
# Train a teacher embedding network of resnet50 (d=512)
# using triplet loss (margin=0.2) with distance weighted sampling.
python run.py --mode train \
--dataset cub200 \
--base resnet50 \
--sample distance \
--margin 0.2 \
--embedding_size 512 \
--save_dir teacher
# Evaluate the teacher embedding network
python run.py --mode eval \
--dataset cub200 \
--base resnet50 \
--embedding_size 512 \
--load teacher/best.pth
# Distill the teacher to student embedding network
python run_distill.py --dataset cub200 \
--base resnet18 \
--embedding_size 64 \
--l2normalize false \
--teacher_base resnet50 \
--teacher_embedding_size 512 \
--teacher_load teacher/best.pth \
--dist_ratio 1 \
--angle_ratio 2 \
--save_dir student
# Distill the trained model to student network
python run.py --mode eval \
--dataset cub200 \
--base resnet18 \
--l2normalize false \
--embedding_size 64 \
--load student/best.pth
Dependency
- Python 3.6
- Pytorch 1.0
- tqdm (pip install tqdm)
- h5py (pip install h5py)
- scipy (pip install scipy)
Note
- Hyper-parameters that used for experiments in the paper are specified at scripts in
exmples/. - Heavy teacher network (ResNet50 w/ 512 dimension) requires more than 12GB of GPU memory if batch size is 128.
Thus, you might have to reduce the batch size. (The experiments in the paper were conducted on P40 with 24GB of gpu memory. )
Citation
In case of using this source code for your research, please cite our paper.
@inproceedings{park2019relational,
title={Relational Knowledge Distillation},
author={Park, Wonpyo and Kim, Dongju and Lu, Yan and Cho, Minsu},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages={3967--3976},
year={2019}
}
관련 프로젝트 살펴보기
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 스타