#354 · Primary category: Computer Vision
Class-balanced-loss-pytorch
Pytorch implementation of the paper "Class-Balanced Loss Based on Effective Number of Samples"
Project last updated:02/18/24
GitHub Stars
802
Forks
123
Contributors
1
License
MIT
Why we included this project
Class imbalance is a common headache when training classifiers, and this library tackles it at the loss level. It implements the CVPR 2019 class-balanced loss, which reweights each class by its effective number of samples instead of the raw count, so rare classes get a fairer share of the training signal. The whole thing is one self-contained PyTorch module with a small API, so you can drop it into an existing training loop without restructuring anything. That makes it a practical starting point for long-tail recognition, medical imaging, or any dataset where some classes are scarce. The author's Medium article walks through the math behind the loss, which helps before you commit to it.
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)