EricChenWei commited on
Commit
554355b
·
verified ·
1 Parent(s): b18d458

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +113 -0
README.md ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - neural-dqs
5
+ - dataset-quality
6
+ - computer-vision
7
+ - regression
8
+ - sklearn
9
+ - clip
10
+ library_name: sklearn
11
+ ---
12
+
13
+ # Neural DQS — Dataset Quality Score Predictor
14
+
15
+ **Predicts post-training mAP@0.5 from 6 dataset-level features, before training any model.**
16
+
17
+ CV Pearson **r = 0.929** (n=96, p<0.001) on the [Neural DQS Benchmark](https://huggingface.co/datasets/EricChenWei/neural-dqs-benchmark).
18
+
19
+ ---
20
+
21
+ ## Model Description
22
+
23
+ A `Ridge(α=1.0)` regression with `StandardScaler + PolynomialFeatures(degree=2)` operating on a 6-dimensional feature vector extracted from a computer vision dataset.
24
+
25
+ ### Feature Vector: f(D) ∈ ℝ⁶
26
+
27
+ | Feature | Symbol | Description |
28
+ |---------|--------|-------------|
29
+ | Annotation Quality | AQ | `0.6 × completeness + 0.4 × bbox geometry` |
30
+ | Image Quality | IQ | `√(blur_score × noise_cleanliness)` |
31
+ | CLIP Diversity | CD | Mean pairwise cosine distance (ViT-B/32) |
32
+ | Lighting Diversity | LD | Normalized brightness entropy |
33
+ | Pose Diversity | PD | Normalized aspect-ratio entropy |
34
+ | Class Balance | CB | `1 − Gini coefficient` |
35
+
36
+ ### Architecture
37
+
38
+ ```
39
+ f(D) ∈ ℝ⁶
40
+ → StandardScaler
41
+ → PolynomialFeatures(degree=2) → ℝ²⁸
42
+ → Ridge(α=1.0)
43
+ → predicted mAP@0.5
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Performance
49
+
50
+ | Metric | Value |
51
+ |--------|-------|
52
+ | CV Pearson r (k=5) | **0.929** |
53
+ | CV R² | 0.854 |
54
+ | Train Pearson r | 0.970 |
55
+ | Training samples | 96 |
56
+
57
+ **SHAP feature importance (mean \|φ\|):**
58
+ - CD (CLIP Diversity): 0.0765 ← strongest
59
+ - IQ (Image Quality): 0.0211
60
+ - AQ (Annotation Quality): 0.0142
61
+
62
+ ---
63
+
64
+ ## Usage
65
+
66
+ ```python
67
+ import joblib
68
+ import numpy as np
69
+ from huggingface_hub import hf_hub_download
70
+
71
+ model_path = hf_hub_download("EricChenWei/neural-dqs", "neural_dqs_model.pkl")
72
+ model = joblib.load(model_path)
73
+
74
+ # Feature vector: [AQ, IQ, CD, LD, PD, CB]
75
+ features = np.array([[0.80, 0.46, 0.49, 0.46, 0.83, 0.92]])
76
+ predicted_map50 = model.predict(features)[0]
77
+ print(f"Predicted mAP@0.5 = {predicted_map50:.4f}")
78
+ ```
79
+
80
+ ### Extract features with Auto Dataset Builder
81
+
82
+ ```python
83
+ from models.dqs.feature_extractor import extract_features
84
+
85
+ feats = extract_features(image_dir="path/to/images", label_dir="path/to/labels")
86
+ f = [feats.annotation_quality, feats.sharpness, feats.clip_diversity,
87
+ feats.lighting_diversity, feats.pose_diversity, feats.class_balance]
88
+
89
+ predicted_map50 = model.predict([f])[0]
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Training Data
95
+
96
+ [EricChenWei/neural-dqs-benchmark](https://huggingface.co/datasets/EricChenWei/neural-dqs-benchmark) — 96-variant COCO128 degradation benchmark.
97
+
98
+ ## Related
99
+
100
+ - **GitHub**: [ericchen931209/auto-dataset-builder](https://github.com/ericchen931209/auto-dataset-builder)
101
+
102
+ ## Citation
103
+
104
+ ```bibtex
105
+ @software{chen2026adb,
106
+ author = {Chen, Yu-Wei},
107
+ title = {Auto Dataset Builder: An LLM-Assisted Framework for
108
+ Automatic Dataset Construction with Neural Dataset Quality Scoring},
109
+ year = {2026},
110
+ url = {https://github.com/ericchen931209/auto-dataset-builder},
111
+ license = {MIT}
112
+ }
113
+ ```