🚀 clip-vit-large-patch14-finetuned-disease
本模型是 openai/clip-vit-large-patch14 在自定義數據集上針對植物病害描述進行微調後的版本。它旨在對植物葉片圖像進行分類,並生成描述葉片病害或健康狀況的說明。
✨ 主要特性
- 基於
openai/clip-vit-large-patch14
模型進行微調,適用於植物病害分類和描述生成。
- 利用 CLIP 架構將葉片圖像映射到描述性說明,輔助植物病害的診斷和分類。
📦 安裝指南
文檔未提供安裝步驟,暫不展示。
💻 使用示例
基礎用法
from transformers import CLIPProcessor, CLIPModel
from PIL import Image
import requests
model = CLIPModel.from_pretrained("Keetawan/clip-vit-large-patch14-plant-disease-finetuned")
processor = CLIPProcessor.from_pretrained("Keetawan/clip-vit-large-patch14-plant-disease-finetuned")
image_url = "https://example.com/path_to_your_image.jpg"
image = Image.open(requests.get(image_url, stream=True).raw)
inputs = processor(text=["Apple leaf with Apple scab", "Healthy Tomato leaf", ...], images=image, return_tensors="pt", padding=True)
outputs = model(**inputs)
logits_per_image = outputs.logits_per_image
probs = logits_per_image.softmax(dim=1)
predicted_label = probs.argmax().item()
labels = [
"Apple leaf with Apple scab",
"Apple leaf with Black rot",
...
"Healthy Tomato leaf"
]
print(f"Predicted label: {labels[predicted_label]}")
📚 詳細文檔
模型描述
clip-vit-large-patch14-finetuned-disease
模型在專門為識別影響植物葉片的各種病害而策劃的數據集上進行了微調。該模型使用 CLIP 架構將葉片圖像映射到描述性說明,有助於植物病害的診斷和分類。
標籤和描述
該模型經過訓練,可對以下植物病害和狀況進行分類:
{
0: "帶有蘋果黑星病的蘋果葉",
1: "帶有黑腐病的蘋果葉",
2: "帶有雪松蘋果鏽病的蘋果葉",
3: "健康的蘋果葉",
4: "帶有尾孢菌葉斑病(灰斑病)的玉米葉",
5: "帶有普通鏽病的玉米葉",
6: "帶有北方葉枯病的玉米葉",
7: "健康的玉米葉",
8: "帶有藻斑病的榴蓮葉",
9: "帶有葉枯病的榴蓮葉",
10: "帶有葉斑病的榴蓮葉",
11: "健康的榴蓮葉",
12: "帶有黑腐病的葡萄葉",
13: "帶有埃斯卡病(黑麻疹病)的葡萄葉",
14: "帶有葉枯病(伊薩里葉斑病)的葡萄葉",
15: "健康的葡萄葉",
16: "帶有褐色斑點的油棕葉",
17: "健康的油棕葉",
18: "帶有白蚧的油棕葉",
19: "帶有黃龍病(柑橘綠化病)的橙子葉",
20: "帶有細菌性斑點病的甜椒葉",
21: "健康的甜椒葉",
22: "帶有早疫病的馬鈴薯葉",
23: "帶有晚疫病的馬鈴薯葉",
24: "健康的馬鈴薯葉",
25: "帶有細菌性葉枯病的水稻葉",
26: "帶有稻瘟病的水稻葉",
27: "帶有褐斑病的水稻葉",
28: "帶有東格魯病的水稻葉",
29: "健康的大豆葉",
30: "帶有葉焦病的草莓葉",
31: "健康的草莓葉",
32: "帶有細菌性斑點病的番茄葉",
33: "帶有早疫病的番茄葉",
34: "帶有晚疫病的番茄葉",
35: "帶有葉黴病的番茄葉",
36: "帶有 Septoria 葉斑病的番茄葉",
37: "帶有紅蜘蛛(二斑葉蟎)的番茄葉",
38: "帶有靶斑病的番茄葉",
39: "帶有番茄黃葉曲葉病毒病的番茄葉",
40: "帶有番茄花葉病毒病的番茄葉",
41: "健康的番茄葉"
}
📄 許可證
文檔未提供許可證信息,暫不展示。
📚 引用
如果您在研究或應用中使用此模型,請按以下方式引用:
@misc{keetawan2024plantdisease,
author = {Keetawan Limaroon},
title = {clip-vit-large-patch14-finetuned-disease: A fine-tuned model for plant disease classification and captioning},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/Keetawan/clip-vit-large-patch14-plant-disease-finetuned},
}