最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Python實(shí)現(xiàn)將VOC格式數(shù)據(jù)集轉(zhuǎn)換為YOLO格式數(shù)據(jù)集

 更新時(shí)間:2025年06月03日 10:19:39   作者:_養(yǎng)樂多_  
本文將介紹如何將目標(biāo)檢測(cè)中常用的VOC格式數(shù)據(jù)集轉(zhuǎn)換為YOLO數(shù)據(jù)集,并進(jìn)行數(shù)據(jù)集比例劃分,從而方便的進(jìn)行YOLO目標(biāo)檢測(cè),感興趣的小伙伴跟著小編一起來(lái)看看吧

一、將VOC格式數(shù)據(jù)集轉(zhuǎn)換為YOLO格式數(shù)據(jù)集

執(zhí)行以下腳本將VOC格式數(shù)據(jù)集轉(zhuǎn)換為YOLO格式數(shù)據(jù)集。

但是需要注意的是:

  1. 轉(zhuǎn)換之后的數(shù)據(jù)集只有Images和labels兩個(gè)文件。還需要執(zhí)行第二節(jié)中的腳本進(jìn)行數(shù)據(jù)集劃分,將總的數(shù)據(jù)集劃分為訓(xùn)練、驗(yàn)證、測(cè)試數(shù)據(jù)集;
  2. 使用的話,需要修改 class_mapping 中類別名和對(duì)應(yīng)標(biāo)簽,還有VOC數(shù)據(jù)集路徑、YOLO數(shù)據(jù)集路徑。
import os
import shutil
import xml.etree.ElementTree as ET

# VOC格式數(shù)據(jù)集路徑
voc_data_path = 'E:\\DataSet\\helmet-VOC'
voc_annotations_path = os.path.join(voc_data_path, 'Annotations')
voc_images_path = os.path.join(voc_data_path, 'JPEGImages')

# YOLO格式數(shù)據(jù)集保存路徑
yolo_data_path = 'E:\\DataSet\\helmet-YOLO'
yolo_images_path = os.path.join(yolo_data_path, 'images')
yolo_labels_path = os.path.join(yolo_data_path, 'labels')

# 創(chuàng)建YOLO格式數(shù)據(jù)集目錄
os.makedirs(yolo_images_path, exist_ok=True)
os.makedirs(yolo_labels_path, exist_ok=True)

# 類別映射 (可以根據(jù)自己的數(shù)據(jù)集進(jìn)行調(diào)整)
class_mapping = {
    'head': 0,
    'helmet': 1,
    'person': 2,
    # 添加更多類別...
}

def convert_voc_to_yolo(voc_annotation_file, yolo_label_file):
    tree = ET.parse(voc_annotation_file)
    root = tree.getroot()

    size = root.find('size')
    width = float(size.find('width').text)
    height = float(size.find('height').text)

    with open(yolo_label_file, 'w') as f:
        for obj in root.findall('object'):
            cls = obj.find('name').text
            if cls not in class_mapping:
                continue
            cls_id = class_mapping[cls]
            xmlbox = obj.find('bndbox')
            xmin = float(xmlbox.find('xmin').text)
            ymin = float(xmlbox.find('ymin').text)
            xmax = float(xmlbox.find('xmax').text)
            ymax = float(xmlbox.find('ymax').text)

            x_center = (xmin + xmax) / 2.0 / width
            y_center = (ymin + ymax) / 2.0 / height
            w = (xmax - xmin) / width
            h = (ymax - ymin) / height

            f.write(f"{cls_id} {x_center} {y_center} {w} {h}\n")

# 遍歷VOC數(shù)據(jù)集的Annotations目錄,進(jìn)行轉(zhuǎn)換
for voc_annotation in os.listdir(voc_annotations_path):
    if voc_annotation.endswith('.xml'):
        voc_annotation_file = os.path.join(voc_annotations_path, voc_annotation)
        image_id = os.path.splitext(voc_annotation)[0]
        voc_image_file = os.path.join(voc_images_path, f"{image_id}.jpg")
        yolo_label_file = os.path.join(yolo_labels_path, f"{image_id}.txt")
        yolo_image_file = os.path.join(yolo_images_path, f"{image_id}.jpg")

        convert_voc_to_yolo(voc_annotation_file, yolo_label_file)
        if os.path.exists(voc_image_file):
            shutil.copy(voc_image_file, yolo_image_file)

print("轉(zhuǎn)換完成!")

二、YOLO格式數(shù)據(jù)集劃分(訓(xùn)練、驗(yàn)證、測(cè)試)

參考:https://docs.ultralytics.com/datasets/detect/#ultralytics-yolo-format

隨機(jī)將數(shù)據(jù)集按照0.7-0.2-0.1比例劃分為訓(xùn)練、驗(yàn)證、測(cè)試數(shù)據(jù)集。
注意,修改代碼中圖片的后綴,如果是.jpg,就把.png修改為.jpg。

最終結(jié)果

2.1 版本1

用版本1劃分就行,也可以用版本2,版本3就不用了。版本1和版本2是兩種不同的組織方式都能訓(xùn)練。版本1是官方的組織方法。

import os
import shutil
import random

def make_yolo_dataset(images_folder, labels_folder, output_folder, train_ratio=0.8):
    # 創(chuàng)建目標(biāo)文件夾
    images_train_folder = os.path.join(output_folder, 'images/train')
    images_val_folder = os.path.join(output_folder, 'images/val')
    labels_train_folder = os.path.join(output_folder, 'labels/train')
    labels_val_folder = os.path.join(output_folder, 'labels/val')

    os.makedirs(images_train_folder, exist_ok=True)
    os.makedirs(images_val_folder, exist_ok=True)
    os.makedirs(labels_train_folder, exist_ok=True)
    os.makedirs(labels_val_folder, exist_ok=True)

    # 獲取圖片和標(biāo)簽的文件名(不包含擴(kuò)展名)
    image_files = [f for f in os.listdir(images_folder) if f.endswith('.jpg')]
    label_files = [f for f in os.listdir(labels_folder) if f.endswith('.txt')]
    image_base_names = set(os.path.splitext(f)[0] for f in image_files)
    label_base_names = set(os.path.splitext(f)[0] for f in label_files)

    # 找出圖片和標(biāo)簽都存在的文件名
    matched_files = list(image_base_names & label_base_names)

    # 打亂順序并劃分為訓(xùn)練集和驗(yàn)證集
    random.shuffle(matched_files)
    split_idx = int(len(matched_files) * train_ratio)
    train_files = matched_files[:split_idx]
    val_files = matched_files[split_idx:]

    # 移動(dòng)文件到對(duì)應(yīng)文件夾
    for base_name in train_files:
        img_src = os.path.join(images_folder, f"{base_name}.jpg")
        lbl_src = os.path.join(labels_folder, f"{base_name}.txt")

        img_dst = os.path.join(images_train_folder, f"{base_name}.jpg")
        lbl_dst = os.path.join(labels_train_folder, f"{base_name}.txt")

        shutil.copyfile(img_src, img_dst)
        shutil.copyfile(lbl_src, lbl_dst)

    for base_name in val_files:
        img_src = os.path.join(images_folder, f"{base_name}.jpg")
        lbl_src = os.path.join(labels_folder, f"{base_name}.txt")

        img_dst = os.path.join(images_val_folder, f"{base_name}.jpg")
        lbl_dst = os.path.join(labels_val_folder, f"{base_name}.txt")

        shutil.copyfile(img_src, img_dst)
        shutil.copyfile(lbl_src, lbl_dst)

    print("數(shù)據(jù)集劃分完成!")

# 使用示例
images_folder = 'path/to/your/images_folder'  # 原始圖片文件夾路徑
labels_folder = 'path/to/your/labels_folder'  # 原始標(biāo)簽文件夾路徑
output_folder = 'path/to/your/output_folder'  # 存放結(jié)果數(shù)據(jù)集的文件夾路徑
make_yolo_dataset(images_folder, labels_folder, output_folder)

2.2 版本2

import os
import shutil
import random
from math import floor


# 創(chuàng)建輸出目錄的函數(shù)
def create_dirs(output_dir):
    images_dir = os.path.join(output_dir, 'images')
    labels_dir = os.path.join(output_dir, 'labels')
    for split in ['train', 'val', 'test']:
        os.makedirs(os.path.join(images_dir, split), exist_ok=True)
        os.makedirs(os.path.join(labels_dir, split), exist_ok=True)
    return images_dir, labels_dir


# 獲取圖片和對(duì)應(yīng)txt標(biāo)簽的列表
def get_files(images_path, labels_path):
    image_files = [f for f in os.listdir(images_path) if f.endswith(('jpg', 'png', 'jpeg'))]
    label_files = [f for f in os.listdir(labels_path) if f.endswith('.txt')]

    # 檢查圖片和標(biāo)簽是否配對(duì)
    paired_files = []
    for image_file in image_files:
        base_name = os.path.splitext(image_file)[0]
        label_file = base_name + '.txt'
        if label_file in label_files:
            paired_files.append((image_file, label_file))
    return paired_files


# 將文件按比例劃分并拷貝到相應(yīng)目錄
def split_and_copy(paired_files, images_path, labels_path, images_dir, labels_dir, train_ratio, val_ratio):
    random.shuffle(paired_files)  # 隨機(jī)打亂

    total_files = len(paired_files)
    train_count = floor(total_files * train_ratio)
    val_count = floor(total_files * val_ratio)
    test_count = total_files - train_count - val_count

    splits = {
        'train': paired_files[:train_count],
        'val': paired_files[train_count:train_count + val_count],
        'test': paired_files[train_count + val_count:]
    }

    for split, files in splits.items():
        for image_file, label_file in files:
            shutil.copy(os.path.join(images_path, image_file), os.path.join(images_dir, split, image_file))
            shutil.copy(os.path.join(labels_path, label_file), os.path.join(labels_dir, split, label_file))
        print(f'{split}: {len(files)} files')


# 主函數(shù)
def main():
    # 寫死的路徑
    images_path = "E:\\DataSet\\LC\\large_coal_blocked_yolo\\totalImages"  # 替換為實(shí)際圖片文件夾路徑
    labels_path = "E:\\DataSet\\LC\\large_coal_blocked_yolo\\totalLabels"  # 替換為實(shí)際txt文件夾路徑
    output_dir = "E:\\DataSet\\LC\\large_coal_blocked_yolo\\output"  # 替換為實(shí)際輸出主目錄路徑

    # 數(shù)據(jù)劃分比例
    train_ratio = 0.7
    val_ratio = 0.3
    test_ratio = 0

    # 容差值用于浮點(diǎn)數(shù)比較
    epsilon = 1e-6

    # 確保比例之和等于1
    assert abs(train_ratio + val_ratio + test_ratio - 1) < epsilon, "比例之和必須等于1"

    # 創(chuàng)建目錄
    images_dir, labels_dir = create_dirs(output_dir)

    # 獲取文件列表
    paired_files = get_files(images_path, labels_path)

    # 進(jìn)行劃分并拷貝
    split_and_copy(paired_files, images_path, labels_path, images_dir, labels_dir, train_ratio, val_ratio)


# 調(diào)用主函數(shù)
if __name__ == "__main__":
    main()

2.3 版本3

import os
import shutil
import random

# YOLO格式數(shù)據(jù)集保存路徑
yolo_images_path1 = 'E:\\DataSet\\helmet-VOC'
yolo_labels_path1 = 'E:\\DataSet\\helmet-YOLO'
yolo_data_path = yolo_labels_path1

yolo_images_path = os.path.join(yolo_images_path1, 'JPEGImages')
yolo_labels_path = os.path.join(yolo_labels_path1, 'labels')

# 創(chuàng)建劃分后的目錄結(jié)構(gòu)
train_images_path = os.path.join(yolo_data_path, 'train', 'images')
train_labels_path = os.path.join(yolo_data_path, 'train', 'labels')
val_images_path = os.path.join(yolo_data_path, 'val', 'images')
val_labels_path = os.path.join(yolo_data_path, 'val', 'labels')
test_images_path = os.path.join(yolo_data_path, 'test', 'images')
test_labels_path = os.path.join(yolo_data_path, 'test', 'labels')

os.makedirs(train_images_path, exist_ok=True)
os.makedirs(train_labels_path, exist_ok=True)
os.makedirs(val_images_path, exist_ok=True)
os.makedirs(val_labels_path, exist_ok=True)
os.makedirs(test_images_path, exist_ok=True)
os.makedirs(test_labels_path, exist_ok=True)

# 獲取所有圖片文件名(不包含擴(kuò)展名)
image_files = [f[:-4] for f in os.listdir(yolo_images_path) if f.endswith('.png')]

# 隨機(jī)打亂文件順序
random.shuffle(image_files)

# 劃分?jǐn)?shù)據(jù)集比例
train_ratio = 0.7
val_ratio = 0.2
test_ratio = 0.1

train_count = int(train_ratio * len(image_files))
val_count = int(val_ratio * len(image_files))
test_count = len(image_files) - train_count - val_count

train_files = image_files[:train_count]
val_files = image_files[train_count:train_count + val_count]
test_files = image_files[train_count + val_count:]

# 移動(dòng)文件到相應(yīng)的目錄
def move_files(files, src_images_path, src_labels_path, dst_images_path, dst_labels_path):
    for file in files:
        src_image_file = os.path.join(src_images_path, f"{file}.png")
        src_label_file = os.path.join(src_labels_path, f"{file}.txt")
        dst_image_file = os.path.join(dst_images_path, f"{file}.png")
        dst_label_file = os.path.join(dst_labels_path, f"{file}.txt")

        if os.path.exists(src_image_file) and os.path.exists(src_label_file):
            shutil.move(src_image_file, dst_image_file)
            shutil.move(src_label_file, dst_label_file)

# 移動(dòng)訓(xùn)練集文件
move_files(train_files, yolo_images_path, yolo_labels_path, train_images_path, train_labels_path)
# 移動(dòng)驗(yàn)證集文件
move_files(val_files, yolo_images_path, yolo_labels_path, val_images_path, val_labels_path)
# 移動(dòng)測(cè)試集文件
move_files(test_files, yolo_images_path, yolo_labels_path, test_images_path, test_labels_path)

print("數(shù)據(jù)集劃分完成!")

三、一步到位

如果不想分兩步進(jìn)行格式轉(zhuǎn)換,那么以下腳本結(jié)合了以上兩步,直接得到最后按比例劃分訓(xùn)練、驗(yàn)證、測(cè)試的數(shù)據(jù)集結(jié)果。

注意:需要修改 voc_data_path ,yolo_data_path ,class_mapping 以及 ‘.png’ 后綴。

import os
import shutil
import random
import xml.etree.ElementTree as ET
from tqdm import tqdm

# VOC格式數(shù)據(jù)集路徑
voc_data_path = 'E:\\DataSet-VOC'
voc_annotations_path = os.path.join(voc_data_path, 'Annotations')
voc_images_path = os.path.join(voc_data_path, 'JPEGImages')

# YOLO格式數(shù)據(jù)集保存路徑
yolo_data_path = 'E:\\DataSet-YOLO'
yolo_images_path = os.path.join(yolo_data_path, 'images')
yolo_labels_path = os.path.join(yolo_data_path, 'labels')

# 創(chuàng)建YOLO格式數(shù)據(jù)集目錄
os.makedirs(yolo_images_path, exist_ok=True)
os.makedirs(yolo_labels_path, exist_ok=True)

# 類別映射 (可以根據(jù)自己的數(shù)據(jù)集進(jìn)行調(diào)整)
class_mapping = {
    'head': 0,
    'helmet': 1,
    'person': 2,
    # 添加更多類別...
}

def convert_voc_to_yolo(voc_annotation_file, yolo_label_file):
    tree = ET.parse(voc_annotation_file)
    root = tree.getroot()

    size = root.find('size')
    width = float(size.find('width').text)
    height = float(size.find('height').text)

    with open(yolo_label_file, 'w') as f:
        for obj in root.findall('object'):
            cls = obj.find('name').text
            if cls not in class_mapping:
                continue
            cls_id = class_mapping[cls]
            xmlbox = obj.find('bndbox')
            xmin = float(xmlbox.find('xmin').text)
            ymin = float(xmlbox.find('ymin').text)
            xmax = float(xmlbox.find('xmax').text)
            ymax = float(xmlbox.find('ymax').text)

            x_center = (xmin + xmax) / 2.0 / width
            y_center = (ymin + ymax) / 2.0 / height
            w = (xmax - xmin) / width
            h = (ymax - ymin) / height

            f.write(f"{cls_id} {x_center} {y_center} {w} {h}\n")

# 遍歷VOC數(shù)據(jù)集的Annotations目錄,進(jìn)行轉(zhuǎn)換
print("開始VOC到Y(jié)OLO格式轉(zhuǎn)換...")
for voc_annotation in tqdm(os.listdir(voc_annotations_path)):
    if voc_annotation.endswith('.xml'):
        voc_annotation_file = os.path.join(voc_annotations_path, voc_annotation)
        image_id = os.path.splitext(voc_annotation)[0]
        voc_image_file = os.path.join(voc_images_path, f"{image_id}.png")
        yolo_label_file = os.path.join(yolo_labels_path, f"{image_id}.txt")
        yolo_image_file = os.path.join(yolo_images_path, f"{image_id}.png")

        convert_voc_to_yolo(voc_annotation_file, yolo_label_file)
        if os.path.exists(voc_image_file):
            shutil.copy(voc_image_file, yolo_image_file)

print("VOC到Y(jié)OLO格式轉(zhuǎn)換完成!")

# 劃分?jǐn)?shù)據(jù)集
train_images_path = os.path.join(yolo_data_path, 'train', 'images')
train_labels_path = os.path.join(yolo_data_path, 'train', 'labels')
val_images_path = os.path.join(yolo_data_path, 'val', 'images')
val_labels_path = os.path.join(yolo_data_path, 'val', 'labels')
test_images_path = os.path.join(yolo_data_path, 'test', 'images')
test_labels_path = os.path.join(yolo_data_path, 'test', 'labels')

os.makedirs(train_images_path, exist_ok=True)
os.makedirs(train_labels_path, exist_ok=True)
os.makedirs(val_images_path, exist_ok=True)
os.makedirs(val_labels_path, exist_ok=True)
os.makedirs(test_images_path, exist_ok=True)
os.makedirs(test_labels_path, exist_ok=True)

# 獲取所有圖片文件名(不包含擴(kuò)展名)
image_files = [f[:-4] for f in os.listdir(yolo_images_path) if f.endswith('.png')]

# 隨機(jī)打亂文件順序
random.shuffle(image_files)

# 劃分?jǐn)?shù)據(jù)集比例
train_ratio = 0.7
val_ratio = 0.2
test_ratio = 0.1

train_count = int(train_ratio * len(image_files))
val_count = int(val_ratio * len(image_files))
test_count = len(image_files) - train_count - val_count

train_files = image_files[:train_count]
val_files = image_files[train_count:train_count + val_count]
test_files = image_files[train_count + val_count:]

# 移動(dòng)文件到相應(yīng)的目錄
def move_files(files, src_images_path, src_labels_path, dst_images_path, dst_labels_path):
    for file in tqdm(files):
        src_image_file = os.path.join(src_images_path, f"{file}.png")
        src_label_file = os.path.join(src_labels_path, f"{file}.txt")
        dst_image_file = os.path.join(dst_images_path, f"{file}.png")
        dst_label_file = os.path.join(dst_labels_path, f"{file}.txt")

        if os.path.exists(src_image_file) and os.path.exists(src_label_file):
            shutil.move(src_image_file, dst_image_file)
            shutil.move(src_label_file, dst_label_file)

# 移動(dòng)訓(xùn)練集文件
print("移動(dòng)訓(xùn)練集文件...")
move_files(train_files, yolo_images_path, yolo_labels_path, train_images_path, train_labels_path)
# 移動(dòng)驗(yàn)證集文件
print("移動(dòng)驗(yàn)證集文件...")
move_files(val_files, yolo_images_path, yolo_labels_path, val_images_path, val_labels_path)
# 移動(dòng)測(cè)試集文件
print("移動(dòng)測(cè)試集文件...")
move_files(test_files, yolo_images_path, yolo_labels_path, test_images_path, test_labels_path)

print("數(shù)據(jù)集劃分完成!")

# 刪除原始的 images 和 labels 文件夾
shutil.rmtree(yolo_images_path)
shutil.rmtree(yolo_labels_path)

print("原始 images 和 labels 文件夾刪除完成!")

到此這篇關(guān)于Python實(shí)現(xiàn)將VOC格式數(shù)據(jù)集轉(zhuǎn)換為YOLO格式數(shù)據(jù)集的文章就介紹到這了,更多相關(guān)Python VOC格式轉(zhuǎn)YOLO格式內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Python Pandas 刪除列操作

    Python Pandas 刪除列操作

    這篇文章主要介紹了Python Pandas 刪除列操作,主要操作使用del和drop方法刪除DataFrame中的列,使用drop方法一次刪除多列,需要的朋友可以參考一下
    2022-03-03
  • Python GUI教程之在PyQt5中使用數(shù)據(jù)庫(kù)的方法

    Python GUI教程之在PyQt5中使用數(shù)據(jù)庫(kù)的方法

    Qt平臺(tái)對(duì)SQL編程有著良好的支持,PyQt5也一并繼承了過(guò)來(lái),這篇文章主要介紹了Python GUI教程之在PyQt5中使用數(shù)據(jù)庫(kù)的方法,需要的朋友可以參考下
    2021-09-09
  • 詳細(xì)一文帶你分清Python中的模塊、包和庫(kù)

    詳細(xì)一文帶你分清Python中的模塊、包和庫(kù)

    這篇文章主要介紹了詳細(xì)一文帶你分清Python中的模塊、包和庫(kù),Python?模塊(Module),是一個(gè)?Python?文件,以?.py?結(jié)尾,包含了?Python?對(duì)象定義和Python語(yǔ)句,模塊能定義函數(shù),類和變量,模塊也能包含可執(zhí)行的代碼,需要的朋友可以參考下
    2023-08-08
  • Python+Socket實(shí)現(xiàn)基于UDP協(xié)議的局域網(wǎng)廣播功能示例

    Python+Socket實(shí)現(xiàn)基于UDP協(xié)議的局域網(wǎng)廣播功能示例

    這篇文章主要介紹了Python+Socket實(shí)現(xiàn)基于UDP協(xié)議的局域網(wǎng)廣播功能,結(jié)合實(shí)例形式分析了Python+socket實(shí)現(xiàn)UDP協(xié)議廣播的客戶端與服務(wù)器端功能相關(guān)操作技巧,需要的朋友可以參考下
    2017-08-08
  • 一篇文章帶你了解python集合基礎(chǔ)

    一篇文章帶你了解python集合基礎(chǔ)

    今天小編就為大家分享一篇關(guān)于Python中的集合介紹,小編覺得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧
    2021-08-08
  • pandas DataFrame創(chuàng)建方法的方式

    pandas DataFrame創(chuàng)建方法的方式

    這篇文章主要介紹了pandas DataFrame創(chuàng)建方法的方式,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-08-08
  • Python實(shí)現(xiàn)從PPT提取圖片和文本

    Python實(shí)現(xiàn)從PPT提取圖片和文本

    在日常辦公和數(shù)據(jù)處理中,我們經(jīng)常需要從?PowerPoint?演示文稿中提取素材,下面我們就來(lái)看看如何使用?Python?輕松實(shí)現(xiàn)從?PPT?中提取圖片和文本吧
    2026-04-04
  • 使用 Python 實(shí)現(xiàn) RAG從文檔加載到語(yǔ)義檢索全流程

    使用 Python 實(shí)現(xiàn) RAG從文檔加載到語(yǔ)義檢索全流程

    本文帶你從零開始,用Python完整實(shí)現(xiàn)一個(gè)RAG系統(tǒng),涵蓋文檔加載、文本分塊、向量嵌入、語(yǔ)義檢索與生成回答的完整鏈路,感興趣的朋友一起看看吧
    2026-04-04
  • Python繪圖魔法之如何用turtle庫(kù)開啟你的編程藝術(shù)之旅

    Python繪圖魔法之如何用turtle庫(kù)開啟你的編程藝術(shù)之旅

    Python的turtle庫(kù)是一個(gè)直觀有趣的圖形繪制函數(shù)庫(kù),是python的標(biāo)準(zhǔn)庫(kù)之一,這篇文章主要介紹了Python繪圖魔法之如何用turtle庫(kù)開啟你的編程藝術(shù)之旅,文中通過(guò)代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2025-11-11
  • django 發(fā)送郵件和緩存的實(shí)現(xiàn)代碼

    django 發(fā)送郵件和緩存的實(shí)現(xiàn)代碼

    這篇文章主要介紹了django 發(fā)送郵件和緩存的實(shí)現(xiàn)代碼,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2018-07-07

最新評(píng)論

太湖县| 丽江市| 兴安盟| 蓬莱市| 博爱县| 固安县| 璧山县| 贵溪市| 砀山县| 习水县| 阜平县| 南昌县| 天水市| 武隆县| 民和| 西藏| 徐汇区| 马关县| 桃江县| 垦利县| 桂东县| 东安县| 镇安县| 鄂尔多斯市| 永康市| 顺义区| 浮山县| 策勒县| 孝感市| 大丰市| 白城市| 沙雅县| 长兴县| 尖扎县| 华宁县| 固安县| 象州县| 金门县| 甘肃省| 东港市| 枣庄市|