首页 > 分享 > 猫狗皮肤病医疗数据集《75w例医疗数据的猫狗皮肤病医疗数据集》AI模型训练di:03– 超过 10,000 只宠物– 7 种宠物疾病和 4 种猫皮肤病的图像–超过 500,000 张宠物试用3000张

猫狗皮肤病医疗数据集《75w例医疗数据的猫狗皮肤病医疗数据集》AI模型训练di:03– 超过 10,000 只宠物– 7 种宠物疾病和 4 种猫皮肤病的图像–超过 500,000 张宠物试用3000张

《超过75w例医疗数据的猫狗皮肤病医疗数据集》AI模型训练


di:03
– 超过 10,000 只宠物
– 7 种宠物疾病和 4 种猫皮肤病的图像
– 超过 500,000 张宠物(狗和猫)图片
– 超过 250,000 张疾病图像
可用于AI模型训练

猫狗皮肤病医疗数据集
图像数量

总图像数:超过500,000张疾病图像数:超过250,000张宠物数量:超过10,000只疾病种类:7种宠物疾病和4种猫皮肤病用途:该数据集专为猫狗皮肤病的诊断和分类任务设计,适用于兽医领域、宠物健康管理和医学研究。通过使用深度学习模型(如卷积神经网络CNN),可以实现对不同皮肤病的准确识别和分类。 数据集特点 大规模:包含超过500,000张高分辨率图像,提供了丰富的训练数据。多样性疾病多样性:涵盖7种宠物疾病和4种猫皮肤病,能够全面覆盖常见的皮肤问题。宠物多样性:包括大量的狗和猫的图像,支持多种宠物的皮肤病识别。高质量标注:所有图像都经过专业兽医标注,确保了标注的准确性。实际应用场景:数据来源于真实的临床环境,具有很高的实用价值。多模态:除了图像数据外,还可能包含相关的病例描述和其他元数据,有助于综合分析。 类别列表 宠物疾病(7种): 皮肤病A皮肤病B皮肤病C皮肤病D皮肤病E皮肤病F皮肤病G猫皮肤病(4种): 猫皮肤病1猫皮肤病2猫皮肤病3猫皮肤病4 应用领域

皮肤病诊断:辅助兽医快速准确地诊断宠物的皮肤病。健康管理:帮助宠物主人了解宠物的健康状况,并提供预防措施。医学研究:支持研究人员进行皮肤病的流行病学研究和治疗方法开发。远程医疗:结合远程医疗平台,提供在线皮肤病诊断服务。数据分析:通过数据分析,提供关于皮肤病分布和治疗效果的统计报告,支持决策制定。 数据集结构 图像数据:包含不同场景下的猫狗皮肤图像,用于图像分类和目标检测任务。标注文件图像标注:使用常见的标注格式(如PASCAL VOC、COCO等)进行标注,包括类别标签和边界框。元数据:可能包含每张图像的相关信息,如宠物种类、年龄、性别、症状描述等。 获取方式

通常情况下,研究人员可以通过官方提供的链接或相关机构网站下载该数据集。请注意,使用时应遵循相应的许可协议和引用要求。

关键代码示例

1. 下载数据集

假设我们已经有了数据集的下载链接,可以使用 Python 的 requests 库来下载数据集:

import requests

import os

# 定义下载链接和保存路径

url = 'http://example.com/path/to/pet_dermatology_dataset.zip' # 替换为实际的下载链接

save_path = './pet_dermatology_dataset.zip'

# 检查是否已经下载过

if not os.path.exists(save_path):

print("Downloading dataset...")

response = requests.get(url, stream=True)

with open(save_path, 'wb') as f:

for chunk in response.iter_content(chunk_size=8192):

if chunk:

f.write(chunk)

print("Download complete.")

else:

print("Dataset already exists.")

# 解压数据集

import zipfile

with zipfile.ZipFile(save_path, 'r') as zip_ref:

zip_ref.extractall('./pet_dermatology_dataset')

2. 加载和显示图像及其标注

以下是一个加载和显示图像及其标注框的示例:

import matplotlib.pyplot as plt

import numpy as np

from PIL import Image

import xml.etree.ElementTree as ET

def load_image_and_annotations(image_path, annotation_path):

image = Image.open(image_path).convert("RGB")

tree = ET.parse(annotation_path)

root = tree.getroot()

annotations = []

for obj in root.findall('object'):

name = obj.find('name').text

bbox = obj.find('bndbox')

xmin = int(bbox.find('xmin').text)

ymin = int(bbox.find('ymin').text)

xmax = int(bbox.find('xmax').text)

ymax = int(bbox.find('ymax').text)

annotations.append((name, (xmin, ymin, xmax, ymax)))

return image, annotations

def display_image_with_annotations(image, annotations):

fig, ax = plt.subplots(1, figsize=(10, 10))

ax.imshow(image)

for name, (xmin, ymin, xmax, ymax) in annotations:

rect = plt.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, fill=False, edgecolor='red', linewidth=2)

ax.add_patch(rect)

ax.text(xmin, ymin, name, fontsize=12, color='white', bbox=dict(facecolor='red', alpha=0.5))

plt.axis('off')

plt.show()

# 示例路径

image_path = './pet_dermatology_dataset/images/image_0001.jpg'

annotation_path = './pet_dermatology_dataset/annotations/image_0001.xml'

image, annotations = load_image_and_annotations(image_path, annotation_path)

display_image_with_annotations(image, annotations)

3. 创建 YOLO 格式的数据集

YOLO 模型需要特定格式的数据集,通常包括图像文件和对应的标注文件(.txt 格式)。以下是一个将 XML 标注转换为 YOLO 格式的示例:

import os

import xml.etree.ElementTree as ET

def convert_to_yolo_format(xml_dir, img_dir, yolo_dir, classes):

os.makedirs(yolo_dir, exist_ok=True)

for xml_file in os.listdir(xml_dir):

if not xml_file.endswith('.xml'):

continue

tree = ET.parse(os.path.join(xml_dir, xml_file))

root = tree.getroot()

image_name = root.find('filename').text

image_path = os.path.join(img_dir, image_name)

image = Image.open(image_path)

width, height = image.size

yolo_file = os.path.splitext(xml_file)[0] + '.txt'

yolo_path = os.path.join(yolo_dir, yolo_file)

with open(yolo_path, 'w') as f:

for obj in root.findall('object'):

name = obj.find('name').text

class_id = classes.index(name)

bbox = obj.find('bndbox')

xmin = int(bbox.find('xmin').text)

ymin = int(bbox.find('ymin').text)

xmax = int(bbox.find('xmax').text)

ymax = int(bbox.find('ymax').text)

x_center = (xmin + xmax) / 2.0 / width

y_center = (ymin + ymax) / 2.0 / height

box_width = (xmax - xmin) / width

box_height = (ymax - ymin) / height

f.write(f"{class_id} {x_center} {y_center} {box_width} {box_height}n")

# 定义类名

classes = ['disease_A', 'disease_B', 'disease_C', 'disease_D', 'disease_E', 'disease_F', 'disease_G',

'cat_skin_disease_1', 'cat_skin_disease_2', 'cat_skin_disease_3', 'cat_skin_disease_4']

# 转换标注文件

convert_to_yolo_format(

xml_dir='./pet_dermatology_dataset/annotations',

img_dir='./pet_dermatology_dataset/images',

yolo_dir='./pet_dermatology_dataset/yolo_annotations',

classes=classes

)

4. 使用 YOLOv5 进行目标检测

以下是一个使用 YOLOv5 进行目标检测的简单示例:

安装 YOLOv5

git clone https://github.com/ultralytics/yolov5

cd yolov5

pip install -r requirements.txt

准备配置文件: 在 yolov5/data 目录下创建一个配置文件 pet_dermatology.yaml,内容如下:

train: ./pet_dermatology_dataset/images/train

val: ./pet_dermatology_dataset/images/val

nc: 11

names: ['disease_A', 'disease_B', 'disease_C', 'disease_D', 'disease_E', 'disease_F', 'disease_G',

'cat_skin_disease_1', 'cat_skin_disease_2', 'cat_skin_disease_3', 'cat_skin_disease_4']

划分数据集: 将数据集划分为训练集和验证集(例如,80% 训练集,20% 验证集)。

训练模型

python train.py --img 640 --batch 16 --epochs 50 --data pet_dermatology.yaml --weights yolov5s.pt

评估模型

python val.py --img 640 --batch 16 --data pet_dermatology.yaml --weights runs/train/exp/weights/best.pt

推理和可视化

from yolov5 import detect

model = torch.hub.load('ultralytics/yolov5', 'custom', path='runs/train/exp/weights/best.pt')

results = model(image_path)

results.show()

通过上述步骤,您将拥有一个完整的猫狗皮肤病识别系统,包括数据集、预训练模型和相关的训练流程。希望这些代码能帮助您更好地利用该数据集!

相关知识

宠物皮肤病的流行病学数据分析
数据集下载地址(转)以下内容转自https://baijiahao.baidu.com/s?id=1615853849218131902&wfr=spider&for=pc
基于深度学习的犬种识别系统详解(网页版+YOLOv8/v7/v6/v5代码+训练数据集)
宠物医疗太贵?首个猫狗脸AI识别宠物医疗保险上架陆金所
猫狗图片分类 03分析图片数据
AI 数据集最常见的6大问题(附解决方案)
深度学习数据集
实战YOLOv8:从COCO到自定义数据集的训练全攻略
Pytorch采用AlexNet实现猫狗数据集分类(训练与预测)
宠物医生诊疗室 猫狗常见疾病一本通 宠物医疗 猫狗健康管理常见疾病防治 传染病皮肤病呼吸道疾病内分泌疾病 广东科技

网址: 猫狗皮肤病医疗数据集《75w例医疗数据的猫狗皮肤病医疗数据集》AI模型训练di:03– 超过 10,000 只宠物– 7 种宠物疾病和 4 种猫皮肤病的图像–超过 500,000 张宠物试用3000张 https://m.mcbbbk.com/newsview385887.html

所属分类:萌宠日常
上一篇: 什么是敏感性皮肤
下一篇: 敏感性皮肤的原因与护理指导