TorchDistiller - a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

Overview

TorchDistiller

This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

Collection papers and codebase

Semantic Segmentation

  • Structured Knowledge Distillation for Semantic Segmentation, CVPR2019 [paper] [code]
  • Intra-class Feature Variation Distillation for Semantic Segmentation, ECCV2020 [paper] [code]
  • Channel-wise Knowledge Distillation for Dense Prediction, ICCV2021 [paper] [code]
  • Knowledge Distillation based on MMsegmentation [code]

Object Detection and Instance Segmentation

  • Knowledge Distillation based on MMdetection [code]
  • Knowledge Distillation based on Adet [code]

Update History

  • 2021.08.20 Release the code for channel-wise distillation for semantic segmentation

We are integrating more of our work and other great studies into this project.

TO DO LIST

  • Distillation on FCOS
  • Distillation on CondInst

Contribute

To contribute, PR is appreciated and suggestions are welcome to discuss with.

Comments
  • download the teacher and student pretrained weight

    download the teacher and student pretrained weight

    Hi, irfanlCMLL.

    Thanks for kindly sharing this repository. Subject to my condition, I wanna apply you for a non-cloud way to download the pretrained weight. It is best to be a direct download link. Thank you sincerely!

    opened by Nireil 0
  • Experiments on Pascal VOC and Ade20K

    Experiments on Pascal VOC and Ade20K

    Thank you for your excellent project! When I used the code of the experiments on Pascal VOC and Ade20K(https://github.com/pppppM/mmsegmentation-distiller), I haven't reproduce a comparable result. And in the issue of that project, I noticed that your released edition wasn’t the code used in your paper. Can you show us the code of the experiments on Pascal VOC and Ade20K used in your paper or the updated code of mmsegmentation-distiller? Thank you

    opened by yxchen1119 0
  • Is it better to combine CWD loss with other losses than just CWD loss?

    Is it better to combine CWD loss with other losses than just CWD loss?

    Hi!

    As mentioned in README: To train a model with channel-wise distillation, GAN loss and Pixel-wise distillation.

    Is it better to combine CWD loss with other losses than just CWD loss?

    opened by jialeli1 0
  • KLD in Object Detection

    KLD in Object Detection

    Hi, irfanlCMLL.

    Thanks for kindly sharing this repository. In my training phase, I checked that the CWD losses (cwd_0, ..., cwd_3) didn't decrease even they have very high values. I assume that it can be very hard to decrease the KL divergence loss. (I did experiments on this repo: https://github.com/pppppM/mmdetection-distiller)

    Do you agree with my assumption? How about other losses (L2, L1, Cosine similarity) for CWD?

    opened by dev-sungman 0
  • Binary image segmentation

    Binary image segmentation

    Hello How are you? Thanks for contributing to this project. I have a question. As in the previous paper & project, u handled ONLY the multi-class image segmentation problem. I have some trouble using your KD methods in my project for binary image segmentation I used sigmoid rather than softmax because the output has 1 channel rather than 2 channels.

    image

    But this implementation does NOT play its role. Can the conventional KD or your CWD method be used for binary image segmentation? Thanks

    opened by rose-jinyang 1
Owner
yifan liu
Ph.D. candidate https://orcid.org/0000-0002-2746-8186 @aim-uofa
yifan liu
PaddleRobotics is an open-source algorithm library for robots based on Paddle, including open-source parts such as human-robot interaction, complex motion control, environment perception, SLAM positioning, and navigation.

简体中文 | English PaddleRobotics paddleRobotics是基于paddle的机器人开源算法库集,包括人机交互、复杂运动控制、环境感知、slam定位导航等开源算法部分。 人机交互 主动多模交互技术TFVT-HRI 主动多模交互技术是通过视觉、语音、触摸传感器等输入机器人

null 185 Dec 26, 2022
TF2 implementation of knowledge distillation using the "function matching" hypothesis from the paper Knowledge distillation: A good teacher is patient and consistent by Beyer et al.

FunMatch-Distillation TF2 implementation of knowledge distillation using the "function matching" hypothesis from the paper Knowledge distillation: A g

Sayak Paul 67 Dec 20, 2022
[IJCAI-2021] A benchmark of data-free knowledge distillation from paper "Contrastive Model Inversion for Data-Free Knowledge Distillation"

DataFree A benchmark of data-free knowledge distillation from paper "Contrastive Model Inversion for Data-Free Knowledge Distillation" Authors: Gongfa

ZJU-VIPA 47 Jan 9, 2023
Instance-conditional Knowledge Distillation for Object Detection

Instance-conditional Knowledge Distillation for Object Detection This is a MegEngine implementation of the paper "Instance-conditional Knowledge Disti

MEGVII Research 47 Nov 17, 2022
Monocular Depth Estimation - Weighted-average prediction from multiple pre-trained depth estimation models

merged_depth runs (1) AdaBins, (2) DiverseDepth, (3) MiDaS, (4) SGDepth, and (5) Monodepth2, and calculates a weighted-average per-pixel absolute dept

Pranav 39 Nov 21, 2022
Knowledge Distillation Toolbox for Semantic Segmentation

SegDistill: Toolbox for Knowledge Distillation on Semantic Segmentation Networks This repo contains the supported code and configuration files for Seg

null 9 Dec 12, 2022
Code for our paper Domain Adaptive Semantic Segmentation with Self-Supervised Depth Estimation

CorDA Code for our paper Domain Adaptive Semantic Segmentation with Self-Supervised Depth Estimation Prerequisite Please create and activate the follo

Qin Wang 60 Nov 30, 2022
The implemention of Video Depth Estimation by Fusing Flow-to-Depth Proposals

Flow-to-depth (FDNet) video-depth-estimation This is the implementation of paper Video Depth Estimation by Fusing Flow-to-Depth Proposals Jiaxin Xie,

null 32 Jun 14, 2022
Monocular Depth Estimation Using Laplacian Pyramid-Based Depth Residuals

LapDepth-release This repository is a Pytorch implementation of the paper "Monocular Depth Estimation Using Laplacian Pyramid-Based Depth Residuals" M

Minsoo Song 205 Dec 30, 2022
(CVPR 2022 - oral) Multi-View Depth Estimation by Fusing Single-View Depth Probability with Multi-View Geometry

Multi-View Depth Estimation by Fusing Single-View Depth Probability with Multi-View Geometry Official implementation of the paper Multi-View Depth Est

Bae, Gwangbin 138 Dec 28, 2022
Autonomous Perception: 3D Object Detection with Complex-YOLO

Autonomous Perception: 3D Object Detection with Complex-YOLO LiDAR object detect

Thomas Dunlap 2 Feb 18, 2022
Real-time Object Detection for Streaming Perception, CVPR 2022

StreamYOLO Real-time Object Detection for Streaming Perception Jinrong Yang, Songtao Liu, Zeming Li, Xiaoping Li, Sun Jian Real-time Object Detection

Jinrong Yang 237 Dec 27, 2022
Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.

Faster R-CNN and Mask R-CNN in PyTorch 1.0 maskrcnn-benchmark has been deprecated. Please see detectron2, which includes implementations for all model

Facebook Research 9k Jan 4, 2023
Re-implementation of the Noise Contrastive Estimation algorithm for pyTorch, following "Noise-contrastive estimation: A new estimation principle for unnormalized statistical models." (Gutmann and Hyvarinen, AISTATS 2010)

Noise Contrastive Estimation for pyTorch Overview This repository contains a re-implementation of the Noise Contrastive Estimation algorithm, implemen

Denis Emelin 42 Nov 24, 2022
Office source code of paper UniFuse: Unidirectional Fusion for 360$^\circ$ Panorama Depth Estimation

UniFuse (RAL+ICRA2021) Office source code of paper UniFuse: Unidirectional Fusion for 360$^\circ$ Panorama Depth Estimation, arXiv, Demo Preparation I

Alibaba 47 Dec 26, 2022
A Data Annotation Tool for Semantic Segmentation, Object Detection and Lane Line Detection.(In Development Stage)

Data-Annotation-Tool How to Run this Tool? To run this software, follow the steps: git clone https://github.com/Autonomous-Car-Project/Data-Annotation

TiVRA AI 13 Aug 18, 2022
This is the official pytorch implementation of Student Helping Teacher: Teacher Evolution via Self-Knowledge Distillation(TESKD)

Student Helping Teacher: Teacher Evolution via Self-Knowledge Distillation (TESKD) By Zheng Li[1,4], Xiang Li[2], Lingfeng Yang[2,4], Jian Yang[2], Zh

Zheng Li 9 Sep 26, 2022
Pytorch implementation for Patient Knowledge Distillation for BERT Model Compression

Patient Knowledge Distillation for BERT Model Compression Knowledge distillation for BERT model Installation Run command below to install the environm

Siqi 180 Dec 19, 2022
PyTorch implementation of paper A Fast Knowledge Distillation Framework for Visual Recognition.

FKD: A Fast Knowledge Distillation Framework for Visual Recognition Official PyTorch implementation of paper A Fast Knowledge Distillation Framework f

Zhiqiang Shen 129 Dec 24, 2022