当前位置:网站首页>Data set preparation and arrangement
Data set preparation and arrangement
2022-06-30 03:01:00 【Master Hao】
coding: utf-8
In[3]:
import os
# For copying files
import shutil
Create a new folder to store the sorted pictures
for i in range(17):
# 17 Categories NEW 17 A folder 0-16
os.mkdir(‘D:/17flowers’+’/’+‘flower’+str(i))
Cycle through the pictures of all the flowers
#os.listdir() Method to return a list of the names of the files or folders contained in the specified folder .
for i,path in enumerate(os.listdir(‘D:/17flowers/jpg/’)):
# Define the full path of the flower picture
image_path = ‘D:/17flowers/jpg/’ + path
# Copy to the corresponding category , Each category 80 A picture
#copyfile(src, dst): take src Copy the contents of the file to dst file
shutil.copyfile(image_path, ‘D:/17flowers’+’/’+‘flower’+str(i//80)+’/’+path)
边栏推荐
猜你喜欢

Visual HTA form designer htamaker interface introduction and usage, Download | HTA VBS visual script writing

Summary of PHP test sites encountered in CTF questions (I)

中断操作:AbortController学习笔记

Distributed file system fastdfs

Interrupt operation: abortcontroller learning notes

Unity timeline data binding

Raki's notes on reading paper: neighborhood matching network for entity alignment

O & M (21) make winpe startup USB flash disk

简单自定义mvc

oracle怎么设置密码复杂度及超时退出的功能
随机推荐
002 color classification
CMake教程系列-03-依赖管理
JMeter obtains cookies across thread groups or JMeter thread groups share cookies
HTA入门基础教程 | VBS脚本的GUI界面 HTA简明教程 ,附带完整历程及界面美化
Raki's notes on reading paper: Leveraging type descriptions for zero shot named entity recognition and classification
迅為恩智浦iTOP-IMX6開發平臺
What is the metauniverse: where are we, where are we going
【实战技能】如何撰写敏捷开发文档
Welfare lottery | what are the highlights of open source enterprise monitoring zabbix6.0
Recursion frog jumping steps problem
How to switch ipykernel to a different CONDA virtual environment in jupyterlab?
OP-diode-限制摆幅
Call collections Sort() method, compare two person objects (by age ratio first, and by name ratio for the same age), and pass lambda expression as a parameter.
threejs 镜子案例Reflector 创建镜子+房子搭建+小球移动
CMake教程系列-01-最小配置示例
mysql 主从数据库同步失败的原因
Intel hex, Motorola S-Record format detailed analysis
What are the three paradigms of database
The rigorous judgment of ID number is accurate to the last place in the team
Simulate activity startup mode in compose