Instructions to use Marconcini/leafscan-convnext-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use Marconcini/leafscan-convnext-tiny with timm:
import timm model = timm.create_model("hf-hub:Marconcini/leafscan-convnext-tiny", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Model card: demo link and use in the cited assistant
Browse files
README.md
CHANGED
|
@@ -66,6 +66,24 @@ Files:
|
|
| 66 |
In the browser (ONNX Runtime Web, image resizing done by the canvas instead of PIL), the demo
|
| 67 |
agrees with the Python int8 predictions on 96.1% of PlantDoc test photos.
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
## Intended use and limitations
|
| 70 |
|
| 71 |
- **Intended use:** demonstration and research on robustness of plant-disease classifiers.
|
|
|
|
| 66 |
In the browser (ONNX Runtime Web, image resizing done by the canvas instead of PIL), the demo
|
| 67 |
agrees with the Python int8 predictions on 96.1% of PlantDoc test photos.
|
| 68 |
|
| 69 |
+
## In the LeafScan app: diagnosis, then a cited assistant
|
| 70 |
+
|
| 71 |
+
👉 Try the model in your browser: [Marconcini/leafscan](https://huggingface.co/spaces/Marconcini/leafscan)
|
| 72 |
+
(int8 ONNX, nothing uploaded).
|
| 73 |
+
|
| 74 |
+
The project's local app goes one step further: after the diagnosis, a retrieval-augmented
|
| 75 |
+
assistant answers questions from 28 Wikipedia articles with a local LLM, citing its sources
|
| 76 |
+
(`LEAFSCAN_ASSISTANT=1 python -m leafscan.app`). How this model's output is used there was
|
| 77 |
+
tested on 500 (question, field photo) pairs with its real predictions on PlantDoc test:
|
| 78 |
+
|
| 79 |
+
- Restricting the search to the predicted disease **costs 16 points of recall@5**: a right
|
| 80 |
+
diagnosis adds 8 points, a wrong one (28% of field photos) removes the answer.
|
| 81 |
+
- Restricting to the top-2 when the model is unsure recovers less than half of the loss.
|
| 82 |
+
|
| 83 |
+
So the diagnosis does **not** filter the search: it suggests questions that name the disease
|
| 84 |
+
(both candidates when the model says "Not sure"), which the user can see and correct.
|
| 85 |
+
Details: [research log](https://github.com/marconcini/leafscan/blob/main/docs/research-log.md).
|
| 86 |
+
|
| 87 |
## Intended use and limitations
|
| 88 |
|
| 89 |
- **Intended use:** demonstration and research on robustness of plant-disease classifiers.
|