当前位置:网站首页>Deep learning - make your own dataset
Deep learning - make your own dataset
2022-07-07 17:41:00 【AI cannon fodder】
1. background
For folder set subfolders , There are many images of the same category in the subfolder , Subfolders represent the categories of images inside . The file with this structure is called image cascading, which is imageFolder. As shown below :
![]()
Under this folder are 10 Subfolders of categories , as follows :
There are many images under each subfolder , as follows :

2. Start making dataset
"""
There are multiple folders under one folder , Each subfolder is the class alias of the pictures in the subfolder , This kind of appellation image stacking form imageFolder.
"""
import os
from torch.utils.data import Dataset, DataLoader, random_split
import pandas as pd
import numpy as np
dataset_dir = "F:/reshape_images"
# Get the number of subfolders , That is, the number of categories
classes = os.listdir(dataset_dir)
print(classes)
# Define an array to store filename, filepath, label, So the definition of 边栏推荐
- 第2章搭建CRM项目开发环境(数据库设计)
- 目标检测1——YOLO数据标注以及xml转为txt文件脚本实战
- [distributed theory] (I) distributed transactions
- 【TPM2.0原理及应用指南】 12、13、14章
- Several best practices for managing VDI
- 使用popupwindow創建对话框风格的窗口
- swiper左右切换滑块插件
- <代码随想录二刷>链表
- Notification is the notification displayed in the status bar of the phone
- L1-027 出租(Lua)
猜你喜欢
随机推荐
actionBar 导航栏学习
Establishment of solid development environment
麒麟信安携异构融合云金融信创解决方案亮相第十五届湖南地区金融科技交流会
Robot engineering lifelong learning and work plan-2022-
网络攻防复习篇
面试官:页面很卡的原因分析及解决方案?【测试面试题分享】
第1章CRM核心业务介绍
本周小贴士#140:常量:安全习语
2021-06-28
Vscode three configuration files about C language
LeetCode 497(C#)
【解惑】App处于前台,Activity就不会被回收了?
机器视觉(1)——概述
企业经营12法的领悟
datepicket和timepicket,日期、时间选择器的功能和用法
本周小贴士131:特殊成员函数和`= default`
MRS离线数据分析:通过Flink作业处理OBS数据
深度学习-制作自己的数据集
alertDialog創建对话框
【分布式理论】(一)分布式事务









