Downloads · 30 days
0
datajuicer/YOLO11L-Rice-Disease-Detection
YOLO11L-Rice-Disease-Detection is a machine learning model from datajuicer. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-sa-4.0.
- 模型功能:支持多种水稻病害的检测,返回图像中的病害位置(bounding box)以及病害类别(class label)。
Downloads · 30 days
0
Access
Public
Updated Aug 22, 2025
Repo size
51.2 MB
Likes
1
Public
Click a slice to open those files.
.pt51.2 MB · 100%
From the Hugging Face model README
模型功能:支持多种水稻病害的检测,返回图像中的病害位置(bounding box)以及病害类别(class label)。
支持类别:{0: '水稻白叶枯病Bacterial_Leaf_Blight', 1: '水稻胡麻斑病Brown_Spot', 2: '健康水稻HealthyLeaf', 3: '稻瘟病Leaf_Blast', 4: '水稻叶鞘腐病Leaf_Scald', 5: '水稻窄褐斑病Narrow_Brown_Leaf_Spot', 6: '水稻穗颈瘟Neck_Blast', 7: '稻飞虱Rice_Hispa'}
训练数据:3,567张水稻病害图像及对应标注信息(Rice Leaf Spot Disease Annotated Dataset),训练200epoch。
评测指标:测试集 {mAP50: 56.3, mAP50-95: 34.9}
[{
"images": image_path1,
"objects": {
"ref": [class_label1, class_label2, ...],
"bbox": [bbox1, bbox2, ...]
}
},
...
]
import json
from data_juicer.core.data import NestedDataset as Dataset
from data_juicer.ops.mapper.image_detection_yolo_mapper import ImageDetectionYoloMapper
from data_juicer.utils.constant import Fields, MetaKeys
if __name__ == "__main__":
image_path1 = "test1.jpg"
image_path2 = "test2.jpg"
image_path3 = "test3.jpg"
source_list = [{
'images': [image_path1, image_path2, image_path3]
}]
class_names =['水稻白叶枯病Bacterial_Leaf_Blight', '水稻胡麻斑病Brown_Spot', '健康水稻HealthyLeaf', '稻瘟病Leaf_Blast', '水稻叶鞘腐病Leaf_Scald', '水稻窄褐斑病Narrow_Brown_Leaf_Spot', '水稻穗颈瘟Neck_Blast', '稻飞虱Rice_Hispa']
op = ImageDetectionYoloMapper(
imgsz=640, conf=0.05, iou=0.5, model_path='Path_to_YOLO11L-Rice-Disease-Detection.pt')
dataset = Dataset.from_list(source_list)
if Fields.meta not in dataset.features:
dataset = dataset.add_column(name=Fields.meta,
column=[{}] * dataset.num_rows)
dataset = dataset.map(op.process, num_proc=1, with_rank=True)
res_list = dataset.to_list()[0]
new_data = []
for temp_image_name, temp_bbox_lists, class_name_lists in zip(res_list["images"], res_list["__dj__meta__"]["__dj__bbox__"], res_list["__dj__meta__"]["__dj__class_label__"]):
temp_json = {}
temp_json["images"] = temp_image_name
temp_json["objects"] = {"ref": [], "bbox":temp_bbox_lists}
for temp_object_label in class_name_lists:
temp_json["objects"]["ref"].append(class_names[int(temp_object_label)])
new_data.append(temp_json)
with open("./output.json", "w") as f:
json.dump(new_data, f)