国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)

這篇具有很好參考價(jià)值的文章主要介紹了【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。



前言

平時(shí)我們?cè)谑褂?em>YOLOv5、YOLOv7官方模型進(jìn)行魔改訓(xùn)練的時(shí)候,一般不會(huì)用到COCO2017等這樣的大型數(shù)據(jù)集,一般是在自己的自定義數(shù)據(jù)集或者是一些小的開(kāi)源數(shù)據(jù)集上進(jìn)行調(diào)試,這時(shí)候就要涉及到數(shù)據(jù)集的問(wèn)題。

這里我就VOC格式的數(shù)據(jù)集如何轉(zhuǎn)成YOLO格式的數(shù)據(jù)集,如何寫(xiě)訓(xùn)練需要的datasets.yaml文件等問(wèn)題進(jìn)行探討和分享。以我個(gè)人實(shí)際操作過(guò)程中的細(xì)節(jié)為例,如果有一些細(xì)節(jié)地方和數(shù)據(jù)文件位置等問(wèn)題的,歡迎在評(píng)論區(qū)討論交流。

另外YOLOv5、YOLOv7的代碼是非常相似的(你懂的),所以兩個(gè)網(wǎng)絡(luò)中好多地方是可以互通的,因此在兩個(gè)網(wǎng)絡(luò)中制作數(shù)據(jù)集的操作是可以通用的,具體細(xì)節(jié)如文件夾地址等注意一下就okk。

【注】:文章中數(shù)據(jù)集劃分以及操作問(wèn)題是基于 <深度學(xué)習(xí)視覺(jué)-目標(biāo)檢測(cè)> 方向?yàn)榛A(chǔ),數(shù)據(jù)集用于YOLOv5/v7做圖片目標(biāo)檢測(cè)。


1. 數(shù)據(jù)集準(zhǔn)備

這里我劃分的數(shù)據(jù)集是公共數(shù)據(jù)集,VOC2007trainval + VOC2012trainval。由于兩個(gè)數(shù)據(jù)集數(shù)據(jù)量都很小,所以采用將兩個(gè)數(shù)據(jù)集合并成一個(gè)數(shù)據(jù)集進(jìn)行操作(可以看成是自定義的VOC格式的數(shù)據(jù)集),也就是之前論文上會(huì)遇見(jiàn)的VOC07+12數(shù)據(jù)集。

首先準(zhǔn)備VOC07+12兩個(gè)數(shù)據(jù)集,將兩個(gè)數(shù)據(jù)集進(jìn)行合并(直接將兩個(gè)數(shù)據(jù)集的AnnotationsJPEGImages兩個(gè)文件夾中的內(nèi)容進(jìn)行合并即可),其中我們只需要Annotations標(biāo)簽文件夾,JPEGImages圖片文件夾兩個(gè)文件夾即可。VOC格式的數(shù)據(jù)集文件夾劃分如下圖所示。

【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)

基于劃分?jǐn)?shù)據(jù)集代碼制作自己的數(shù)據(jù)集VOC0712(images-22136,labels-22136),將其放在yolo代碼的根目錄(也就是放到y(tǒng)olo項(xiàng)目里)下,這就是待劃分的數(shù)據(jù)集文件(自定義數(shù)據(jù)集)。

【注】: VOC07+12數(shù)據(jù)集 的制作過(guò)程就是將上圖VOC2007 + VOC2012中的Annotations和JPEGImages中的數(shù)據(jù)分別進(jìn)行合并即可(ctrl+c、ctrl+v)

【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)


2. 劃分?jǐn)?shù)據(jù)集

在yolo根目錄下創(chuàng)建voc_to_yolo.py腳本,即劃分?jǐn)?shù)據(jù)集的腳本。

VOC數(shù)據(jù)集有20個(gè)類,如果是自定義的數(shù)據(jù)集,需要將類classes進(jìn)行修改。劃分比率自己定,這里80表示 train :val = 8 : 2

  • voc_to_yolo.py
"""
# VOC數(shù)據(jù)集 轉(zhuǎn) YOLO數(shù)據(jù)集 格式
"""


import xml.etree.ElementTree as ET
import pickle
import os
from os import listdir, getcwd
from os.path import join
import random
from shutil import copyfile

classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog",
           "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]
# classes=["ball"]

# 劃分比率
TRAIN_RATIO = 80


def clear_hidden_files(path):
    dir_list = os.listdir(path)
    for i in dir_list:
        abspath = os.path.join(os.path.abspath(path), i)
        if os.path.isfile(abspath):
            if i.startswith("._"):
                os.remove(abspath)
        else:
            clear_hidden_files(abspath)


# size是原圖的寬和高
def convert(size, box):
    dw = 1. / size[0]
    dh = 1. / size[1]
    x = (box[0] + box[1]) / 2.0
    y = (box[2] + box[3]) / 2.0
    w = box[1] - box[0]
    h = box[3] - box[2]
    x = x * dw
    w = w * dw
    y = y * dh
    h = h * dh
    return (x, y, w, h)


def convert_annotation(image_id):
    in_file = open('VOCdevkit/VOC0712/Annotations/%s.xml' % image_id, 'rb')
    out_file = open('VOCdevkit/VOC0712/YOLOLabels/%s.txt' % image_id, 'w')
    tree = ET.parse(in_file)
    root = tree.getroot()
    size = root.find('size')
    w = int(size.find('width').text)
    h = int(size.find('height').text)

    for obj in root.iter('object'):
        difficult = obj.find('difficult').text
        cls = obj.find('name').text
        if cls not in classes or int(difficult) == 1:
            continue
        cls_id = classes.index(cls)
        xmlbox = obj.find('bndbox')
        b = (float(xmlbox.find('xmin').text), float(xmlbox.find('xmax').text), float(xmlbox.find('ymin').text),
             float(xmlbox.find('ymax').text))
        bb = convert((w, h), b)
        out_file.write(str(cls_id) + " " + " ".join([str(a) for a in bb]) + '\n')
    in_file.close()
    out_file.close()


wd = os.getcwd()
data_base_dir = os.path.join(wd, "VOCdevkit/")
if not os.path.isdir(data_base_dir):
    os.mkdir(data_base_dir)
work_sapce_dir = os.path.join(data_base_dir, "VOC0712/")
if not os.path.isdir(work_sapce_dir):
    os.mkdir(work_sapce_dir)
annotation_dir = os.path.join(work_sapce_dir, "Annotations/")
if not os.path.isdir(annotation_dir):
    os.mkdir(annotation_dir)
clear_hidden_files(annotation_dir)
image_dir = os.path.join(work_sapce_dir, "JPEGImages/")
if not os.path.isdir(image_dir):
    os.mkdir(image_dir)
clear_hidden_files(image_dir)

# 這個(gè)部分可以不要
yolo_labels_dir = os.path.join(work_sapce_dir, "YOLOLabels/")
if not os.path.isdir(yolo_labels_dir):
    os.mkdir(yolo_labels_dir)
clear_hidden_files(yolo_labels_dir)

yolov5_images_dir = os.path.join(data_base_dir, "images/")
if not os.path.isdir(yolov5_images_dir):
    os.mkdir(yolov5_images_dir)
clear_hidden_files(yolov5_images_dir)
yolov5_labels_dir = os.path.join(data_base_dir, "labels/")
if not os.path.isdir(yolov5_labels_dir):
    os.mkdir(yolov5_labels_dir)
clear_hidden_files(yolov5_labels_dir)
yolov5_images_train_dir = os.path.join(yolov5_images_dir, "train/")
if not os.path.isdir(yolov5_images_train_dir):
    os.mkdir(yolov5_images_train_dir)
clear_hidden_files(yolov5_images_train_dir)
yolov5_images_test_dir = os.path.join(yolov5_images_dir, "val/")
if not os.path.isdir(yolov5_images_test_dir):
    os.mkdir(yolov5_images_test_dir)
clear_hidden_files(yolov5_images_test_dir)
yolov5_labels_train_dir = os.path.join(yolov5_labels_dir, "train/")
if not os.path.isdir(yolov5_labels_train_dir):
    os.mkdir(yolov5_labels_train_dir)
clear_hidden_files(yolov5_labels_train_dir)
yolov5_labels_test_dir = os.path.join(yolov5_labels_dir, "val/")
if not os.path.isdir(yolov5_labels_test_dir):
    os.mkdir(yolov5_labels_test_dir)
clear_hidden_files(yolov5_labels_test_dir)

# 這兩個(gè)部分yolov5_train.txt, yolov5_val.txt可以不要
train_file = open(os.path.join(wd, "yolov5_train.txt"), 'w')
test_file = open(os.path.join(wd, "yolov5_val.txt"), 'w')
train_file.close()
test_file.close()
train_file = open(os.path.join(wd, "yolov5_train.txt"), 'a')
test_file = open(os.path.join(wd, "yolov5_val.txt"), 'a')
list_imgs = os.listdir(image_dir)  # list image_one files
prob = random.randint(1, 100)
print("Probability: %d" % prob)
for i in range(0, len(list_imgs)):
    path = os.path.join(image_dir, list_imgs[i])
    if os.path.isfile(path):
        image_path = image_dir + list_imgs[i]
        voc_path = list_imgs[i]
        (nameWithoutExtention, extention) = os.path.splitext(os.path.basename(image_path))
        (voc_nameWithoutExtention, voc_extention) = os.path.splitext(os.path.basename(voc_path))
        annotation_name = nameWithoutExtention + '.xml'
        annotation_path = os.path.join(annotation_dir, annotation_name)
        label_name = nameWithoutExtention + '.txt'
        label_path = os.path.join(yolo_labels_dir, label_name)
    prob = random.randint(1, 100)
    print("Probability: %d" % prob)
    if (prob < TRAIN_RATIO):  # train dataset
        if os.path.exists(annotation_path):
            train_file.write(image_path + '\n')
            convert_annotation(nameWithoutExtention)  # convert label
            copyfile(image_path, yolov5_images_train_dir + voc_path)
            copyfile(label_path, yolov5_labels_train_dir + label_name)
    else:  # test dataset
        if os.path.exists(annotation_path):
            test_file.write(image_path + '\n')
            convert_annotation(nameWithoutExtention)  # convert label
            copyfile(image_path, yolov5_images_test_dir + voc_path)
            copyfile(label_path, yolov5_labels_test_dir + label_name)
train_file.close()
test_file.close()

運(yùn)行腳本,在原數(shù)據(jù)集中生成如下文件:

【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)

其中images、labels文件夾就是劃分后的數(shù)據(jù)集,這一部分可以直接用于YOLOv5的訓(xùn)練,無(wú)需后續(xù)再進(jìn)行 數(shù)據(jù)地址.txt 文件的生成。YOLOv7不行,YOLOv7必須用.txt文件進(jìn)行訓(xùn)練。

如果直接用原圖片進(jìn)行訓(xùn)練(YOLOv5支持直接引用圖片數(shù)據(jù)做訓(xùn)練;YOLOv7不支持,需要引用圖片數(shù)據(jù)生成的絕對(duì)路徑.txt文件訓(xùn)練)。這里說(shuō)的是YOLOv5中的特殊情況,自定義數(shù)據(jù)集的yaml文件可以仿照coco.yaml寫(xiě)成如下格式。

  • mydataset.yaml
# train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
train: ./VOCdevkit/images/train  # 17420 images
val: ./VOCdevkit/images/val # 4716 images

# number of classes
nc: 20

# Classes
names: ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog",
           "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]

【注】:另外腳本生成的幾個(gè)沒(méi)有用的文件可以直接刪除。其中包括上圖在原數(shù)據(jù)集下生成的YOLOLabels文件夾、下圖的在根目錄下生成的yolov5_train.txt、yolov5_val.txt文件都可以直接刪除。

(這是因?yàn)樵创a是down網(wǎng)上的代碼,不影響使用所以懶得做修改)

【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)


3. 生成datasets.txt文件

如果看過(guò)YOLOv5/v7代碼中的COCO.yaml文件的都清楚,文件中的數(shù)據(jù)路徑用的是txt文件。尤其是v7必須要用txt地址文件進(jìn)行訓(xùn)練(這里不清楚v7可否直接用圖片,但是我想操作起來(lái)要修改很多地方的代碼,容易產(chǎn)生bug,不如直接生成數(shù)據(jù)集的地址txt文件方便)

在根目錄下創(chuàng)建get_data_img_dir.py腳本,用于生成劃分完數(shù)據(jù)集后的images下train、val中圖片的絕對(duì)路徑。

  • get_data_img_dir.py
"""
# 制作數(shù)據(jù)集的步驟:
1. voc_to_yolo.py劃分?jǐn)?shù)據(jù)集,留下images、labels
2. get_data_img_dir.py 分別生成images下train、val圖片的絕對(duì)路徑(yolov7訓(xùn)練數(shù)據(jù)集需要.txt文件)
------------------------------------------------------------------------------------------------------------------------
# 生成圖片數(shù)據(jù)的絕對(duì)路徑
"""

import os


def listdir(path, list_name):  # 傳入存儲(chǔ)的list
    for file in os.listdir(path):
        file_path = os.path.join(path, file)
        if os.path.isdir(file_path):
            listdir(file_path, list_name)
        else:
            list_name.append(file_path)


list_name = []
path = '/root/Desktop/code/base-yolov7/VOCdevkit/images/val'  # 文件夾路徑
listdir(path, list_name)
print(list_name)

with open('./val0712.txt', 'w') as f:  # 要存入的txt
    write = ''
    for i in list_name:
        write = write + str(i) + '\n'
    f.write(write)

運(yùn)行腳本,在根目錄下生成 train0712.txt、val0712.txt 兩個(gè)txt文件,這兩個(gè)文件就是訓(xùn)練集圖片數(shù)據(jù)的絕對(duì)地址,文件如下圖所示。

我這里是因?yàn)橐诜?wù)器上訓(xùn)練網(wǎng)絡(luò),所以生成的地址是linux系統(tǒng)下的地址。

【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)


4. 基于數(shù)據(jù)集制作訓(xùn)練的datasets.yaml文件

在yolov5/v7訓(xùn)練過(guò)程中,將上圖生成的txt文件移動(dòng)到創(chuàng)建的datasets-VOC0712文件夾下,這樣數(shù)據(jù)集就制作完成,接下來(lái)就是制作模型訓(xùn)練需要用到的yaml文件,仿照coco.yaml文件制作自己的yaml文件,代碼如下圖所示。

  • mydatasets.yaml
# train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
train: ./datasets/VOC0712/train0712.txt  # 17420 images
val: ./datasets/VOC0712/val0712.txt  # 4716 images

# number of classes
nc: 20

# Classes
names: ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog",
           "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]

OK,到這一步自定義數(shù)據(jù)集就整體制作完成。接下來(lái)就可以按照模型訓(xùn)練需要注意的地方進(jìn)行下一步的訓(xùn)練啦!



【注】:由于本人水平有限,如有錯(cuò)誤,敬請(qǐng)指正?。?!文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-436183.html

到了這里,關(guān)于【DL系列】VOC數(shù)據(jù)集轉(zhuǎn)YOLO數(shù)據(jù)集(制作YOLOv5/v7自定義數(shù)據(jù)集)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • YOLO系列 --- YOLOV7算法(六):YOLO V7算法onnx模型部署

    有很多人來(lái)問(wèn)我,基于YOLO v7算法訓(xùn)練出來(lái)一個(gè)權(quán)重文件,如何進(jìn)行部署。所以特地寫(xiě)一篇部署的blog~ 一般,我們基于pytorch深度學(xué)習(xí)框架訓(xùn)練出來(lái)的權(quán)重文件是pt格式的,我們可以用python來(lái)直接調(diào)用這個(gè)文件。但是實(shí)際工業(yè)中,一般都是c++去調(diào)用權(quán)重文件的,所以我們需要將

    2024年02月07日
    瀏覽(18)
  • YOLO系列 --- YOLOV7算法(四):YOLO V7算法網(wǎng)絡(luò)結(jié)構(gòu)解析

    YOLO系列 --- YOLOV7算法(四):YOLO V7算法網(wǎng)絡(luò)結(jié)構(gòu)解析

    今天來(lái)講講YOLO V7算法網(wǎng)絡(luò)結(jié)構(gòu)吧~ 在 train.py 中大概95行的地方開(kāi)始創(chuàng)建網(wǎng)絡(luò),如下圖(YOLO V7下載的時(shí)間不同,可能代碼有少許的改動(dòng),所以行數(shù)跟我不一定一樣) 我們進(jìn)去發(fā)現(xiàn),其實(shí)就是在 yolo.py 里面。后期,我們就會(huì)發(fā)現(xiàn)相關(guān)的網(wǎng)絡(luò)結(jié)構(gòu)都是在該py文件里面。這篇blog就主

    2024年02月05日
    瀏覽(25)
  • YOLOv5|YOLOv7|YOLOv8改進(jìn)之實(shí)驗(yàn)結(jié)果(四):將多種算法的Loss精度曲線圖繪制到一張圖上,便于YOLOv5、v7系列模型對(duì)比實(shí)驗(yàn)獲取更多精度數(shù)據(jù),豐富實(shí)驗(yàn)數(shù)據(jù)

    YOLOv5|YOLOv7|YOLOv8改進(jìn)之實(shí)驗(yàn)結(jié)果(四):將多種算法的Loss精度曲線圖繪制到一張圖上,便于YOLOv5、v7系列模型對(duì)比實(shí)驗(yàn)獲取更多精度數(shù)據(jù),豐富實(shí)驗(yàn)數(shù)據(jù)

    ??該教程為改進(jìn)YOLO高階指南,屬于 《芒果書(shū)》 ??系列,包含大量的原創(chuàng)首發(fā)改進(jìn)方式?? ??更多改進(jìn)內(nèi)容??可以點(diǎn)擊查看:YOLOv5改進(jìn)、YOLOv7改進(jìn)、YOLOv8改進(jìn)、YOLOX改進(jìn)原創(chuàng)目錄 | 老師聯(lián)袂推薦?? ?? ??????本博客內(nèi)含·改進(jìn)源代碼·,按步驟操作運(yùn)行改進(jìn)后的代碼即可

    2023年04月17日
    瀏覽(92)
  • YOLOv5系列 1、制作自己的數(shù)據(jù)集

    YOLOv5系列 1、制作自己的數(shù)據(jù)集

    YOLOv5系列 1、制作自己的數(shù)據(jù)集 YOLOv5系列 2、使用yolov5識(shí)別自己的數(shù)據(jù) 本文所使用的Yolov5為6.1版本,所用為GPU版(親測(cè)CPU也一樣能跑,只是速度會(huì)慢很多),使用的環(huán)境是torch1.7.1+cuda10.1。 Labelme的安裝很簡(jiǎn)單,如果想直接安裝就直接在命令行中: 如果是想把labelme安裝在Anac

    2024年02月10日
    瀏覽(20)
  • YOLO系列梳理(三)YOLOv5

    YOLO系列梳理(三)YOLOv5

    前言 ? YOLOv5 是在 YOLOv4 出來(lái)之后沒(méi)多久就橫空出世了。今天筆者介紹一下 YOLOv5 的相關(guān)知識(shí)。目前 YOLOv5 發(fā)布了新的版本,6.0版本。在這里,YOLOv5 也在5.0基礎(chǔ)上集成了更多特性,同時(shí)也對(duì)模型做了微調(diào),并且優(yōu)化了模型大小,減少了模型的參數(shù)量。那么這樣,就更加適合移動(dòng)

    2024年02月05日
    瀏覽(26)
  • 【目標(biāo)檢測(cè)】YOLOv5跑通VOC2007數(shù)據(jù)集

    【目標(biāo)檢測(cè)】YOLOv5跑通VOC2007數(shù)據(jù)集

    如果經(jīng)常閱讀我博客的讀者,想必對(duì)YOLOv5并不陌生。在Pytorch:YOLO-v5目標(biāo)檢測(cè)(上)一文中,我使用了coco128數(shù)據(jù)集,非常輕松的跑通了。然而在使用VOC2007數(shù)據(jù)集時(shí),卻遇到重重阻礙。主要問(wèn)題在數(shù)據(jù)標(biāo)簽轉(zhuǎn)化這個(gè)階段,VOC數(shù)據(jù)集標(biāo)注形式是xml,需要將其轉(zhuǎn)換為txt。很多博文并未

    2024年02月06日
    瀏覽(21)
  • yolov5-7.0訓(xùn)練自己的VOC數(shù)據(jù)集

    yolov5-7.0訓(xùn)練自己的VOC數(shù)據(jù)集

    這個(gè)筆記可能只適用于7.0版本的,寫(xiě)這個(gè)筆記主要是給工作室伙伴參考的,大佬請(qǐng)繞行 有錯(cuò)誤之處歡迎指出 yolov5的GitHub倉(cāng)庫(kù)地址:Release v7.0 - YOLOv5 SOTA Realtime Instance Segmentation · ultralytics/yolov5 (github.com) 需要下載源碼和預(yù)訓(xùn)練模型 將源碼解壓,在其文件夾里面新建一個(gè)weights文

    2024年02月12日
    瀏覽(86)
  • 【YOLO】基于YOLOv8實(shí)現(xiàn)自定義數(shù)據(jù)的自動(dòng)標(biāo)注(針對(duì)VOC格式的數(shù)據(jù)集)

    利用yolov8的檢測(cè)模型實(shí)現(xiàn)數(shù)據(jù)集的自標(biāo)注,針對(duì)VOC數(shù)據(jù)集,.xml文件,labelimg標(biāo)注工具 yolov8模型的訓(xùn)練可以參考筆者的博客 【YOLO】YOLOv8實(shí)操:環(huán)境配置/自定義數(shù)據(jù)集準(zhǔn)備/模型訓(xùn)練/預(yù)測(cè) 訓(xùn)練好自定義的模型,就可以執(zhí)行下面的代碼實(shí)現(xiàn)模型自標(biāo)注數(shù)據(jù)集 修改下面三個(gè)參數(shù)即

    2024年02月11日
    瀏覽(25)
  • 【YOLO系列】YOLOv5超詳細(xì)解讀(網(wǎng)絡(luò)詳解)

    【YOLO系列】YOLOv5超詳細(xì)解讀(網(wǎng)絡(luò)詳解)

    吼吼!終于來(lái)到了YOLOv5啦! 首先,一個(gè)熱知識(shí):YOLOv5沒(méi)有發(fā)表正式論文哦~ 為什么呢?可能YOLOv5項(xiàng)目的作者Glenn Jocher還在吃帽子吧,hh 前言 一、YOLOv5的網(wǎng)絡(luò)結(jié)構(gòu) ?二、輸入端 (1)Mosaic數(shù)據(jù)增強(qiáng) (2)自適應(yīng)錨框計(jì)算 (3)自適應(yīng)圖片縮放 三、Backbone (1)Focus結(jié)構(gòu) (2)CSP結(jié)構(gòu)

    2023年04月09日
    瀏覽(38)
  • 【數(shù)據(jù)集轉(zhuǎn)換】VOC數(shù)據(jù)集轉(zhuǎn)COCO數(shù)據(jù)集·代碼實(shí)現(xiàn)+操作步驟

    【數(shù)據(jù)集轉(zhuǎn)換】VOC數(shù)據(jù)集轉(zhuǎn)COCO數(shù)據(jù)集·代碼實(shí)現(xiàn)+操作步驟

    在自己的數(shù)據(jù)集上實(shí)驗(yàn)時(shí),往往需要將VOC數(shù)據(jù)集轉(zhuǎn)化為coco數(shù)據(jù)集,因?yàn)檫@種需求所以才記錄這篇文章,代碼出處未知,感謝開(kāi)源。 在遠(yuǎn)程服務(wù)器上測(cè)試目標(biāo)檢測(cè)算法需要用到測(cè)試集,最常用的是coco2014/2017和voc07/12數(shù)據(jù)集。 coco數(shù)據(jù)集的地址為http://cocodataset.org/#download voc和co

    2024年02月04日
    瀏覽(18)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包