megvii-research/mdistiller là dự án AI Tools trên GitHub, viết chủ yếu bằng Python, với 900 sao. The official implementation of [CVPR2022] Decoupled Knowledge Distillation https://arxiv.org/abs/2203.08679 and [ICCV2023] DOT: A Distillation-Oriented Trainer https://openaccess.thecvf.com/content/ICCV2023/papers/Zhao_DOT_A_Distillation-Oriented_Trainer_ICCV_2023_paper.pdf
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
If you don't want wandb as your logger, set CFG.LOG.WANDB as False at mdistiller/engine/cfg.py.
Evaluation
You can evaluate the performance of our models or models trained by yourself.
Our models are at https://github.com/megvii-research/mdistiller/releases/tag/checkpoints, please download the checkpoints to ./download_ckpts
If test the models on ImageNet, please download the dataset at https://image-net.org/ and put them to ./data/imagenet
# evaluate teachers
python3 tools/eval.py -m resnet32x4 # resnet32x4 on cifar100
python3 tools/eval.py -m ResNet34 -d imagenet # ResNet34 on imagenet
# evaluate students
python3 tools/eval.p -m resnet8x4 -c download_ckpts/dkd_resnet8x4 # dkd-resnet8x4 on cifar100
python3 tools/eval.p -m MobileNetV1 -c download_ckpts/imgnet_dkd_mv1 -d imagenet # dkd-mv1 on imagenet
python3 tools/eval.p -m model_name -c output/your_exp/student_best # your checkpoints
Training on CIFAR-100
Download the cifar_teachers.tar at https://github.com/megvii-research/mdistiller/releases/tag/checkpoints and untar it to ./download_ckpts via tar xvf cifar_teachers.tar.
# for instance, our DKD method.
python3 tools/train.py --cfg configs/cifar100/dkd/res32x4_res8x4.yaml
# you can also change settings at command line
python3 tools/train.py --cfg configs/cifar100/dkd/res32x4_res8x4.yaml SOLVER.BATCH_SIZE 128 SOLVER.LR 0.1
Training on ImageNet
Download the dataset at https://image-net.org/ and put them to ./data/imagenet
# for instance, our DKD method.
python3 tools/train.py --cfg configs/imagenet/r34_r18/dkd.yaml
Training on MS-COCO
see detection.md
Extension: Visualizations
Jupyter notebooks: tsne and correlation_matrices
Custom Distillation Method
create a python file at mdistiller/distillers/ and define the distiller
from ._base import Distiller
class MyDistiller(Distiller):
def __init__(self, student, teacher, cfg):
super(MyDistiller, self).__init__(student, teacher)
self.hyper1 = cfg.MyDistiller.hyper1
...
def forward_train(self, image, target, **kwargs):
# return the output logits and a Dict of losses
...
# rewrite the get_learnable_parameters function if there are more nn modules for distillation.
# rewrite the get_extra_parameters if you want to obtain the extra cost.
...
regist the distiller in distiller_dict at mdistiller/distillers/__init__.py
regist the corresponding hyper-parameters at mdistiller/engines/cfg.py
create a new config file and test it.
Citation
If this repo is helpful for your research, please consider citing the paper:
@article{zhao2022dkd,
title={Decoupled Knowledge Distillation},
author={Zhao, Borui and Cui, Quan and Song, Renjie and Qiu, Yiyu and Liang, Jiajun},
journal={arXiv preprint arXiv:2203.08679},
year={2022}
}
@article{zhao2023dot,
title={DOT: A Distillation-Oriented Trainer},
author={Zhao, Borui and Cui, Quan and Song, Renjie and Liang, Jiajun},
journal={arXiv preprint arXiv:2307.08436},
year={2023}
}
License
MDistiller is released under the MIT license. See LICENSE for details.
Acknowledgement
Thanks for CRD and ReviewKD. We build this library based on the CRD's codebase and the ReviewKD's codebase.
Thanks Yiyu Qiu and Yi Shi for the code contribution during their internship in MEGVII Technology.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/megvii-research/mdistiller là nguồn chính thức.
megvii-research/mdistiller có bao nhiêu sao?
megvii-research/mdistiller có 900 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/megvii-research/mdistiller. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
megvii-research/mdistiller có những chủ đề gì?
GitHub topics của megvii-research/mdistiller: "cifar", "coco", "computer-vision", "cvpr2022", "deep-learning", "iccv2023", "imagenet", "knowledge-distillation", "pytorch". TopGit xếp repo vào nhóm AI Tools.
megvii-research/mdistiller có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho megvii-research/mdistiller. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
megvii-research/mdistiller còn đang phát triển không?
Commit gần nhất trên megvii-research/mdistiller là 3.1 năm trước (theo timestamp GitHub). Repo có 129 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
megvii-research/mdistiller viết bằng ngôn ngữ gì?
megvii-research/mdistiller chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về mdistiller?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về mdistiller.