Skip to content

docketrun/arrange-training-images-for-machine-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Quickest way to change random images to Structured Training Set of images for Machine Learning

Here is a tiny little python code which helps to arrange all the random images into ordered set of images for Machine Learning or for any use

Requires

  • PYTHON
  • Necessary Import Modules
from PIL import Image
import glob, os
import itertools
counter = itertools.count()

size = 500, 300

for infile in glob.glob("*.jpg"):
    file, ext = os.path.splitext(infile)
    im = Image.open(infile)
    im.thumbnail(size)
    im.save("image" + str(next(counter)) +".jpg", "JPEG")
	

About

Helps to arrange all the random images into ordered set of images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages