Downloads · 30 days
0
hxb123/Lily_and_Weed_Detection_YOLO12
Lily_and_Weed_Detection_YOLO12 is a machine learning model from hxb123. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Mar 18, 2026
Repo size
14.9 MB
Likes
1
Public
Click a slice to open those files.
.onnx10.4 MB · 70%
From the Hugging Face model 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
session = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
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
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.



