Spaces:
Runtime error
Runtime error
Update app.py
Browse filesUpdated the latest model as per PR#42 discussed here: https://github.com/ariG23498/gemma3-object-detection/pull/42#issuecomment-3045683685
app.py
CHANGED
|
@@ -18,7 +18,8 @@ model_id = "google/gemma-3-4b-pt"
|
|
| 18 |
|
| 19 |
MODEL_OPTIONS = {
|
| 20 |
"π΅ Fine-tuned": "sergiopaniego/gemma-3-4b-pt-object-detection",
|
| 21 |
-
"π£ Fine-tuned
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
resize_size = 512 if "SmolVLM" in model_id else 896
|
|
@@ -99,6 +100,7 @@ with gr.Blocks(theme=Soft(), css=css_hide_share) as demo:
|
|
| 99 |
This demo compares two fine-tuned versions of **Gemma 3 (4B)** for object detection:
|
| 100 |
- **π΅ Fine-tuned for object detection**: trained to predict bounding boxes and class labels using the original tokenizer.
|
| 101 |
- **π£ Fine-tuned (updated tokenizer with `<loc>` tokens)**: same task, but uses a tokenizer updated to better encode spatial information through `<locYYYY>` tokens.
|
|
|
|
| 102 |
Select a model and click **Generate** to visualize its prediction on a random test image.
|
| 103 |
""")
|
| 104 |
|
|
|
|
| 18 |
|
| 19 |
MODEL_OPTIONS = {
|
| 20 |
"π΅ Fine-tuned": "sergiopaniego/gemma-3-4b-pt-object-detection",
|
| 21 |
+
"π£ Fine-tuned(updated tokenizer with `<loc>` tokens)": "sergiopaniego/gemma-3-4b-pt-object-detection-loc-tokens",
|
| 22 |
+
"β¨ Fine-tuned+": "ajaymin28/gemma-3-4b-pt-obj-det-loc-tok-1024-single-stage",
|
| 23 |
}
|
| 24 |
|
| 25 |
resize_size = 512 if "SmolVLM" in model_id else 896
|
|
|
|
| 100 |
This demo compares two fine-tuned versions of **Gemma 3 (4B)** for object detection:
|
| 101 |
- **π΅ Fine-tuned for object detection**: trained to predict bounding boxes and class labels using the original tokenizer.
|
| 102 |
- **π£ Fine-tuned (updated tokenizer with `<loc>` tokens)**: same task, but uses a tokenizer updated to better encode spatial information through `<locYYYY>` tokens.
|
| 103 |
+
- **β¨ Fine-tuned+ (updated tokenizer with `<loc>` tokens)**: Same as `<locYYYY>` tokens finetuning but single stage training.
|
| 104 |
Select a model and click **Generate** to visualize its prediction on a random test image.
|
| 105 |
""")
|
| 106 |
|