#513 · Primary category: Computer Vision
class-balanced-loss
Class-Balanced Loss Based on Effective Number of Samples. CVPR 2019
Project last updated:08/29/21
GitHub Stars
615
Forks
66
Contributors
1
License
MIT
Why we included this project
Class imbalance is a common headache when training image classifiers, and this repo is the reference implementation of the class-balanced loss from the CVPR 2019 paper of the same name. Instead of hand-tuning class weights, it reweights the loss by the effective number of samples per class, which gives a more principled handle on long-tailed datasets. The code includes runnable training and evaluation scripts for both standard and long-tailed CIFAR, plus a Cloud TPU pipeline for larger benchmarks like ImageNet and iNaturalist. Key implementation details, such as the loss weights and focal loss, are clearly annotated in the source, which makes it easy to port the approach into your own project. It is a focused reference codebase rather than a general framework, so plan to adapt the code rather than drop it in as a library.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
opencv
Open Source Computer Vision Library
RuView
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
PaddleOCR
Turn any PDF or image document into structured data for your AI. A powerful, lightweight OCR toolkit that bridges the gap between images/PDFs and LLMs. Supports 100+ languages.
MinerU
Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
tesseract
Tesseract Open Source OCR Engine (main repository)