mKartux commited on
Commit
e284c8b
·
verified ·
1 Parent(s): 56bcb5b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +51 -65
README.md CHANGED
@@ -1,71 +1,57 @@
1
  ---
2
- title: FruitScan - Clasificador de Frutas
3
- emoji: 🍌
4
- colorFrom: green
5
- colorTo: yellow
6
- sdk: docker
7
- app_port: 7860
8
- pinned: false
 
 
9
  ---
10
 
11
- # 🍌 FruitScan — Fruit Quality Classifier API
12
-
13
- Clasificador de frutas frescas vs podridas usando **EfficientNetV2** + **TensorFlow** con visualización **Grad-CAM**.
14
-
15
- ## 🚀 Endpoints
16
-
17
- | Método | Ruta | Descripción |
18
- |--------|------|-------------|
19
- | `GET` | `/health` | Estado del modelo (cargado, clases) |
20
- | `POST` | `/predict` | Clasifica imagen (multipart `file`) |
21
- | `POST` | `/feedback` | Envía corrección de etiqueta |
22
-
23
- ### POST `/predict`
24
-
25
- ```bash
26
- curl -X POST https://mkartux-bannano.hf.space/predict \
27
- -F "file=@manzana.jpg"
28
- ```
29
-
30
- Respuesta:
31
- ```json
32
- {
33
- "class_name": "Fresh_FreshApple",
34
- "confidence": 0.9876,
35
- "is_fresh": true,
36
- "all_probabilities": [...],
37
- "image_base64": "...",
38
- "heatmap_base64": "..."
39
- }
40
- ```
41
-
42
- ### POST `/feedback`
43
-
44
- ```bash
45
- curl -X POST https://mkartux-bannano.hf.space/feedback \
46
- -F "file=@manzana.jpg" \
47
- -F "correct_label=Rotten_RottenApple"
 
 
48
  ```
49
 
50
- ## 📦 Dataset de feedback
51
-
52
- Las correcciones enviadas se almacenan en:
53
- [mKartux/fruit-quality-feedback](https://huggingface.co/datasets/mKartux/fruit-quality-feedback)
54
-
55
- ## 🧠 Modelo
56
-
57
- EfficientNetV2 entrenado en 26 clases (13 frutas x 2 estados fresh/rotten).
58
-
59
- **Repo del modelo:** [mKartux/fruit-classifier](https://huggingface.co/mKartux/fruit-classifier)
60
-
61
- ## 🌐 Frontend
62
-
63
- Próximamente en Vercel.
64
-
65
- ## ⚙️ Secrets requeridos
66
-
67
- Configurar en [Settings → Repository secrets](https://huggingface.co/spaces/mKartux/BanNano/settings):
68
 
69
- - `HF_TOKEN` Token de escritura de HF
70
- - `HF_DATASET_REPO` — `mKartux/fruit-quality-feedback`
71
- - `HF_MODEL_REPO` — `mKartux/fruit-classifier`
 
1
  ---
2
+ license: mit
3
+ library: keras
4
+ tags:
5
+ - fruit
6
+ - classification
7
+ - fresh-rotten
8
+ - efficientnet
9
+ - grad-cam
10
+ - tensorflow
11
  ---
12
 
13
+ # Fruit Quality Classifier — EfficientNetV2
14
+
15
+ Modelo de clasificacion de frutas frescas vs podridas.
16
+
17
+ ## Detalles
18
+
19
+ | Propiedad | Valor |
20
+ |-----------|-------|
21
+ | **Arquitectura** | EfficientNetV2 (fine-tuned) |
22
+ | **Clases** | 26 (13 frutas x 2 estados) |
23
+ | **Input** | 224x224 RGB |
24
+ | **Preprocesamiento** | `efficientnet_v2.preprocess_input` |
25
+ | **Formato** | Keras `.keras` |
26
+ | **Framework** | TensorFlow 2.18 |
27
+ | **Fine-tuning** | Google Colab |
28
+
29
+ ## Clases
30
+
31
+ | Fruta | Fresh | Rotten |
32
+ |-------|-------|--------|
33
+ | Apple | Fresh_FreshApple | Rotten_RottenApple |
34
+ | Banana | Fresh_FreshBanana | Rotten_RottenBanana |
35
+ | Bellpepper | Fresh_FreshBellpepper | Rotten_RottenBellpepper |
36
+ | Bittergourd | Fresh_FreshBittergroud | Rotten_RottenBittergroud |
37
+ | Capsicum | Fresh_FreshCapciscum | Rotten_RottenCapsicum |
38
+ | Carrot | Fresh_FreshCarrot | Rotten_RottenCarrot |
39
+ | Cucumber | Fresh_FreshCucumber | Rotten_RottenCucumber |
40
+ | Mango | Fresh_FreshMango | Rotten_RottenMango |
41
+ | Okra | Fresh_FreshOkara | Rotten_RottenOkra |
42
+ | Orange | Fresh_FreshOrange | Rotten_RottenOrange |
43
+ | Potato | Fresh_FreshPotato | Rotten_RottenPotato |
44
+ | Strawberry | Fresh_FreshStrawberry | Rotten_RottenStrawberry |
45
+ | Tomato | Fresh_FreshTomato | Rotten_RottenTomato |
46
+
47
+ ## Uso
48
+
49
+ ```python
50
+ import tensorflow as tf
51
+ model = tf.keras.models.load_model("hf://mKartux/BanNano-model/fruit_classifier.keras", compile=False)
52
  ```
53
 
54
+ ## API
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
+ Este modelo es usado por la API en:
57
+ [mKartux/BanNano](https://huggingface.co/spaces/mKartux/BanNano)