Never Afraid of Trying something new (Hackathon AI)

Never Afraid of Trying something new (Hackathon AI)

·

2 min read

This is my first time participate Hackathon AI. At first, I was success with preliminary phase, but in the final , I failed so bad. This is because my model was too overfitting and I don't have enough courage to tune up or down the Augmentation Parameters. But I know what is my mistake and recreate that solution.

Dataset Preparation

First of all , I import all the libraries and the datasets.

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import os
from PIL import Images

after that we import the datasets, and since the datasets is have inconsistency in dimension, so I am gonna scale down to 256x256 px \ \

file_list_train = []
new_img = []
for i in range(len(os.listdir(label_6))):
    tmp = os.path.join(label_6,os.listdir(label_6)[i])
    file_list_train.append(tmp)
    tmp = os.path.join(label_6_file,os.listdir(label_6)[i])
    new_img.append(tmp)
for i in range(len(file_list_train)):
    img = Image.open(file_list_train[i])
    img = img.resize((256,256),Image.ANTIALIAS)
    img.save(new_img[i])

Image Augmentation

Here is the big mistakes. Image Augmentation. This is where is a huge mistakes. I don't have a courage to tune up the settings even more.\

Mine

datagen = ImageDataGenerator(
rescale=(1./255),
rotation_range=0.1,
shear_range=1,
zoom_range=0.2
channel_shift_range=0.1,
validation_split=0.25
)

Winner

datagen = ImageDataGenerator(
rescale=(1./255),
rotation_range=30,
shear_range=1,
zoom_range=[0.8,1]
channel_shift_range=1,
validation_split=0.25
)

Deep Neural Network

The deep neural network was pretty much the same, nothing really changed. But overall , it's just pretty the same, so no comment in here.

Conclusion

Image Augmentation is the key when doing something. I learn so much when doing this AI. But doesn't mean losing to Hackathon, means I don't bring home anything. The thing that I bring to home is knowledge. Since the competition is Free (except the food that I paid for myself), I don't lose anything. Is it worth it to do AI Competition for the first time? Definitely Yes. I will look forward into the next AI Competition.