Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- for directory in ['train','test']:
- bilder_pfad = os.path.join(os.getcwd(), 'images/{}'.format(directory))
- for bilder in glob.glob(bilder_pfad + '/*.*'):
- if not bilder.lower().endswith(".xml"):
- bild = cv.imread(bilder)
- datei_type = imghdr.what(bilder)
- if datei_type != 'jpeg':
- cv.imwrite(bilder, bild)
Add Comment
Please, Sign In to add comment