Skip to content
Snippets Groups Projects
Commit 5901d98f authored by pjm363 (Philip Monaco)'s avatar pjm363 (Philip Monaco)
Browse files

Resolve "Create a parsing for the training and test input sets."

parent f23488f7
Branches
No related tags found
1 merge request!1Resolve "Create a parsing for the training and test input sets."
# HVM Image Clf
# Introduction
# Prerequisites for Use
1. Download the training data [Here](https://isic-challenge-data.s3.amazonaws.com/2018/ISIC2018_Task3_Training_Input.zip)
2. Download the training ground truth [Here](https://isic-challenge-data.s3.amazonaws.com/2018/ISIC2018_Task3_Training_GroundTruth.zip)
3. Download the test data images [Here](https://isic-challenge-data.s3.amazonaws.com/2018/ISIC2018_Task3_Validation_Input.zip)
4. Download the test data ground truth [Here](https://isic-challenge-data.s3.amazonaws.com/2018/ISIC2018_Task3_Validation_GroundTruth.zip)
5. Unzip the files into the data folder in this repository.
\ No newline at end of file
import os
import cv2 #vision task package opencv-python
import pandas as pd
import glob
import numpy as np
def load_transform_images(folder):
"""[summary]
Args:
filename ([type]): [description]
"""
images = [cv2.imread(file, flags=cv2.IMREAD_GRAYSCALE) for file in glob.glob("./data/"+ folder+"/*.jpg")]
return images
def transform(data):
flat = []
df = pd.DataFrame()
for i,img in enumerate(data):
scale = (img.astype(np.float32) - 127.5)/127.5
scale = scale.reshape(1,-1)
df = df.append(pd.Series(scale[0]), ignore_index=True)
return df
# def batch_data(data):
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment