Skip to content

Instantly share code, notes, and snippets.

f-rumblefish

Block or report user

Report or block f-rumblefish

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@f-rumblefish
f-rumblefish / dataset.csv
Last active Sep 18, 2019
Dataset for Image Outlier Detecion
View dataset.csv
MNIST Fashion-MNIST Comment
Training Dataset 54000 0 data for training the autoencoder
Validation Dataset 6000 0 data for validating the autoencoder and defining the threshold
Test Dataset 500 500 data for testing the solution
@f-rumblefish
f-rumblefish / Performance Summary.csv
Last active Jul 6, 2019
Multi-Input/Multi-Channel Performance
View Performance Summary.csv
Approach Core Network Tail Network File Accuracy
Multi-Input 3 Conv2D/MaxPooling CNN Dense(1024/512/256) 101 65%
Multi-Input MobileNet ... 107
Multi-Channel 3 Conv2D/MaxPolling CNN ... 201 22%
Multi-Channel MobileNet GAP(0124)/Dense(256) 307 100%
Multi-Channel MobileNetV2 GAP(1024)/Dense(256) 308 2-->96%/10-->22%
@f-rumblefish
f-rumblefish / YOLOv3 Checklist.csv
Last active Jun 17, 2019
A Checklist for Training YOLOv3
View YOLOv3 Checklist.csv
0. Source https://github.com/qqwweee/keras-yolo3
1. Training 1.1. create mydata_train.txt ref: train.txt
1.2. create mydata_class.txt ref: model_data/voc_classes.txt
1.3. change train.py to train_mydata.py 1.3.1. annotation_path = 'mydata_train.txt' ref: 1.1
1.3.2. classes_path = 'model_data/mydata_classes.txt' ref: 1.2
1.3.3. create_model with load_pretrained=False optional (if pre-trained weight doesn't work)
1.3.4. model.save('mymodel.h5') save model and weight for prediction
1.3.5. change epochs from 50 to 5 optional (check if it works or not)
1.3.6. change batch_size from 32 to 8 optional (if it has some memory problems)
1.3.7. remove training in the second stage optional (if the firs
View MobileNet_log.txt
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_1 (InputLayer) (None, 224, 224, 3) 0
_________________________________________________________________
conv1_pad (ZeroPadding2D) (None, 225, 225, 3) 0
_________________________________________________________________
conv1 (Conv2D) (None, 112, 112, 32) 864
_________________________________________________________________
conv1_bn (BatchNormalization (None, 112, 112, 32) 128
View Model_InceptionV3.py
from keras.applications.inception_v3 import InceptionV3
from keras.models import Model
from keras.layers import Dense, GlobalAveragePooling2D
# parameters for architecture
input_shape = (224, 224, 3)
num_classes = 6
conv_size = 32
# parameters for training
View Model_SimpleNet.py
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
# parameters for architecture
input_shape = (224, 224, 3)
num_classes = 6
conv_size = 32
# parameters for training
batch_size = 32
View Model_MobileNet.py
from keras.applications.mobilenet import MobileNet
from keras.models import Model
from keras.layers import Dense, GlobalAveragePooling2D
# parameters for architecture
input_shape = (224, 224, 3)
num_classes = 6
conv_size = 32
# parameters for training
View class_90.py
classes_90 = ["background", "person", "bicycle", "car", "motorcycle",
"airplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant",
"unknown", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse",
"sheep", "cow", "elephant", "bear", "zebra", "giraffe", "unknown", "backpack",
"umbrella", "unknown", "unknown", "handbag", "tie", "suitcase", "frisbee", "skis",
"snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard",
"surfboard", "tennis racket", "bottle", "unknown", "wine glass", "cup", "fork", "knife",
"spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog",
"pizza", "donut", "cake", "chair", "couch", "potted plant", "bed", "unknown", "dining table",
"unknown", "unknown", "toilet", "unknown", "tv", "laptop", "mouse", "remote", "keyboard",
View class_80.py
classes_80 = ["person", "bicycle", "car", "motorcycle",
"airplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant",
"stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse",
"sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack",
"umbrella", "handbag", "tie", "suitcase", "frisbee", "skis",
"snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard",
"surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife",
"spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog",
"pizza", "donut", "cake", "chair", "couch", "potted plant", "bed", "dining table",
"toilet", "tv", "laptop", "mouse", "remote", "keyboard",
View yolo_prediction.py
# loop 845 bounding boxes
for i in range(Net_YOLO_pred.shape[0]):
# get the confidence on the object
confidence_on_box = Net_YOLO_pred[i][4]
# find the class index with the highest probability
probability_list = Net_YOLO_pred[i][5:]
class_index = probability_list.argmax(axis=0)
probability_on_class = probability_list[class_index]
# get the score
score = confidence_on_box * probability_on_class
You can’t perform that action at this time.