-
Notifications
You must be signed in to change notification settings - Fork 0
/
104 Lab 7 READ ME Henry Lo 015500160.txt
66 lines (47 loc) · 2.3 KB
/
104 Lab 7 READ ME Henry Lo 015500160.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Name: Henry Lo, Pin Yi Yeh
Class: EE 104
Video Link: https://youtu.be/adihpyeT9e8
GitHub Link: https://github.com/henry91513/104-Lab-7-
# CNN Model Creation
Through this section, we are required to create a model for CNN and maximize its accuracy to
identify the images and categorize them into different classifications. Through the training, we will
increase the numbers of the echo which states for the training times, the accuracy will generally
increase with a higher echo value. However, even with high echo values, the ultimate accuracy will
remain to fluctuate at a small rate according to the user's training model. Users are free to modify
the code for their own preference to adjust for the highest accuracy CNN model
# CNN Challenge Test
By initiating the code through the Google collab we are able to initiate the model we once
trained online and start identifying the images. The images are required to be inserted into the HTTP
input and by plotting the images we are able to see the outcome of the identification of the code made
and the real images.
# Balloon Game Development
By initiating the game, the user only has to locate the Game py file into the spider
program of the python program and generate the start button. The balloon will first appear in the screen
with multiple obstacles if the balloon encounter the obstacles the life of the balloon will decrease
if the balloon touches the ground the game will terminate.
*** These are the python modules that should be installed ***
#CNN
import tensorflow as tf
from tensorflow.keras import datasets, layers, models
import matplotlib.pyplot as plt
import sys
from matplotlib import pyplot
from keras.datasets import cifar10
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import Dense
from keras.layers import Flatten
from keras.optimizers import SGD
from keras.preprocessing.image import ImageDataGenerator
from keras.layers import Dropout
from keras.layers import BatchNormalization
from keras.regularizers import l2
#Balloon Game
import pgzrun
import pygame
import pgzero
import random
from pgzero.builtins import Actor
from random import randint