hxb123/Lily_and_Weed_Detection_YOLO12
By hxb123 · ↓ 0 · ♥ 1 · Updated 2026-03-18
What's in this repo
This page lists the files in hxb123/Lily_and_Weed_Detection_YOLO12, including best.onnx.
- 1 ONNX models (.onnx files)
- 7 files, including 3 .png, 1 .md, 1 .onnx
- Last updated 2026-03-18
ONNX files
| File | Size | Download |
|---|---|---|
| best.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
🌱 Lily–Weed Recognition ONNX Model
This repository provides an ONNX inference model for recognizing lily crops and surrounding weeds. It is designed for use in precision agriculture settings, especially for complex terrain such as terraces, where large-scale machinery is inefficient or difficult to deploy.
🚜 Background
Due to the unique terrain and climatic conditions in regions such as Gansu, specialized agricultural equipment has substantial application potential. This model is part of a broader research effort to:
Enable real-time visual perception in agricultural robotics
Support multi-agent coordination systems
Complement large-scale agricultural machinery in terraced farmland
📦 Model Overview Item Description Format ONNX Task Binary image recognition Classes Lily, Weed Usage Direct inference, no conversion required Intended Use Field monitoring / robotics / precision agriculture
⚠️ This model is intended for research and demonstration purposes.
🧠 Dataset
The training dataset was collected internally in real agricultural environments. It includes multiple growth stages of both lilies and weeds, captured under natural light and environmental conditions.
Status: Private (not publicly released)
Content: crop & weed images across growth cycles
Labeling: human annotated
Dataset is not available due to internal collection protocol and field acquisition constraints.
🔧 Inference (ONNX Runtime)
Below is a minimal example using the CPU execution provider:
import onnxruntime as ort import numpy as np from PIL import Image
Load ONNX model
session = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
Preprocess image
image = Image.open("sample.jpg").convert("RGB").resize((224, 224)) arr = np.array(image).astype(np.float32) / 255.0 arr = arr.transpose(2, 0, 1)[None, :] # NCHW
Run inference
inputs = {session.get_inputs()[0].name: arr} output = session.run(None, inputs) print(output)
Adjust input size (224×224) depending on your actual model.
📤 Output Format
The model outputs a single classification prediction:
Label 0 → Weed Label 1 → Lily
You may normalize or threshold logits depending on downstream demands.
🛠️ Integration Scenarios
Embedded perception for AI agriculture equipment
Autonomous farming robots
Multi-agent cooperative machinery
Edge inference on resource-limited devices
Real-time detection in terraced farmlands
⚙️ Recommended Environment
Python ≥ 3.8
onnxruntime ≥ 1.13
numpy ≥ 1.23
pillow ≥ 9.0
Example installation:
pip install onnxruntime numpy pillow
📄 License
Specify your license (MIT / Apache-2.0 / Proprietary / Research Only).
✨ Citation
If you use this model in research or academic work:
@misc{lily-weed-onnx, title={Lily–Weed Recognition Model (ONNX)}, year={2025}, author={Your Name / Institution}, howpublished={Hugging Face}, }
📬 Contact
For questions, demonstration requests, or collaboration:
Author: Your Name
Institution: Your Affiliation
Email: your@email
Additional info: project page / docs / paper (if any)
🔔 Notes
This model is not a general plant classifier.
Performance is optimized for lily–weed scenarios only.
Domain shift (new soil types, illumination, species) may reduce accuracy.

https://cdn-uploads.huggingface.co/production/uploads/69295f5882e5edc472a76435/L9RiyHKVNtZygysHb7WTN.mp4



Files (7)
Related models
More from hxb123
No other models by this author.
More models
No task type declared.