Skip to content

Instantly share code, notes, and snippets.

View Adeyinka-hub's full-sized avatar
💭
Transformers

Adeyinka Michael Sotunde Adeyinka-hub

💭
Transformers
View GitHub Profile
@Adeyinka-hub
Adeyinka-hub / convert_to_numpy.py
Created June 19, 2022 14:25 — forked from anilsathyan7/convert_to_numpy.py
Convert all images in a directory to ".npy" format
from PIL import Image
import os, sys
import cv2
import numpy as np
'''
Converts all images in a directory to '.npy' format.
Use np.save and np.load to save and load the images.
Use it for training your neural networks in ML/DL projects.
'''
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.