← 开源
YyzHarry

imbalanced-regression

[ICML 2021, Long Talk] Delving into Deep Imbalanced Regression

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
929
Star
149
Fork
+1
本周
3
贡献者
创建于 2021-02-18 · 更新于 2026-10-10 · 今日第 12578 名
主要开发者
YyzHarrykaiwenzhaEliasmgprado

YyzHarry/imbalanced-regression 排名第 12,578,有 929 个星标。

同类别比较

YyzHarry/imbalanced-regression 排名第 12,578,此处有 8 个同类条目;SciML/DiffEqFlux.jl 排名第 12,577。

同类别比较
名称排名指标
Mukosame/Zooming-Slow-Mo-CVPR-202012,566
语言:
Python
星标数:
930
分叉数:
163
简介:
Fast and Accurate One-Stage Space-Time Video Super-Resolution (accepted in CVPR 2020)
microsoft/SoftTeacher12,571
语言:
Python
星标数:
930
分叉数:
123
简介:
Semi-Supervised Learning, Object Detection, ICCV2021
openai/random-network-distillation12,573
语言:
Python
星标数:
930
分叉数:
166
简介:
Code for the paper "Exploration by Random Network Distillation"
SciML/DiffEqFlux.jl12,577
语言:
Julia
星标数:
929
分叉数:
162
简介:
Pre-built implicit layer architectures with O(1) backprop, GPUs, and stiff+non-stiff DE solvers, demonstrating scientific machine learning (SciML) and physics-informed machine learning methods
microsoft/maro12,581
语言:
Python
星标数:
929
分叉数:
160
简介:
Multi-Agent Resource Optimization (MARO) platform is an instance of Reinforcement Learning as a Service (RaaS) for real-world resource optimization problems.
awslabs/fortuna12,586
语言:
Python
星标数:
928
分叉数:
55
简介:
A Library for Uncertainty Quantification.
microsoft/tf-gnn-samples12,588
语言:
Python
星标数:
928
分叉数:
224
简介:
TensorFlow implementations of Graph Neural Networks
JiahuiYu/slimmable_networks12,589
语言:
Python
星标数:
927
分叉数:
135
简介:
Slimmable Networks, AutoSlim, and Beyond, ICLR 2019, and ICCV 2019
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
关键词Research
星标数929
分叉数149
贡献者3
创建日期2021-02-18
更新日期2026-10-10
1 天星标数0
7 天星标数1
排名12,578
上次排名12,495
排名变化-83
7 天星标排名10,428
上次 7 天星标排名8,441
7 天星标排名变化-1,987
总星标排名11,784
上次总星标排名11,769
总星标排名变化-15
国家USA
README 摘录

Delving into Deep Imbalanced Regression This repository contains the implementation code for paper: __Delving into Deep Imbalanced Regression__ Yuzhe Yang, Kaiwen Zha, Ying-Cong Chen, Hao Wang, Dina Katabi _38th International Conference on Machine Learning (ICML 2021), **Long Oral**_ ___ Deep Imbalanced Regression (DIR) aims to learn from imbalanced data with continuous targets, tackle potential missing data for certain regions, and generalize to the entire target range. Beyond Imbalanced Classification: Brief Introduction for DIR Existing techniques for learning from imbalanced data

focus on targets with __categorical__ indices, i. However, many real-world tasks involve __continuous__ and even infinite target values. We systematically investigate _Deep Imbalanced Regression (DIR)_, which aims to learn continuous targets from natural imbalanced data, deal with potential missing data for certain target values, and generalize to the entire target range. We curate and benchmark large-scale DIR datasets for common real-world tasks in _computer vision_, _natural language processing_, and _healthcare_ domains, ranging from single-value prediction such

as age, text similarity score, health condition score, to dense-value prediction such as depth. Usage We separate the codebase for different datasets into different subfolders. Please go into the subfolders for more information (e. , installation, dataset preparation, training, evaluation & models). __IMDB-WIKI-DIR__ | __AgeDB-DIR__ | __NYUD2-DIR__ | __STS-B-DIR__ Highlights __(1) :heavy_check_mark: New Task:__ Deep Imbalanced Regression (DIR) __(2) :heavy_check_mark: New Techniques:__ | :-: | :-: | | Label distribution smoothing (LDS) | Feature distribution smoothing (FDS) | __(3) :heavy_check_mark

: New Benchmarks:__ _Computer Vision:_ :bulb: IMDB-WIKI-DIR (age) / AgeDB-DIR (age) / NYUD2-DIR (depth) _Natural Language Processing:_ :clipboard: STS-B-DIR (text similarity score) _Healthcare:_ :hospital: SHHS-DIR (health condition score) | IMDB-WIKI-DIR | AgeDB-DIR | NYUD2-DIR | STS-B-DIR | SHHS-DIR | | :-: | :-: | :-: | :-: | :-: | Apply LDS and FDS on Other Datasets / Models We provide examples of how to apply LDS and FDS on other customized datasets and/or models. LDS To apply LDS on your customized dataset, you will first

need to estimate the effective label distribution: With the estimated effective label distribution, one straightforward option is to use the loss re-weighting scheme: FDS To apply FDS on your customized data/model, you will first need to define the FDS module in your network: During training, you will need to update the FDS statistics after each training epoch: Updates [05/2021] We create a Blog post for this work (version in Chinese is also available here). [05/2021] Paper

accepted to ICML 2021 as a __Long Talk__. You can find all reproduced checkpoints via this link, or go into each subfolder for models for each dataset. Citation If you find this code or idea useful, please cite our work: Contact If you have any questions, feel free to contact us through email (yuzhe@mit.

常见问题

记录了多少星标和分叉?

YyzHarry/imbalanced-regression 有 929 个星标和 149 个分叉。

仓库排名是多少?

YyzHarry/imbalanced-regression 排名第 12,578。

记录的语言和类别是什么?

YyzHarry/imbalanced-regression 有 929 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

YyzHarry/imbalanced-regression 与 SciML/DiffEqFlux.jl 比较,后者排名第 12,577,有 929 个星标。

README

Delving into Deep Imbalanced Regression

This repository contains the implementation code for paper:

Delving into Deep Imbalanced Regression

Yuzhe Yang, Kaiwen Zha, Ying-Cong Chen, Hao Wang, Dina Katabi

38th International Conference on Machine Learning (ICML 2021), Long Oral

[Project Page] [Paper] [Video] [Blog Post]


 ![](teaser/overview.gif)    

Deep Imbalanced Regression (DIR) aims to learn from imbalanced data with continuous targets,
tackle potential missing data for certain regions, and generalize to the entire target range.

Beyond Imbalanced Classification: Brief Introduction for DIR

Existing techniques for learning from imbalanced data focus on targets with categorical indices, i.e., the targets are different classes. However, many real-world tasks involve continuous and even infinite target values. We systematically investigate Deep Imbalanced Regression (DIR), which aims to learn continuous targets from natural imbalanced data, deal with potential missing data for certain target values, and generalize to the entire target range.

We curate and benchmark large-scale DIR datasets for common real-world tasks in computer vision, natural language processing, and healthcare domains, ranging from single-value prediction such as age, text similarity score, health condition score, to dense-value prediction such as depth.

Usage

We separate the codebase for different datasets into different subfolders. Please go into the subfolders for more information (e.g., installation, dataset preparation, training, evaluation & models).

IMDB-WIKI-DIR  |  AgeDB-DIR  |  NYUD2-DIR  |  STS-B-DIR

Highlights

(1) :heavy_check_mark: New Task: Deep Imbalanced Regression (DIR)

(2) :heavy_check_mark: New Techniques:

Label distribution smoothing (LDS) Feature distribution smoothing (FDS)

(3) :heavy_check_mark: New Benchmarks:

  • Computer Vision: :bulb: IMDB-WIKI-DIR (age) / AgeDB-DIR (age) / NYUD2-DIR (depth)
  • Natural Language Processing: :clipboard: STS-B-DIR (text similarity score)
  • Healthcare: :hospital: SHHS-DIR (health condition score)
IMDB-WIKI-DIR AgeDB-DIR NYUD2-DIR STS-B-DIR SHHS-DIR

Apply LDS and FDS on Other Datasets / Models

We provide examples of how to apply LDS and FDS on other customized datasets and/or models.

LDS

To apply LDS on your customized dataset, you will first need to estimate the effective label distribution:

from collections import Counter
from scipy.ndimage import convolve1d
from utils import get_lds_kernel_window

# preds, labels: [Ns,], "Ns" is the number of total samples
preds, labels = ..., ...
# assign each label to its corresponding bin (start from 0)
# with your defined get_bin_idx(), return bin_index_per_label: [Ns,] 
bin_index_per_label = [get_bin_idx(label) for label in labels]

# calculate empirical (original) label distribution: [Nb,]
# "Nb" is the number of bins
Nb = max(bin_index_per_label) + 1
num_samples_of_bins = dict(Counter(bin_index_per_label))
emp_label_dist = [num_samples_of_bins.get(i, 0) for i in range(Nb)]

# lds_kernel_window: [ks,], here for example, we use gaussian, ks=5, sigma=2
lds_kernel_window = get_lds_kernel_window(kernel='gaussian', ks=5, sigma=2)
# calculate effective label distribution: [Nb,]
eff_label_dist = convolve1d(np.array(emp_label_dist), weights=lds_kernel_window, mode='constant')

With the estimated effective label distribution, one straightforward option is to use the loss re-weighting scheme:

from loss import weighted_mse_loss

# Use re-weighting based on effective label distribution, sample-wise weights: [Ns,]
eff_num_per_label = [eff_label_dist[bin_idx] for bin_idx in bin_index_per_label]
weights = [np.float32(1 / x) for x in eff_num_per_label]

# calculate loss
loss = weighted_mse_loss(preds, labels, weights=weights)

FDS

To apply FDS on your customized data/model, you will first need to define the FDS module in your network:

from fds import FDS

config = dict(feature_dim=..., start_update=0, start_smooth=1, kernel='gaussian', ks=5, sigma=2)

def Network(nn.Module):
    def __init__(self, **config):
        super().__init__()
        self.feature_extractor = ...
        self.regressor = nn.Linear(config['feature_dim'], 1)  # FDS operates before the final regressor
        self.FDS = FDS(**config)

    def forward(self, inputs, labels, epoch):
        features = self.feature_extractor(inputs)  # features: [batch_size, feature_dim]
        # smooth the feature distributions over the target space
        smoothed_features = features    
        if self.training and epoch >= config['start_smooth']:
            smoothed_features = self.FDS.smooth(smoothed_features, labels, epoch)
        preds = self.regressor(smoothed_features)
        
        return {'preds': preds, 'features': features}

During training, you will need to update the FDS statistics after each training epoch:

model = Network(**config)

for epoch in range(num_epochs):
    for (inputs, labels) in train_loader:
        # standard training pipeline
        ...

    # update FDS statistics after each training epoch
    if epoch >= config['start_update']:
        # collect features and labels for all training samples
        ...
        # training_features: [num_samples, feature_dim], training_labels: [num_samples,]
        training_features, training_labels = ..., ...
        model.FDS.update_last_epoch_stats(epoch)
        model.FDS.update_running_stats(training_features, training_labels, epoch)

Updates

  • [06/2021] We provide a hands-on tutorial of DIR. Check it out!
  • [05/2021] We create a Blog post for this work (version in Chinese is also available here). Check it out for more details!
  • [05/2021] Paper accepted to ICML 2021 as a Long Talk. We have released the code and models. You can find all reproduced checkpoints via this link, or go into each subfolder for models for each dataset.
  • [02/2021] arXiv version posted. Please stay tuned for updates.

Citation

If you find this code or idea useful, please cite our work:

@inproceedings{yang2021delving,
  title={Delving into Deep Imbalanced Regression},
  author={Yang, Yuzhe and Zha, Kaiwen and Chen, Ying-Cong and Wang, Hao and Katabi, Dina},
  booktitle={International Conference on Machine Learning (ICML)},
  year={2021}
}

Contact

If you have any questions, feel free to contact us through email (yuzhe@mit.edu & kzha@mit.edu) or Github issues. Enjoy!

排名相邻
同类项目