ใช้ AI ตรวจจับใบหน้าคนในรูป
สมัยนี้ดูจะธรรมดาเกินไป คงเห็นกันทำเยอะแล้ว
เรามาดูผลงานวิจัย AI อีกเวอร์ชั่นหนึ่ง
ใช้ตรวจจับอารมณ์คนขณะเรียลไทม์ได้ด้วย ... อะฮะไม่ธรรมดา
.
จาก paper ต้นฉบับ
"Real-time Convolutional Neural Networks for emotion and gender classification"
https://arxiv.org/abs/1710.07557
.
เทคนิคโดยย่อเขาจะใช้ Deep learning เป็นประเภท CNN
มาทำการตรวจจับ 2 อย่างในรูปภาพได้แก่
1) ตรวจสอบว่าเป็น เพศชาย เพศหญิง ...มีความแม่นยำสูง ถูกต้อง 96%
2) ตรวจจับอารมณ์คนได้แก่ ....แต่ความแม่นยำยังต่ำอยู่ ถูกแค่ 66%
.
ซึ่งอารมณ์คนที่จับได้ มี่ 8 อย่าง ดังนี้
“angry”, “disgust”, “fear”, “happy”,“sad”, “surprise”, “neutral”
แปลเป็นไทย
“ โกรธ”,“ รังเกียจ”,“ กลัว”,“ มีความสุข”,“ เศร้า”,“ แปลกใจ”,“ เป็นกลาง”
.
ซึ่งเทคนิคนี้สามารถตรวจจับภาพหน้าคนได้ทั้งแบบภาพนิ่ง
หรือเป็นภาพวีดีโอก็ได้
ในระดับเรียลไทม์ ....ขอบอกเลย
.
แต่เท่าที่ลองจับอารมณ์คน
ก็ยังเห็นผิดพลาดเยอะอยู่นะ
ถ้าคนสีหน้านิ่งเกิ๊นไป ก็ตรวจไม่ได้
ถือว่าปราบเซียนอยู่เหมือนกัน
.
คิดไปคิดมา เปลี่ยนมาตรวจจับหน้าคนในละครแทนดีกว่า
เลยไปเอามาจากละคร "น้ำตากามเทพ" ของจีทีเฮช
เหตุผลนักแสดงเรื่องนี้ เขาเล่นโอเวอร์แอคติ้ง เล่นใหญ่ดี
ผลปรากฏว่าตรวจจับได้ดีขึ้นเยอะ
(แต่ก็ยังมีผิดอยู่ เอ่อๆ บ้าง)
.
ทั้งนี้ในคลิปจะตรวจจับอารมณ์คนอย่างเดียว
จะเห็นเป็นกรอบสี่เหลี่ยมครอบหน้าคน
แล้วขึ้นข้อความบอกว่าสีหน้าอารมณ์ตอนนี้คืออะไร?
แต่ไม่ได้โชว์เพศชาย หรือหญิงให้ดูนะบอกก่อน
:
:
ใครสนใจอยากลองทำ
ก็เชิญดูโค้ดเขาตามนี้เลยครับ
มันเป็นของงานวิจัยเขาโดยตรง
https://github.com/oarriaga/face_classification/
.
ทั้งนี้โค้ดสามารถอ่านจากรูปภาพ
หรือจากกล้องเวบเคมก็ได้ ...ชีวิตดีดี
ภาษาที่ใช้เป็น python ครับผม
แต่เท่าที่ลองรัน ก็เจอผู้สร้างวางยา ยังมีบั๊กอยู่นะครับ ฮ่าาาา
:
ยังไงก็เอาไปศึกษาได้
หรือจะไปต่อยอด ....ทำให้เหนือกว่าเขาก็ได้ครับ
:
สำหรับวิธีติดตั้งและใช้งานภาษาไทย ผมเขียนไว้ที่นี้นะครับ
https://www.patanasongsivilai.com/…/real-time-emotion-detec…
:
หมายเหตุ ในคลิปผมใส่เสียงพูดตัวละครเข้าไป เพื่ออรรถรสในการชม
ติดตามคลิปนี้ได้ที่ youtube อีกที
https://youtu.be/fzgXTNXHOME
.
.
ขอแนะนำหนังสือ "AI ไม่ยาก เรียนรู้ด้วยเลขม. ปลาย"
เน้นพื้นฐานคณิตศาสตร์ระดับเด็กม. ปลาย
ไม่มีโค้ดดิ้งให้ปวดหัว
ก็สั่งซื้อได้ที่นี้ (ขออภัยยังไม่มีเล่มกระดาษขาย)
👉 https://www.mebmarket.com/web/index.php…
.
ส่วนตัวอย่างหนังสือ ก็ดูได้ที่
👉 https://www.dropbox.com/s/fg8l38hc0k9b…/chapter_example.pdf…
.
✍ เขียนโดย โปรแกรมเมอร์ไทย thai programmer
Use AI to detect faces in pictures
It seems too ordinary these days. We probably see a lot of people doing.
Let's see another version of AI research.
Use to detect real-time people's emotions too... Aha. Extraordinary.
.
From the original paper.
"Real-time Convolutional Neural Networks for emotion and gender classification"
https://arxiv.org/abs/1710.07557
.
Brief technique. He will use Deep learning as a CNN type.
Let's do 2 detections in the photo:
1) Check out male, female... High accuracy 96 % accurate
2) Emotional detection. People are.... but accuracy is still low. Only 66 % right.
.
The following 8 people who caught me.
“angry”, “disgust”, “fear”, “happy”,“sad”, “surprise”, “neutral”
Translate to Thai
′′ Angry "," disgusted "," afraid "," happy "," sad "," surprise "," neutral ′′
.
This technique can detect a human face in a slide way.
Or it can be a video.
In real time.... Let me tell you.
.
But I try to catch people's emotions.
Still see a lot of mistakes
If the face is too calm, I can't check.
It's considered a masterful defeat.
.
Think about it. Change to detect people in drama instead.
So I took it from GTH's ′′ Cupid Tears ′′ drama.
This actor reason he plays over action. He plays big.
Turns out a lot better detection
(but still wrong, well, some)
.
In the clip, I will detect emotion only.
I will see it as a square frame in front of people.
So what's the current expressions?
But I didn't show you male or female. I told you first.
:
:
Who is interested in trying it
Let's see his code according to this.
It belongs to his research directly.
https://github.com/oarriaga/face_classification/
.
The code can be read from pictures
Or from the web camera... Life is good.
The language used as python.
But as far as I try, I have found a poisoning creator. There is still a buck. Haha.
:
I can study it anyway.
Or you can go to the top.... You can do it above other people.
:
For how to install and use Thai language, I wrote this here.
https://www.patanasongsivilai.com/blog/real-time-emotion-detection-ai
:
Note in the clip, I put character voice in for the taste of watching.
Follow this clip on YouTube again.
https://youtu.be/fzgXTNXHOME
.
.
Introducing the book ′′ AI. It's not difficult to learn with university numbers. The end ′′
Focusing on the base of math. Level of middle school kids. The end.
No code to get headache
You can order here. (Sorry, no paper book for sale)
👉 https://www.mebmarket.com/web/index.php?action=BookDetails&data=YToyOntzOjc6InVzZXJfaWQiO3M6NzoiMTcyNTQ4MyI7czo3OiJib29rX2lkIjtzOjY6IjEwODI0NiI7fQ
.
Personal like a book. You can see it.
👉 https://www.dropbox.com/s/fg8l38hc0k9b0md/chapter_example.pdf?dl=0
.
✍ Written by Thai programmer thai coderTranslated
同時也有10000部Youtube影片,追蹤數超過2,910的網紅コバにゃんチャンネル,也在其Youtube影片中提到,...
python change type 在 โปรแกรมเมอร์ไทย Thai programmer Facebook 的最佳貼文
วิชาใหม่แกะกล่องของกระทรวงศึกษา ชื่อ "วิทยาการคำนวณ" ได้บรรจุภาษาเขียนโปรแกรม Python เป็นหนึ่งในภาษาโปรแกรมมิ่งหลัก ตั้งแต่ระดับชั้น ม.1 เปิดเทอมเดือน พ.ค.นี้ เริ่มเรียนกันได้!
สำหรับเนื้อหาส่วนเขียนโปรแกรม อันนี้เป็นตัวอย่างของ ม.1 เทอมแรก น้องจะได้เรียนแค่นี้เอง ก็ไม่ได้มากมายอะไร (หรือเปล่า)
-รู้จักไพธอน
-ตัวแปร
-ชนิดข้อมูลพื้นฐาน
-การแปลงชนิดข้อมูล
-การเขียนโปรแกรมไพทอนในโหมดสคริปต์
-ฝึกเขียนโปรแกรมกับเต่าไพทอน
-การทำงานแบบวนซ้ำ
-การทำงานแบบมีทางเลือก
ส่วนเนื้อหานอกจากเขียนโปรแกรม ก็จะไปเรียนพวก (ส่วนนี้จะมีหลายบทหน่อย)
-แนวคิดเชิงนามธรรม
-การแก้ปัญหา
-ข้อมูลและการประมวลผล
-การใช้เทคโนโลยีสารสนเทศอย่างปลอดภัย
คือหลักสูตรไม่ได้เน้นเขียนโปรแกรมหนักๆ แบบมหาวิทยาลัยนะครับ สอนอย่างอื่นด้วย นี้แค่ยกตัวอย่างเฉพาะเนื้อหาของ ม.1 เทอมแรกที่น้องจะได้เรียนกัน
เอ่อแล้วหลักสูตรไม่ได้บังคับให้เด็กต้องเรียน Python นะครับ ถ้าโรงเรียนยังไม่พร้อม ก็ไม่ต้องสอน แต่ให้เปลี่ยนมาสอนเขียนโปรแกรมด้วย Scratch แทนที่ ซึ่งง่ายต่อการสอนกว่า เพราะมันเป็นภาษาภาพ ใช้บล็อกคำสั่งมารอยเรียงสั่งงาน
ต้องบอกอย่างนี้ครับ หลักสูตรให้เลือกว่าจะสอนเด็กด้วย Python หรือ Scratch มีแค่ 2 ทางให้เลือกอย่างใดอย่างหนึ่ง ซึ่ง Scratch นี้ เด็กจะได้เปรียบตรงที่เริ่มบรรจุในหลักสูตรตั้งแต่ป. 4 (ถ้าเข้าใจไม่ผิดนะ)
โดยส่วนตัวแล้ว ถ้าโรงเรียนพร้อม+เด็กสนใจเขียนโปรแกรมจริงๆ เลือกสอน Python ไปเลยก็ดี มันต่อยอดไปยังภาษาระดับสูงได้อีกหลายตัว เด็กจะได้มีพื้นฐานตอนเรียนระดับมหาวิทยาลัยอีกด้วย
ดังนั้นต่อไปนี้ Python + Scratch จะเป็นภาษาโปรแกรมแรกๆ ที่เด็กไทยทั่วประเทศจะมีโอกาสเรียนรู้ ไม่ต่างกับหลายๆ ประเทศที่เขาสอนเขียนโปรแกรมตั้งแต่เด็ก ...ยิ่งที่จีนเขาไปไกลเริ่มสอนปัญญาประดิษฐ์(AI) ตั้งแต่เด็กแล้ว
ถึงเขาจะก้าวไปก่อนเรา แต่อย่างน้อยบ้านเราตอนนี้ก็เริ่มสอนดังเช่นเมืองนอกเมืองนาเขาแหละ แล้วต่อไปคงเห็นเด็กยุค 4.0 มีพื้นฐานเขียนโปรแกรมสร้างแอพตั้งแต่เด็ก ...หรือได้กระบวนการคิดพวกตรรกะ มีเหตุผล มีลำดับขั้นตอน ก็ยังดีนะครับ
------------------
หมายเหตุ
------------------
1) วิชา "วิทยาการคำนวณ" ถือเป็นหลักสูตรแกนกลาง เริ่มสอนเด็กตั้งแต่ประถม ป.1 ....พูดง่ายๆ เรียนกันทุกคนตั้งแต่เด็กครับ ทั้งโรงเรียนรัฐและเอกชน
2) แต่ในระดับประถมจะปูพื้นฐานกระบวนการคิดที่จำเป็นต่อการเขียนโปรแกรมเป็นหลัก (เนื้อหาอ่านง่ายเป็นการ์ตูน ไม่น่าเบื่อ) ไม่ได้จับมือเขียนโปรแกรมเป็นเรื่องเป็นราว แต่พอขึ้นป.4 จะเริ่มแทรกลอจิกด้วยภาษา Scratch ซึ่งความยากง่ายเป็นไปตามระดับชั้น
3) พอขึ้นม.4 จะเน้นสอนอัลกอริทึม กระบวนการคิดที่เข้มข้นขึ้น มีโครงงานให้ทำ (ไม่ได้สอนไวยากรณ์ของภาษา Python เหมือนม.ต้น)
4) หลักสูตรจะนำร่องเริ่ม ป.1, ป.4, ม.1 และ ม.4 จากนั้นทยอยสอนให้ครบ 12 ชั้นปี
A new subject to unpack the ministry of education named "calculation" has packed the language. Python is one of the main program since high school class. 1 School starts in the month. Jul. Let's start studying!
For the content, the programming is an example of the university. The first 1 semester, I will be able to study this much. (or not)
- Know Python.
- Variable
- Basic information type
- Conversion of data type
- Pyton programming in script mode
- Programming practice with Pyton Turtle
- Repeated work
- Working with choice
As for the content, besides writing, I will go to study. (there will be many chapters in this part)
- Abstract concept
- Solution
- Data and processing
- Safe use of information technology
Well, the course doesn't focus on writing heavy programs like university. Teaching something else. Just for example, only the content of the university. The first 1 semesters that you will be able to study.
Well, the course is not forcing kids to study Python. If school is not ready, you don't have to teach, but change to write program with scratch instead. It's easier to teach because it's a photo language. Use to block order.
I have to tell you this course to choose whether to teach kids with Python or Scratch. There are only 2 ways to choose from. This Scratch will have an advantage of the course. 4 (If I understand correctly)
Personally, if school is ready + kids are interested in writing a program. Choose to teach Python. It's good. It can continue to the top language. Many more children will have the basics in university.
Therefore, Python + Scratch will be the first language that Thai children all over the country will have a chance to learn. It's not different than many countries that they teach to write programs since they were young... The more they go, he goes far. Start teaching artificial intelligence (AI
Even though they move before us, at least our home is now starting to teach like abroad. Next, I will see kids in the 4.0 s have the basics to build apps since they were young... or have thought process. There is a reason. It's good to have a process.
------------------
Note:
------------------
1) "calculation science" is a core course. Start teaching children from elementary school. 1.... Easy to say. Everyone has studied since we were young. Both cuddle states and private schools.
2) but in elementary school, it will pave the basic thought process that is necessary for programming (easy to read content, not boring). Not holding hands, but when it's enough to the po. 4 will start inserting logic with Scratch, which difficulty is easy to the class.
3) When I go to high school. 4 I will focus on teaching algorithms. Intense thought process. There is a project to do. (not teach Python's grammar like university. (TREE)
4) The course will start the pilot. 1, po. 4, m 1 and high school 4 then gradually teach 12th gradeTranslated