Register Login
PYROBOCITYPYROBOCITY
  • About Us
  • Courses
  • Blog
  • Shop
  • Cart
  • FAQs
  • Contact
  • About Us
  • Courses
  • Blog
  • Shop
  • Cart
  • FAQs
  • Contact

Si Thu Phyo

  • Home
  • Author Si Thu Phyo
Showing 31-40 of 40 results
Predict Hand Written Digits
Si Thu Phyo

Predict Hand Written Digits

  • Posted by Si Thu Phyo
  • Categories Hand Written Recognition, Practical Projects
  • Comments 0 comment
July 27, 2018
0

က်ြန္ေတာ္တုိ့ ဒီေန့ေတာ့ လက္ေရးနဲ့ ေရးထားတဲ့ Number ေတြကုိ train ျပီးသြားျပီ ျဖစ္လုိ့ ခန့္မွန္းၾကည့္ရမယ့္ အဆင့္ျဖစ္ပါတယ္။က်ြန္ေတာ္တုိ့ မစခင္ Training Mnist Dataset To Recognize Hand Written Numbers က code file ကုိ Download ဆြဲျပီး zip ျဖည္လုိက္ပါ။ ေအာက္ပါအတုိင္း ေတြ့ရမွာပါ- hand_written_recognition_training dataset images test.jpg output pyrobocity train.py က်ြန္ေတာ္တုိ့ zip ျဖည္ျပီးသြားရင္ေတာ့ code စေရးၾကတာေပါ့။

test.py
Python
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
from sklearn.externals import joblib
from pyrobocity.descriptor import HOG
from pyrobocity.preprocessing import Deskew
from pyrobocity.preprocessing import CenterExtent
import numpy as np
import imutils
import mahotas
import argparse
import cv2
 
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required = True,
help = "path to the image file")
ap.add_argument("-m", "--model", required = True,
help = "path to where the model")
args = vars(ap.parse_args())
 
model = joblib.load(args["model"])
 
hog = HOG(orientations = 18, pixelsPerCell = (10, 10),
cellsPerBlock = (1, 1), transform = True)
deskew = Deskew(20)
center_extent = CenterExtent((20,20))
preprocessors = [deskew,center_extent]
 
 
image = cv2.imread(args["image"])
image = imutils.resize(image,width=500)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blurred = cv2.GaussianBlur(gray, (5, 5), 0)
edged = cv2.Canny(blurred, 30, 150)
(_, cnts, _) = cv2.findContours(edged.copy(), cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)
 
cnts = sorted([(c, cv2.boundingRect(c)[0]) for c in cnts], key = lambda x: x[1])
 
 
for (c,_) in cnts:
(x,y,w,h) = cv2.boundingRect(c)
 
roi = gray[y:y+h,x:x+w]
thresh = roi.copy()
# (T,thresh) = cv2.threshold(thresh,150,255,cv2.THRESH_BINARY_INV)
T = mahotas.thresholding.otsu(roi)
thresh[thresh > T] = 255
thresh = cv2.bitwise_not(thresh)
for preprocessor in preprocessors:
thresh = preprocessor.preprocess(thresh)
hist = hog.describe(thresh)
hist = hist.reshape(1,-1)
digit = model.predict(hist)[0]
 
cv2.rectangle(image,(x,y),(x+w,y+h),(0,0,255),1)
cv2.putText(image,str(digit),(x-8,y-8),cv2.FONT_HERSHEY_SIMPLEX,1,(0,0,255),2)
cv2.imshow("image",image)
cv2.waitKey(0)
cv2.imwrite("output.png",image)

က်ြန္ေတာ္တုိ့ line 1 ကေန 9 ထိ …

Read More
Downloading All Images From Web Page
Si Thu Phyo

Downloading All Images From Web Page

  • Posted by Si Thu Phyo
  • Categories Web Scraping
  • Comments 0 comment
July 20, 2018
0

ဒီေန့ က်ြန္ေတာ္ webpage တစ္ခုက image ေတြ အကုန္ကုိ python သုံးျပီး ဘယ္လုိ download ဆြဲရမလဲကုိ ျပေပးမွာပါ။Web Scraping or Crawling က်ြန္ေတာ္တုိ့က website တစ္ခုက data ေတြလုိခ်င္တယ္ ဒါေပမဲ့ အဲ့website က API မခ်ေပးထားဘူး။အဲ့က်ရင္ က်ြန္ေတာ္တုိ့လုိခ်င္တဲ့ data ကုိ web crawler ေတြသုံးျပီး ရယူၾကပါတယ္။ဥပမာအားျဖင့္ Facebook ေပါ္ website link  တစ္ခု share လုိက္ၾကည့္ facebook bot ကခ်က္ခ်င္း အဲ့website ကုိသြားျပီး …

Read More
Setting Up Django for Hand Written Digits Recognition Project
Si Thu Phyo

Setting Up Django for Hand Written Digits Recognition Project

  • Posted by Si Thu Phyo
  • Categories Hand Written Recognition, Practical Projects, Web Development
  • Comments 0 comment
July 6, 2018
0

ဒီေန့ Django ဆုိတဲ့ Python Web Framework ကုိ ဘယ္လုိ setup လုပ္ရမယ္ကုိျပသြားမွာပါ။ Python web framework ေတြကုိ စေလ့လာတဲ့ သူေတြအေနနဲ့ Django or Flask ဆုိတဲ့ ျပသနာကုိ အျမဲတမ္းၾကဳံေနရမွာပါ။က်ြန္ေတာ္ဘာကုိ choose လုပ္သင့္တယ္ထက္ ဒီ tutorial မွာ ဘယ္လုိ setup လုပ္ရမယ္ကုိျပမွာပါ။အဲ့တာ မေျပာခင္ Django နဲ့ Flask က ဘာကြာလဲဆုိ Flask က micro projectေတြမွာ ျပီးေတာ့ ပုိျပီး ကုိ့code ကုိ …

Read More
Setting Up Python Environment For Hand Written Digits Recognition Project
Si Thu Phyo

Setting Up Python Environment For Hand Written Digits Recognition Project

  • Posted by Si Thu Phyo
  • Categories Computer Vision, Hand Written Recognition, Practical Projects
  • Comments 0 comment
July 1, 2018
0

က်ြန္ေတာ္ဒီပုိ့စ္ေလးကုိ ေရးျဖစ္တာကေတာ့ Training Mnist Dataset To Recognize Hand Written Numbers Tutorial တုန္းက လုိက္လုပ္ဖုိ့အဆင္မေျပတာေလးေတြ ေတြ့ရတယ္။Install လုပ္ဖုိ့ အဆင္မေျပတာေလးေတြေပါ့ေနာ္။က်ြန္ေတာ္ဒီပုိ့စ္မွာေတာ့ Ubuntu ေပါ္မွာ က်ြန္ေတာ္ဘယ္လုိ Setup လုပ္ရမယ္ကုိ ျပသြားမွာပါ။ #Step 1

1
2
$ sudo apt-get update
$ sudo apt-get upgrade

က်ြန္ေတာ္တုိ့ ျပီးက်ရင္ေတာ့ Python Environment ကုိ setup လုပ္ၾကရေအာင္။ #Step 2:Setup python environment

1
2
3
$ cd ~
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py

က်ြန္ေတာ္တုိ့ ေနာက္တစ္ဆင့္ကေတာ့ virtual environment ကုိေဆာက္ဖုိ့ပါ ဘာလုိ့ဆုိေတာ့ က်ြန္ေတာ္တုိ့ Python Projectေတြကုိ …

Read More
Training Mnist Dataset To Recognize Hand Written Numbers
Si Thu Phyo

Training Mnist Dataset To Recognize Hand Written Numbers

  • Posted by Si Thu Phyo
  • Categories Hand Written Recognition, Practical Projects
  • Comments 0 comment
June 25, 2018
0

က်ြန္ေတာ္တို့ လက္နဲ့ေရးထားတဲ့ Numbers ေတြကုိ ကြန္ပ်ဴတာ ကနားလည္ဖုိ့ဆုိ machine learning ဒါမွမဟုတ္ deep learning ကုိ သုံးမွအဆင္ေျပပါမယ္။က်ြန္ေတာ္တုိ့ ဒီprojectမွာေတာ့ deep learning မသုံးပါဘူး။Machine learning algorithm ကုိပဲသုံးသြားမွာပါ။Deeplearning သုံးခ်င္တယ္စမ္းခ်င္တယ္ဆုိရင္ေတာ့ LeNet ေလာက္နဲ့ အဆင္ေျပပါတယ္။ က်ြန္ေတာ္တုိ့ မစခင္မွာ ဒီprojectအတြက္ ဘာေတြ install လုပ္ဖုိ့လုိအပ္လဲကုိ ေျပာပါမယ္။ Requirements: Python3 Opencv numpy scikit-image scikit-learn mahotas imutils အေပါ္ကလုိအပ္ခ်က္ေတြထဲမွာ အလြယ္တကူ install လုပ္မရတာဆုိလုိ့ …

Read More
HTML5 canvas for number drawing
Si Thu Phyo

HTML5 canvas for number drawing

  • Posted by Si Thu Phyo
  • Categories Hand Written Recognition, Practical Projects
  • Comments 0 comment
June 22, 2018
0

က်ြန္ေတာ္တုိ့ ဒီေန့ Hand Written Number Recognition Project ရဲ့ Part 1ျဖစ္တဲ့ HTML5 canvas for number drawing ကုိ စတင္ေလ့လာၾကည့္ရေအာင္။ပထမဦးဆုံး က်ြန္ေတာ္တုိ့ drawing form တစ္ခုကုိ html5 ရဲ့ canvas ကုိအသုံးျပဳျပီး တည္ေဆာက္ရမွာပါ။ ဒီForm ကုိတည္ေဆာက္တဲ့ေနရာမွာ က်ြန္ေတာ္ Paperjs ကုိ ယူသုံးျပီး တည္ေဆာက္သြားမွာပါ။မစခင္မွာ က်ြန္ေတာ္ Email subscribe လုပ္ဖုိ့ ေတာင္းဆုိခ်င္ပါတယ္။မိတ္ေဆြတုိ့ Subscribe လုပ္ထားရင္ ေနာက္ပုိင္းက်ြန္ေတာ္တုိ့ တင္သမ်ွကုိ inbox ထဲ ပုိ့ေပးလုိ့ရမွာပါ။ …

Read More
Introduction of Hand Written Number Recognition Project
Si Thu Phyo

Introduction of Hand Written Number Recognition Project

  • Posted by Si Thu Phyo
  • Categories Hand Written Recognition, Practical Projects
  • Comments 0 comment
June 20, 2018
0

က်ြန္ေတာ္ Japan နုိင္ငံကုိ အလည္သြားတုန္းက GMO Internet Company ကုိ သြားေရာက္ေလ့လာျဖစ္တယ္။အဲ့တုန္းက က်ြန္ေတာ့္ကုိ Booking number ျဖည့္ခို္င္းေတာ့ ဒီ Tutorial ထဲကလုိ numberေတြကုိ ေရးထည့္လုိက္တာနဲ့ recognize လုပ္ျပီး database ထဲသြားရွာတဲ့ ပုံစံမ်ုိးေတြ့ရေတာ့ အရမ္းၾကီး မခက္ခဲေပမယ့္ ဒါမ်ုိးပုံစံမ်ိုး program ေရးခ်င္တဲ့ ေက်ာင္းသားေတြ အဆင္ေျပေအာင္ ဒီ Tutorial ေလးေရးျဖစ္သြားတာပါ။ Hand Written Number Recognition ဆုိတဲ့ Practical Projectမွာ …

Read More
  • <
  • 1
  • …
  • 3
  • 4

Practical Python For Beginners

မိိတ္ေဆြတုိ့ python programming ကုိလြယ္လြယ္ကူကူနဲ့လက္ေတြ့က်က် အျမန္ဆုံးတတ္ခ်င္ျပီး ဘယ္ကစလုိ့စရမွန္းမသိဘူးဆုိရင္ေတာ့ က်ြန္ေတာ့္online course က မိတ္ေဆြကုိ အျမန္တတ္ေျမာက္ေစမွာပါ။

CLICK HERE TO MASTER PYTHON PROGRAMMING

Recent Posts

  • How to do switch case in python
  • Introduction to git version control system & basic commands
  • Tutorial 5: Static & Media Files Setting
  • How To Use IMAGENET Pretrained Model With Python And Keras (ResNet50)
  • Cat OR Dog Audio Classification

Categories

  • Android
  • Color Bubble Game
  • Computer Vision
  • Deep Learning
  • Ebook Store
  • Functional Programming
  • git version control
  • Hand Written Recognition
  • Machine Learning
  • Networking
  • Practical Projects
  • Python Basic
  • Web Development
  • Web Scraping

Company

  • About Us
  • Blog
  • Contact

Support

  • Documentation
  • Forums
  • Language Packs

©2017-2018 Pyrobocity.

  • Privacy
  • Terms
  • Sitemap