This repository has been archived by the owner on Jun 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add all notebook and image from desktop
- Loading branch information
1 parent
efed1be
commit b0a1840
Showing
47 changed files
with
12,567 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# Folders | ||
bin | ||
data | ||
models | ||
|
||
# Files | ||
nohup.out | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
1,304 changes: 1,304 additions & 0 deletions
1,304
Image Classification using MobileNet - 02. MNIST.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,185 changes: 1,185 additions & 0 deletions
1,185
Image Classification using MobileNet - 03. Fashion MNIST.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,388 changes: 1,388 additions & 0 deletions
1,388
Image Classification using MobileNet - 04. CIFAR10.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,597 changes: 1,597 additions & 0 deletions
1,597
Image Classification using MobileNet - 05. Cat and Dog.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,493 changes: 1,493 additions & 0 deletions
1,493
Image Classification using MobileNet - 06. CIFAR100.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,479 changes: 1,479 additions & 0 deletions
1,479
Image Classification using MobileNet - 07. Intel Scene Image.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,946 changes: 1,946 additions & 0 deletions
1,946
Image Classification using MobileNet - 08. VOC2012.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
799 changes: 799 additions & 0 deletions
799
Image Classification using MobileNet - 09. Personal Label.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
385 changes: 385 additions & 0 deletions
385
Image Classification using MobileNet - 10. Covert to Caffe.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import os | ||
import sys | ||
import warnings | ||
|
||
warnings.filterwarnings('ignore') | ||
|
||
import cv2 | ||
import pickle | ||
import numpy as np | ||
from tensorflow.keras.models import load_model | ||
|
||
TEXT_LOC = (30,30) | ||
FONT_SIZE = 0.8 | ||
|
||
THESHOLD = 0.3 | ||
|
||
capture = cv2.VideoCapture(0) | ||
capture.set(cv2.CAP_PROP_FRAME_WIDTH,640) | ||
capture.set(cv2.CAP_PROP_FRAME_HEIGHT,480) | ||
|
||
model = load_model('./bin/mobilenetv2_class20.h5') | ||
|
||
with open('./bin/class20.pickle','rb') as f: | ||
class20 = pickle.load(f) | ||
|
||
(major_ver,minor_ver,subminor_ver) = cv2.__version__.split('.') | ||
|
||
while True: | ||
ret, frame = capture.read() | ||
|
||
if int(major_ver) < 3: | ||
fps = capture.get(cv2.cv.CV_CAP_PROP_FPS) | ||
else: | ||
fps = capture.get(cv2.CAP_PROP_FPS) | ||
|
||
|
||
|
||
img = cv2.resize(frame,(224,224),fx=0.5,fy=0.5,interpolation=cv2.INTER_AREA) | ||
img = cv2.cvtColor(img,cv2.COLOR_BGR2RGB) | ||
img = img / 255 | ||
|
||
expanded_img = np.expand_dims(img,axis=0) | ||
|
||
pred = model.predict(expanded_img) | ||
|
||
_cls = class20[np.argmax(pred)] | ||
_prob = np.max(pred) | ||
|
||
font_color = (0,0,0) | ||
label = 'Prediction : ...' | ||
|
||
if _prob > THESHOLD: | ||
|
||
font_color = (0,0,255) | ||
label = 'Prediction : {} ({:.2f}%)'.format(_cls.upper(),_prob * 100) | ||
|
||
cv2.putText(frame,label,TEXT_LOC,cv2.FONT_HERSHEY_SIMPLEX,FONT_SIZE,font_color,2) | ||
cv2.putText(frame,'{} FRAMES'.format(fps),(450,30),cv2.FONT_HERSHEY_SIMPLEX,FONT_SIZE,(0,0,0),2) | ||
|
||
cv2.imshow('test',frame) | ||
|
||
if cv2.waitKey(1) == ord('q'): | ||
break | ||
|
||
capture.release() | ||
cv2.destroyAllWindows() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
absl-py==0.8.0 | ||
astor==0.8.0 | ||
attrs==19.2.0 | ||
autopep8==1.4.4 | ||
backcall==0.1.0 | ||
bleach==3.1.0 | ||
certifi==2019.9.11 | ||
cycler==0.10.0 | ||
decorator==4.4.0 | ||
defusedxml==0.6.0 | ||
entrypoints==0.3 | ||
freeze==1.0.10 | ||
gast==0.3.2 | ||
google-images-download==2.8.0 | ||
google-pasta==0.1.7 | ||
graphviz==0.13 | ||
grpcio==1.16.1 | ||
h5py==2.10.0 | ||
imutils==0.5.3 | ||
ipykernel==5.1.2 | ||
ipython==7.8.0 | ||
ipython-genutils==0.2.0 | ||
jedi==0.15.1 | ||
Jinja2==2.10.3 | ||
joblib==0.14.0 | ||
jsonschema==3.0.2 | ||
jupyter-client==5.3.4 | ||
jupyter-contrib-core==0.3.3 | ||
jupyter-contrib-nbextensions==0.5.1 | ||
jupyter-core==4.6.0 | ||
jupyter-highlight-selected-word==0.2.0 | ||
jupyter-latex-envs==1.4.4 | ||
jupyter-nbextensions-configurator==0.4.1 | ||
Keras==2.2.4 | ||
Keras-Applications==1.0.8 | ||
Keras-Preprocessing==1.1.0 | ||
kiwisolver==1.1.0 | ||
lxml==4.4.1 | ||
Markdown==3.1.1 | ||
MarkupSafe==1.1.1 | ||
matplotlib==3.1.1 | ||
mistune==0.8.4 | ||
mkl-fft==1.0.14 | ||
mkl-random==1.1.0 | ||
mkl-service==2.3.0 | ||
nb-conda==2.2.1 | ||
nb-conda-kernels==2.2.2 | ||
nbconvert==5.6.0 | ||
nbformat==4.4.0 | ||
notebook==6.0.1 | ||
numpy==1.17.2 | ||
olefile==0.46 | ||
pandas==0.25.1 | ||
pandocfilters==1.4.2 | ||
parso==0.5.1 | ||
pexpect==4.7.0 | ||
pickleshare==0.7.5 | ||
Pillow==6.2.0 | ||
prometheus-client==0.7.1 | ||
prompt-toolkit==2.0.10 | ||
protobuf==3.10.0 | ||
ptyprocess==0.6.0 | ||
pycodestyle==2.5.0 | ||
pydot==1.4.1 | ||
Pygments==2.4.2 | ||
pyparsing==2.4.2 | ||
pyrsistent==0.15.4 | ||
python-dateutil==2.8.0 | ||
pytube==9.5.2 | ||
pytz==2019.3 | ||
PyYAML==5.1.2 | ||
pyzmq==18.1.0 | ||
scikit-learn==0.21.3 | ||
scipy==1.3.1 | ||
seaborn==0.9.0 | ||
selenium==3.141.0 | ||
Send2Trash==1.5.0 | ||
six==1.12.0 | ||
tensorboard==1.14.0 | ||
tensorflow==1.14.0 | ||
tensorflow-estimator==1.14.0 | ||
termcolor==1.1.0 | ||
terminado==0.8.2 | ||
testpath==0.4.2 | ||
tornado==6.0.3 | ||
tqdm==4.36.1 | ||
traitlets==4.3.3 | ||
urllib3==1.25.6 | ||
wcwidth==0.1.7 | ||
webencodings==0.5.1 | ||
Werkzeug==0.16.0 | ||
wrapt==1.11.2 | ||
youtube-dl==2019.10.16 |