ตัวอย่างโค้ด AI (ปัญญาประดิษฐ์) ..(แก้ไขล่าสุด 31/07/2020)
สำหรับงาน machine learning + deep learning โดยเฉพาะ
จริงๆ แล้วโค้ดหลายโปรเจค
ก็เคยแชร์โค้ดไปนานแล้ว
แม้ว่าจะเก่าหน่อย แต่ก็ยังใช้ได้
.
แต่เนื่องจากการเซทอัพโปรเจคในเครื่องตัวเอง
มันแสนยุ่งยาก เวอร์ชั่นไลบรารี่เปลี่ยนทีชีวิตเปลี่ยน
ผมเลยทำตัวอย่างการเขียนไว้บนเว็บ (colab)
เพื่อนๆ จะได้ลองศึกษากันได้ไปเลย
สามารถ Ctrl+C และ Ctl+v เอาไปใช้ได้
แต่ขอให้เครดิตกันก็พอ
.
อันนี้เป็นเพียงบางส่วน
ส่วนโปเจคที่เหลือเดี่ยวจะมาทยอยอัพเดตในโพสต์นี้แหละ
.
☑ พื้นฐานเขียนโปรแกรมของเด็กม.ต้น ถ้าไม่มีก็เขียน AI ไม่ได้นะ
https://colab.research.google.com/drive/1rm-kW7Nh5q3kk9JsnvBea2oUr42W9GIF
.
☑ พื้นฐาน Tensorflow
https://colab.research.google.com/drive/1iX9d2bl1ogh2qo2U-NTot_XuVbfAqKi9
.
☑ พื้นฐาน PYTorch
https://colab.research.google.com/drive/1BtVCWpwWovcVqkvEX5HaUAIyUOlekC0m
.
☑ พื้นฐาน Pandas (Dataframe)
https://colab.research.google.com/drive/1LpF3_oz2QIqBIkc1Q8opZyVzujW6Jsq2
.
☑ พื้นฐาน numpy ( อาร์เรย์หลายมิติ)
https://colab.research.google.com/drive/1u93d1Tm60YCKUY6CLGz9242NdQNWAQEA
.
☑ พื้นฐาน matplotlib เอาไว้พล็อตกราฟ
https://colab.research.google.com/drive/1BPi8jv--sKUSu9apCdYziDptHMtBY_16
.
☑ Basic machine learning concept ตั้งแต่
Regression, Logistic Regression, Decision Tree, Support Vector Machine (SVM), Naive Bayes, K-NN (K-Nearest Neighbors), Kmeans และอื่นๆ
https://colab.research.google.com/drive/1ZRMW3fXGWUvkeFPM07qtFXoSbLmuMpO1
.
☑ ตัวอย่าง deeplearning การเรียนรู้ขั้นสูง ได้แก่ neural network, CNN, RNN จากภาพตัวเลข
https://colab.research.google.com/drive/1KsGnaw9jE4wnmXK2mf2C4-Ylnj6nXbFw
.
☑ AI สัญชาติไทยจาก NECTEC ได้แก่
- BASIC NLP: ประมวลผลภาษาไทย
- TAG SUGGESTION: แนะนำป้ายกำกับ
- MACHINE TRANSLATION: แปลภาษา
- SENTIMENT ANALYSIS: วิเคราะห์ความคิดเห็น
- CHARACTER RECOGNITION: แปลงภาพอักษรเป็นข้อความ
- OBJECT RECOGNITION: รู้จำวัตถุ
- FACE ANALYTICS: วิเคราะห์ใบหน้า
- PERSON & ACTIVITY ANALYTICS: วิเคราะห์บุคคล
- SPEECH TO TEXT: แปลงเสียงพูดเป็นข้อความ
- TEXT TO SPEECH: แปลงข้อความเป็นเสียงพูด
- CHATBOT: สร้างแช็ตบอต
colab.research.google.com/drive/1LRPpzzwJwLIZIy3t7CxljhDjgLq-Z1Ha
.
☑ แยกแยะภาพจากโจทย์ Image Net ของโมเดลชื่อดัง เช่น Xception, VGG16, VGG19, ResNet50 และ InceptionV3
(รอก่อน)
.
☑ ใช้ AI ตัดคำในภาษาไทย
https://colab.research.google.com/drive/1tLrKRFR6i4TAzrbJ8wgsp4aihfWnMgnT
.
☑ Principal_Component_Analysis (PCA)
https://colab.research.google.com/drive/1FoGtB5xW1aWeQ7hlTmuB1AhXuFMx-jTo
.
☑ genetic algorithm :
อัลกอริทึมที่มีแรงบันดาลใจมาจากทฤษฎีวิวัฒนาการจากชีววิทยาของ ชาลส์ ดาร์วิน
เพื่อหาเส้นทางสั้นที่สุดในการเดินทางข้าม 20 จังหวัดของประเทศไทย
(รอก่อน)
.
☑ การใช้ AI ตรวจจับวัตถุในรูปภาพ Object Detection โดยใช้ imageai
https://colab.research.google.com/drive/1uQnZfPlRhplvcZKWiXn1jeytJIFEVLkV
.
☑ ใช้ AI ตรวจจับวัตถุในรูปภาพ โดยใช้ pixellib
https://colab.research.google.com/drive/1llWzReE3rS9wDfSGGm8M7RQ25jeEfSIi
.
☑ ตัวอย่าง API ของ Google เป็น tensorflow
https://colab.research.google.com/drive/12K-4uQ1tAvOukLb1-lwXx4bnXkeQupTk
.
☑ การใช้ AI ของ Facebook ตรวจจับวัตถุในรูปภาพ Object Detection , Segmentation, Pose Estimate
https://colab.research.google.com/drive/1jnWFADFdZHz1LSyfXVKHY3fIwuY5F_uo
.
☑ ใช้โมเดล Mask RCNN ตรวจจับวัตถุในรูปภาพ Object Detection , Segmentation
https://colab.research.google.com/drive/1JGRIMQ1YSdMXkEZdC6QNGbI722tEQJTE
.
☑ การใช้ AI ตรวจจับการเคลื่อนไหวของมนุษย์แบบเรียบไทม์ (real time)
https://colab.research.google.com/drive/1zWplcKN6ElL1eJmwKj3IqGFy3gg9Neus
.
☑ การใช้ AI จำใบหน้าคนในรูป ในวีดีโอ
https://colab.research.google.com/drive/1MnypOHemKhMEXCaWOgm6-ViYqF7GENWH
.
☑ หาจุด landmarks บนใบหน้าแบบ 2 มิติกับ 3 มิติ
https://colab.research.google.com/drive/1MDRYnhhPb2l3w0QIjV9beuc26Ng5BOPc
.
☑ การใช้ AI ตรวจจับภาพโป้ 18+ ในรูป หรือแม้กระทั่งภาพการ์ตูนก็ทำได้
https://colab.research.google.com/drive/1aFQgXH9WAvA_aJiZU4GZppWrLnZNJ7Hh
.
☑ การใช้ AI แต่งประโยคขึ้นมาเอง
https://colab.research.google.com/drive/1lZoaSLo2Ip-mlBNUFpjKhVAPWDenbRCu
.
☑ Google Translate API
ตัวอย่าง Python
https://colab.research.google.com/drive/1aca28YHet8DZ3jw-3wCx-Y40XR-6hpDJ
ตัวอย่าง JavaScript
https://github.com/adminho/javascript/blob/master/examples/google_translate/translate_general.html
.
☑ การใช้ AI วินิจฉัยโรค Covid-19 จากภาพเอกซ์เรย์ปอด
https://colab.research.google.com/drive/11ohI5nJiLVc23t2LRUfUmOYBvPYHJDnX
.
☑ ใช้ AI ตรวจจับภาพใบหน้าคนถูกแต่งด้วย Phtotoshop หรือไม่
https://colab.research.google.com/drive/1y4zN4AHhx0NYYx7szfW6C5aWsFdZZvml
.
☑ ใช้ AI วาดรูปเลียนแบบศิลปินชื่อดัง ( Artistic style)
(รอก่อน)
.
☑ ใช้ AI เขียนหนังสือภาษาไทย
(รอก่อน)
.
☑ การนำเอา AI มาใช้ในตลาดหุ้นไทย
https://github.com/adminho/trading-stock-thailand
.
☑ นำ AI มาเล่นเกมเอง
(รอก่อน)
.
☑ การรู้จำเสียงพูดโดยใช้ Google API (Speech Recognition)
- ใช้ javascript+HTML
https://github.com/adminho/javascript/tree/master/examples/speech-recognition/web
- ใช้เสียงควบคุมเกม https://github.com/adminho/javascript/tree/master/examples/speech-recognition/game
.
☑ ใช้ AI แต่งดนตรีเอง
(รอก่อน)
.
.
.
+++++ขอประชาสัมพันธ์ (ขายของ)
📔 หนังสือ "ปัญญาประดิษฐ์ (AI) ไม่ยาก" เข้าใจได้ด้วยเลขม. ปลาย (เนื้อหาภาษาไทย)
.
ถ้าสนใจสั่งซื้อเล่ม 1 ก็สั่งซื้อได้ที่ (เล่มอื่นๆ กำลังทยอยตามมา)
👉 https://www.mebmarket.com/web/index.php?action=BookDetails&data=YToyOntzOjc6InVzZXJfaWQiO3M6NzoiMTcyNTQ4MyI7czo3OiJib29rX2lkIjtzOjY6IjEwODI0NiI7fQ&fbclid=IwAR11zxJea0OnJy5tbfIlSxo4UQmsemh_8TuBF0ddjJQzzliMFFoFz1AtTo4
.
ขออภัยยังไม่มีเล่มกระดาษจำหน่าย มีแต่ ebook
.
ส่วนตัวอย่างหนังสือ ก็ดูได้ลิงค์นี้
👉 https://drive.google.com/file/d/1zG64QAuPKtnWu-Jizn4i2JYUbHnHa8cJ/view?usp=sharing
.
✍เขียนโดย โปรแกรมเมอร์ไทย thai programmer
同時也有1部Youtube影片,追蹤數超過1萬的網紅alwaysfluke,也在其Youtube影片中提到,ซื้อมาวันแรกขอรีวิวเล็กๆ กับเจ้า sony speria acro s มือถือรุ่นใหญ่ที่กันน้ำได้ OS:Android (4.0.4) Dimensions:4.96 x 2.60 x 0.47 (126 x 66 x 11.9 mm) ...
text detection 在 Jenn’s 沬厤 Life After Cancer #spreadlovecreatehope Facebook 八卦
😔While you were thinking if my symptoms were just gastritis or dyspepsia.. Or stomach cancer.. 🤒
Deep in my heart, I was quite ready for the bad news. 💀This is also the first time my condition didn’t improve despite seeing so many doctors; taking so many different medications.🦠
Initially I told myself it should be just indigestion because that’s how it felt like in the first place. But bcs of the constant and continuous pain🌡, it led me to lots of read up n many things started to run in my head.. 🤯
Is this a recurrence of my cancer?💔
The symptoms were all SIMILAR to my pre-cancer days! Yes, cancer symptoms can be very common and almost gone undetected. 😣
Do you know, this June I’ll be officially cancer free celebrating my GREAT 5th ANNIVERSARY?
Despite all the fear and uncertainty I had, I contacted my onco to meet him a day earlier. 🩺Yes, even though it was just one day earlier.. I just can’t wait.. I was so anxious for my onco to assess my condition n symptoms. 😤I want them to scan me and to palpate my body and to tap my abdomen to tell me what is wrong with it. 😢
The previous two doc I met in a private clinic and Klinik Kesihatan didn’t perform any thorough check. But my onco did. 💪🏼They’re like my creator, they know my history and what could potentially or possibly happen to my body. They will perform all necessary check. This time, I am lucky to have two doctors to examine me. I can’t be any more grateful for them. ☝🏻They told me it is just some bad indigestion (I forgot the actual scientific term to it but it means bad gastric/ indigestion which can last longer than usual). And they did ultrasound on me, ovary, uterus, spleen, lung etc looks beautiful. 💯 The previous cyst that was detected in November has shrink from its original size and he said usually it took 3 cycles to be completely disappear, I have 2 more period cycles to go...👏🏼
I requested for CT Scan but he told me based on their assessment, the scan is not necessary. But because I was quite worried, instead of waiting for another 3 months to come back, he had arranged for me to be back in 2 months time, that’s March 2020. 👨🏻⚕️💪🏼 I also had my blood withdrawn for my usual check on AFP & CA125, the result will be out in 2 weeks time. 😬
I did shared to him my list of meds I took which I don’t think works. He then prescribed me some Esomeprazole and said some people may not be able to receive the full effectiveness of Omeprazole, hence he gave me the slightly stronger ones and guess what, it work almost like an instant magic wand, 🧚🏻♀️my back pain disappeared. My abdomen pain (front) got better too. I managed to have a good afternoon nap.
But it hasn’t completely gone. Sometimes I’m not sure if the pain was due to my gastric or hunger? Bcs I’ve since changed to smaller portion meal with regular intake.. Now, whenever I have slight pain, I’ll reach for some bites.. sometimes the toilet to see if it’s nature’s call. Probiotic definitely help in my bowel movement. From constipation to pale stool to light brown.. I hope it’s getting normal soon!😘
Things are definitely improving.
I can laugh and joke now.
I can definitely sit here writing this long updates.
At this point of writing, I’m feeling absolutely fine. No pain. This false alarm definitely reminds me of the things I’d always wanted to do but never do, I’m going to accomplish it this 2020!
But I guess, anxiety like this is normal for cancer fighters uh. When there’s any symptoms, we always go all out to get it checked and diagnosed. Bcs early detection is better than cure.👏🏼☺️
Well, let’s cheers to a wonderful year in 2020!❤️💪🏼
With good health and happiness, waste time no more! 🥂
Last but not least, thank you all for your continuous love and support. I’m forever thankful 😘 Appreciate all the text and pm in my fb and ig. Love u guys ❤️😘💓
#jennslifeaftercancer #spreadlovecreatehope #cancersucks #cancersurvivor #nevergiveup #livelife
text detection 在 Jenn’s 沬厤 Life After Cancer #spreadlovecreatehope Facebook 八卦
😔While you were thinking if my symptoms were just gastritis or dyspepsia.. Or stomach cancer.. 🤒
Deep in my heart, I was quite ready for the bad news. 💀This is also the first time my condition didn’t improve despite seeing so many doctors; taking so many different medications.🦠
Initially I told myself it should be just indigestion because that’s how it felt like in the first place. But bcs of the constant and continuous pain🌡, it led me to lots of read up n many things started to run in my head.. 🤯
Is this a recurrence of my cancer?💔
The symptoms were all SIMILAR to my pre-cancer days! Yes, cancer symptoms can be very common and almost gone undetected. 😣
Do you know, this June I’ll be officially cancer free celebrating my GREAT 5th ANNIVERSARY?
Despite all the fear and uncertainty I had, I contacted my onco to meet him a day earlier. 🩺Yes, even though it was just one day earlier.. I just can’t wait.. I was so anxious for my onco to assess my condition n symptoms. 😤I want them to scan me and to palpate my body and to tap my abdomen to tell me what is wrong with it. 😢
The previous two doc I met in a private clinic and Klinik Kesihatan didn’t perform any thorough check. But my onco did. 💪🏼They’re like my creator, they know my history and what could potentially or possibly happen to my body. They will perform all necessary check. This time, I am lucky to have two doctors to examine me. I can’t be any more grateful for them. ☝🏻They told me it is just some bad indigestion (I forgot the actual scientific term to it but it means bad gastric/ indigestion which can last longer than usual). And they did ultrasound on me, ovary, uterus, spleen, lung etc looks beautiful. 💯 The previous cyst that was detected in November has shrink from its original size and he said usually it took 3 cycles to be completely disappear, I have 2 more period cycles to go...👏🏼
I requested for CT Scan but he told me based on their assessment, the scan is not necessary. But because I was quite worried, instead of waiting for another 3 months to come back, he had arranged for me to be back in 2 months time, that’s March 2020. 👨🏻⚕️💪🏼 I also had my blood withdrawn for my usual check on AFP & CA125, the result will be out in 2 weeks time. 😬
I did shared to him my list of meds I took which I don’t think works. He then prescribed me some Esomeprazole and said some people may not be able to receive the full effectiveness of Omeprazole, hence he gave me the slightly stronger ones and guess what, it work almost like an instant magic wand, 🧚🏻♀️my back pain disappeared. My abdomen pain (front) got better too. I managed to have a good afternoon nap.
But it hasn’t completely gone. Sometimes I’m not sure if the pain was due to my gastric or hunger? Bcs I’ve since changed to smaller portion meal with regular intake.. Now, whenever I have slight pain, I’ll reach for some bites.. sometimes the toilet to see if it’s nature’s call. Probiotic definitely help in my bowel movement. From constipation to pale stool to light brown.. I hope it’s getting normal soon!😘
Things are definitely improving.
I can laugh and joke now.
I can definitely sit here writing this long updates.
At this point of writing, I’m feeling absolutely fine. No pain. This false alarm definitely reminds me of the things I’d always wanted to do but never do, I’m going to accomplish it this 2020!
But I guess, anxiety like this is normal for cancer fighters uh. When there’s any symptoms, we always go all out to get it checked and diagnosed. Bcs early detection is better than cure.👏🏼☺️
Well, let’s cheers to a wonderful year in 2020!❤️💪🏼
With good health and happiness, waste time no more! 🥂
Last but not least, thank you all for your continuous love and support. I’m forever thankful 😘 Appreciate all the text and pm in my fb and ig. Love u guys ❤️😘💓
#jennslifeaftercancer #spreadlovecreatehope #cancersucks #cancersurvivor #nevergiveup #livelife
text detection 在 alwaysfluke Youtube 的評價
ซื้อมาวันแรกขอรีวิวเล็กๆ กับเจ้า sony speria acro s มือถือรุ่นใหญ่ที่กันน้ำได้
OS:Android (4.0.4)
Dimensions:4.96 x 2.60 x 0.47 (126 x 66 x 11.9 mm)
Weight:5.19 oz (147 g)
the average is 4.1 oz (117 g)
Rugged:Water (Water), Dust proof
DISPLAY
Physical size:4.30 inches
Resolution:720 x 1280 pixels
Pixel density:342 ppi
Technology:TFT
Colors:16 777 216
Touchscreen:Capacitive, Multi-touch
Features:Light sensor, Proximity sensor, Scratch-resistant glass
BATTERY
Talk time:6.66 hours
the average is 8 h (508 min)
Stand-by time:12.1 days (290 hours)
the average is 20 days (482 h)
Talk time (3G):7.16 hours
the average is 7 h (400 min)
Stand-by time (3G):12.9 days (310 hours)
the average is 22 days (527 h)
Capacity:1910 mAh
HARDWARE
System chip:Qualcomm Snapdragon S3 MSM8260
Processor:Dual core, 1500 MHz, Scorpion
Graphics processor:Adreno 220
System memory:1024 MB RAM / 16384 MB ROM
Built-in storage:11 GB
Storage expansion:Slot Type:
microSD, microSDHC
Maximum card size:32 GB
CAMERA
Camera:12.1 megapixels
Flash:LED
Aperture size:F2.4
Features:Back-illuminated sensor (BSI), Auto focus, Touch to focus, Image stabilizer, Video stabilizer, Face detection, Smile detection, White balance, Digital zoom, Geo tagging, Panorama, Self-timer
Camcorder:1920x1080 (1080p HD)
Features:Video light, Video calling
Front-facing camera:1.3 megapixels
MULTIMEDIA
Music player:
Filter by:Album, Artist, Playlists
Features:Album art cover, Background playback, Music recognition, Sound effects
Radio:FM, Stereo, RDS
Speakers:Earpiece, Loudspeaker
YouTube player:Yes
INTERNET BROWSING
Browser:Yes
Supports:HTML, HTML5, XHTML, Flash, CSS 3
Built-in online services support:Facebook, YouTube (upload), Picasa, Twitter
TECHNOLOGY
GSM:850, 900, 1800, 1900 MHz
UMTS:850, 900, 1900, 2100 MHz
Data:HSDPA 14.4 Mbit/s, HSUPA 5.76 Mbit/s, UMTS, EDGE, GPRS
Positioning:GPS, Glonass
Navigation:Turn-by-turn navigation
PHONE FEATURES
Phonebook:Unlimited entries, Caller groups, Multiple numbers per contact, Search by both first and last name, Picture ID, Ring ID
Organizer:Calendar, Alarm, Document viewer (Office 2007, Office 2003, PDF), Flashlight, Calculator, Stopwatch
Messaging:SMS, MMS, Threaded view, Predictive text input
E-mail:IMAP, POP3, SMTP, Microsoft Exchange
CONNECTIVITY
Bluetooth:3.0
Wi-Fi:802.11 b, g, n
Mobile hotspot:Yes
USB:USB 2.0
Connector:microUSB
Features:Mass storage device, USB charging
HDMI:Yes
Other:NFC, DLNA, Tethering, Computer sync, OTA sync
OTHER FEATURES
Notifications:Music ringtones (MP3), Polyphonic ringtones, Vibration, Flight mode, Silent mode, Speakerphone
Sensors:Accelerometer, Compass
Voice dialing, Voice commands, Voice recording

text detection 在 基於深度學習的場景文字檢測和識別(Scene Text Detection ... 的相關結果
He,and J. Liang. EAST: An efficient and accurate scene text detector. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), ... ... <看更多>
text detection 在 Detect text in images | Cloud Vision API 的相關結果
Optical Character Recognition (OCR) · TEXT_DETECTION detects and extracts text from any image. For example, a photograph might contain a street sign or traffic ... ... <看更多>
text detection 在 Scene Text Detection | Papers With Code 的相關結果
Scene Text Detection is a task to detect text regions in the complex background and label them with bounding boxes. Source: ContourNet: Taking a Further Step ... ... <看更多>