-
-
Save aialenti/5b879f2000eabfde70302dc51622429c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modules used by the function | |
#import numpy as np | |
#from src.commons import utils | |
#from constants import | |
# Stack images | |
pixel_matrix = None | |
fitted_model = None | |
for idx, row in data.iterrows(): | |
# Load the image using OpenCV and converting from BGR to RGB | |
img = utils.load_image('{}/{}.jpg'.format(IMAGE_RESHAPED_FOLDER, row.title)) | |
reshaped = img.reshape((-1, 3)) | |
if pixel_matrix is None: | |
pixel_matrix = reshaped | |
else: | |
pixel_matrix = np.concatenate((pixel_matrix, reshaped)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment