• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    Jupyter Notebook
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

image classification with CIFAR10 dataset w/ Tensorflow

Image Classification with CIFAR-10 dataset

In this notebook, I am going to classify images from the CIFAR-10 dataset. The dataset consists of airplanes, dogs, cats, and other objects. You'll preprocess the images, then train a convolutional neural network on all the samples. The images need to be normalized and the labels need to be one-hot encoded. Some more interesting datasets can be found here

Some of the code and description of this notebook is borrowed by this repo provided by Udacity's Deep Learning Nanodegree program. This notebook has been reproduced decorated with richer descriptions after completing the Udacity's project.

Contents

1. Get the Data
2. Understanding the dataset
3. Hands-on experience implementing normalize and one-hot encoding function
4. Tensorflow Basics
5. Model Architecture and construction (Using different types of APIs (tf.nn, tf.layers, tf.contrib))
6. Training the model (how to feed and evaluate Tensorflow graph?)
7. Prediction

please open up the jupyter notebook to see the full descriptions

2. Understanding the dataset

The original a batch data is (10000 x 3072) dimensional tensor expressed in numpy array, where the number of columns, (10000), indicates the number of sample data. As stated in the CIFAR-10/CIFAR-100 dataset, the row vector, (3072) represents an color image of 32x32 pixels.

Since this project is going to use CNN for the classification tasks, the row vector, (3072), is not an appropriate form of image data to feed. In order to feed an image data into a CNN model, the dimension of the tensor representing an image data should be either (width x height x num_channel) or (num_channel x width x height).

It depends on your choice (check out the tensorflow conv2d). In this particular project, I am going to use the dimension of the first choice because the default choice in tensorflow's CNN operation is so.

The row vector (3072) has the exact same number of elements if you calculate 32*32*3==3072. In order to reshape the row vector, (3072), there are two steps required. The first step is involved with using reshape function in numpy, and the second step is involved with using transpose function in numpy as well.

Drawing

5. Model Architecture

Drawing

The entire model consists of 14 layers in total. In addition to layers below lists what techniques are applied to build the model.

  1. Convolution with 64 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Convolution with 128 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Convolution with 256 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Convolution with 512 different filters in size of (3x3)
  2. Max Pooling by 2
  • ReLU activation function
  • Batch Normalization
  1. Flattening the 3-D output of the last convolutional operations.
  2. Fully Connected Layer with 128 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 256 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 512 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 1024 units
  • Dropout
  • Batch Normalization
  1. Fully Connected Layer with 10 units (number of image classes)

the image below decribes how the conceptual convolving operation differs from the tensorflow implementation when you use [Channel x Width x Height] tensor format.

Drawing

6. Training the model

achieving over 75% accuracy in 10 epochs through 5 batches.

Drawing

7. Prediction

Drawing

More Repositories

1

LLM-As-Chatbot

LLM as a Chatbot Service
Python
3,273
star
2

Machine-Learning-Yearning-Korean-Translation

Korean translation of machine learning yearning book by Andrew Ng.
360
star
3

llamaduo

This project showcases an LLMOps pipeline that fine-tunes a small-size LLM model to prepare for the outage of the service LLM.
Jupyter Notebook
231
star
4

ml-deployment-k8s-tfserving

This project shows how to serve an TF based image classification model as a web service with TFServing, Docker, and Kubernetes(GKE).
Jupyter Notebook
120
star
5

mlops-hf-tf-vision-models

MLOps for Vision Models (TensorFlow) from πŸ€— Transformers with TensorFlow Extended (TFX)
Jupyter Notebook
115
star
6

Soccer-Ball-Detection-YOLOv2

YOLOv2 trained against custom dataset
Jupyter Notebook
111
star
7

keras-sd-serving

showing various ways to serve Keras based stable diffusion
Jupyter Notebook
110
star
8

EN-FR-MLT-tensorflow

English-French Machine Language Translation in Tensorflow
HTML
108
star
9

hf-daily-paper-newsletter

Newsletter bot for πŸ€— Daily Papers
HTML
100
star
10

fb-group-post-fetcher

HTML
91
star
11

semantic-segmentation-ml-pipeline

Machine Learning Pipeline for Semantic Segmentation with TensorFlow Extended (TFX) and various GCP products
Jupyter Notebook
91
star
12

PingPong

manage histories of LLM applied applications
Python
86
star
13

gradio-chat

HuggingChat like UI in Gradio
Python
63
star
14

fastai-course-korean

korean translation + more examples for fastai course contents
Jupyter Notebook
50
star
15

image_search_with_natural_language

Application for searching images from natural language queries
Jupyter Notebook
45
star
16

Vid2Persona

This project breathes life into video characters by using AI to describe their personality and then chat with you as them.
Jupyter Notebook
44
star
17

DeepModels

TensorFlow Implementation of state-of-the-art models since 2012
Python
38
star
18

LLM-Pref-Mark-UI

Python
37
star
19

AlexNet

AlexNet model from ILSVRC 2012
Jupyter Notebook
35
star
20

auto-paper-analysis

Jupyter Notebook
35
star
21

gpt2-ft-pipeline

GPT2 fine-tuning pipeline with KerasNLP, TensorFlow, and TensorFlow Extended
Jupyter Notebook
33
star
22

segformer-tf-transformers

This repository demonstrates how to use TensorFlow based SegFormer model in πŸ€— transformers package.
Jupyter Notebook
31
star
23

LoRA-deployment

LoRA fine-tuned Stable Diffusion Deployment
Jupyter Notebook
31
star
24

CIFAR10-VGG19-Tensorflow

Jupyter Notebook
29
star
25

Continuous-Adaptation-for-Machine-Learning-System-to-Data-Changes

https://blog.tensorflow.org/2021/12/continuous-adaptation-for-machine.html
Jupyter Notebook
28
star
26

Model-Training-as-a-CI-CD-System

Demonstration of the Model Training as a CI/CD System in Vertex AI
Python
27
star
27

Object-Detection-YOLOv2-Darkflow

Jupyter Notebook
25
star
28

practical-time-series-analysis-korean

Jupyter Notebook
24
star
29

Continuous-Adaptation-with-VertexAI-AutoML-Pipeline

Jupyter Notebook
22
star
30

janus

generate synthetic data for LLM fine-tuning in arbitrary situations within systematic way
Jupyter Notebook
21
star
31

LLM-Serve

This repository provides a framework to serve LLM(Large Language Model) based applications such as Chatbot.
Python
17
star
32

complete-mlops-system-workflow

Jupyter Notebook
17
star
33

TFX-WandB

Jupyter Notebook
14
star
34

deep-diver

HTML
13
star
35

paperqa-ui

Python
13
star
36

LLM-Pool

Python
10
star
37

hllama

hllama is a library which aims to provide a set of utility tools for large language models.
Python
10
star
38

textual-inversion-pipeline

Python
9
star
39

LLMs-Colab

Python
9
star
40

personal_newsletter_curation

HTML
5
star
41

promptengineer

5
star
42

genai-apis

Python
5
star
43

portfolio_template

Java
5
star
44

never-leaving-vscode

5
star
45

VGG

VGG models from ILSVRC 2014
Python
4
star
46

pocket-ml-reference-korean

μ£Όλ¨Έλ‹ˆμ† λ¨Έμ‹ λŸ¬λ‹
Jupyter Notebook
4
star
47

fastai-course

CSS
3
star
48

hf-hub-utils

3
star
49

object-detection-test

object-detection-test
Jupyter Notebook
3
star
50

deploy-stable-diffusion-tfserving

This repo explores and demonstrates how to deploy stable diffusion model with TF Serving
3
star
51

llamaduo-spinoff

Jupyter Notebook
3
star
52

Sampling-Distribution-on-Poker-Cards-

2
star
53

Data-Wrangling-on-OpenStreeMap

Jupyter Notebook
2
star
54

llama-keras

Jupyter Notebook
2
star
55

book-tracking-react

Book tracking web-app project in React. This project is one of the requirements to graduate from 'Front End Web Development Nanodegree' @Udacity.
JavaScript
2
star
56

Baseball_Data_Analysis

Exploratory Data Visualization Project on Baseball Data in Tableau
2
star
57

Responsive-Portfolio

HTML
2
star
58

Data-Analysis-on-RedWine

HTML
2
star
59

read-paper-list

archive of read paper list
2
star
60

SD-TFTRT

Jupyter Notebook
2
star
61

rnn_simple

Python
2
star
62

Data-Analysis-on-Titanic

applying data analysis on titanic data sheet
Jupyter Notebook
2
star
63

neighborhood-map-react

neighborhood-map-react
JavaScript
2
star
64

ml-fn-impls

practice implementing functions appearing in machine learning field
Python
2
star
65

Logistic-Regression

simple neural network without hidden layer
Python
2
star
66

Enron-Data-Analysis

Data Analysis and Machine Learning on Enron Data
HTML
2
star
67

Linear-Regression

implement simple version of "Linear Regression" using only Numpy
Jupyter Notebook
2
star
68

tfx-gpu-docker

Dockerfile
1
star
69

YOLO-Impl-Tensorflow

Implementation of YOLO in Tensorflow
Python
1
star
70

calculator

1
star
71

deeplearningbook-korean-translation

experiments on translation of the book deeplearningbook
Jupyter Notebook
1
star
72

paper-code-match

matching between paper and its codes in side-by-side layout
HTML
1
star
73

deeplearning-with-structured-data

Jupyter Notebook
1
star
74

KaggleNotebook-Notes

Personal notes on some kaggle notebooks publicly available
1
star
75

gitmlops-test1

HTML
1
star
76

Python-Machine-Learning-Book-Practice

Python Machine Learning μ±…μ˜ μ†ŒμŠ€μ½”λ“œλ₯Ό μ£Όν”Όν„° λ…ΈνŠΈλΆμ΄ μ•„λ‹Œ, μ†ŒμŠ€μ½”λ“œ ν˜•νƒœλ‘œ μž‘μ„± μ—°μŠ΅
Python
1
star
77

test_img_clf

HTML
1
star
78

dstack-exp

Python
1
star
79

recall-mate

Python
1
star