ufoym/imbalanced-dataset-sampler
A (PyTorch) imbalanced dataset sampler for oversampling low frequent classes and undersampling high frequent ones.
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của tuần
#1 Repository của tuần
#1 Repository của tuần
🎯 Cân bằng lớp dữ liệu bất thường trong PyTorch
Sampler tự động điều chỉnh trọng số lớp khi huấn luyện mô hình trên tập dữ liệu có phân phối lớp không cân bằng.
Dự án imbalanced-dataset-sampler cung cấp sampler ImbalancedDatasetSampler cho PyTorch, giải quyết vấn đề mô hình bị thiên lệch về lớp có nhiều mẫu (ví dụ: chẩn đoán bệnh hiếm). Thay vì tạo lại tập dữ liệu mới, sampler này tính toán trọng số mẫu dựa trên xác suất xuất hiện lớp và áp dụng trong mỗi epoch.
✨ Điểm nổi bật
- Tự động tính trọng số: Ước lượng trọng số lấy nghịch đảo tần suất lớp.
- Cân bằng phân phối lớp: Oversampling lớp thiểu số, undersampling lớp đa số trong quá trình lấy mẫu.
- Không tạo tập dữ liệu mới: Trực tiếp áp dụng vào
DataLoader. - Giảm overfitting: Kết hợp tốt với kỹ thuật tăng cường dữ liệu.
- Dễ tích hợp: Chỉ cần truyền sampler vào tham số
samplercủaDataLoader.
💡 Vì sao đáng chú ý
Không giống kỹ thuật resampling thủ công (trùng lặp mẫu hoặc xóa ngẫu nhiên), ImbalancedDatasetSampler tích hợp sẵn trong pipeline huấn luyện PyTorch, giảm thiểu công sức xử lý dữ liệu. Kết quả trên MNIST bất thường cho thấy cải thiện đáng kể độ chính xác lớp thiểu số (như 2, 6, 9) mà không làm giảm hiệu suất lớp còn lại.
#PyTorch #ImbalancedData #MachineLearning #DataSampling #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...
Ultralytics YOLO27, YOLO26, YOLO11, YOLOv8 — object detection, instance segmentation, semantic segmentation, image classification, pose estimation, object tracking
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Vision Transformer (base-sized model) Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) at resolution 224x224, and fine-tuned on ImageNet 2012 (1 million images, 1,000 classes) at resolution 224x224. It w...
Model Card: Fine-Tuned Vision Transformer (ViT) for NSFW Image Classification Model Description The Fine-Tuned Vision Transformer (ViT) is a variant of the transformer encoder architecture, similar to BERT, that has been adapted for image classifica...
Model card for mobilenetv3small100.lambin1k A MobileNet-v3 image classification model. Trained on ImageNet-1k in timm using recipe template described below. Recipe details: A LAMB optimizer based recipe that is similar to ResNet Strikes Back(https:/...
Model card for tfefficientnetv2s.in21kftin1k A EfficientNet-v2 image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k in Tensorflow by paper authors, ported to PyTorch by Ross Wightman. Model Details - Model Type: Image cl...
ResNet-50 v1.5 ResNet model pre-trained on ImageNet-1k at resolution 224x224. It was introduced in the paper Deep Residual Learning for Image Recognition(https://arxiv.org/abs/1512.03385) by He et al. Disclaimer: The team releasing ResNet did not wr...