บอกคำตอบGive answers给答案
Supervised · คุณให้คำตอบที่ถูกต้องSupervised · you give the right answer
เลือกวิธีให้เครื่องเรียนจากภาพถนนที่เตรียมไว้ บอกคำตอบ ให้เครื่องจัดกลุ่มภาพคล้ายกัน หรือให้รางวัลกับการกระทำ เริ่มได้โดยไม่เปิดกล้องChoose how the computer will learn from the ready-made road pictures. Give it answers, group similar pictures, or reward an action. You can start with your camera off.用现成的道路图片选择电脑的学习方式:给答案、把相似的图片分组,或奖励一个动作。无需打开摄像头。
เปลี่ยนภาพที่แสดง · ยังไม่บันทึกภาพChange the view · this does not save a picture切换画面 · 不会保存图片
หลังเรียนแล้ว รอเฟรมใหม่หรือเปลี่ยนกล้อง เครื่องจะทายก่อนคุณบอกคำตอบ ภาพจากกล้องเดิมไม่ใช่หลักฐานว่าใช้ได้กับกล้องอื่นAfter Learn, wait for a new frame or change camera. It guesses before you give the answer. A new frame from the same camera does not prove it works on another camera.学习后等待新画面或更换摄像头。模型先预测,你再核对。同一摄像头的新画面不能证明模型适用于其他摄像头。
คำตอบจริงคืออะไร?What is the true answer?真实答案是什么?
วิดีโอฝึกเป็นภาพจากกล้องสาธารณะจริง เลือกฉากรถแน่น ถนนโล่ง หรือสลับเองทุก 8 วินาที แล้วเก็บภาพจากจอนั้น ถ้าต้องการมุมอื่น ให้สลับไปกล้องสาธารณะหรือไฟล์ของคุณThe practice video is real public-camera footage. Choose busy traffic, quiet traffic, or an automatic change every 8 seconds, and capture frames from that screen. For another angle, switch to a public camera or your own file.练习视频是真实的公共摄像头画面。可选择繁忙、清静,或每 8 秒自动切换,并从该画面截取帧。若要其他角度,请改用另一台公共摄像头或你自己的文件。
สามวิธีนี้ต่างกันตรงสองอย่าง — คุณให้มันอะไร และมันตอบคุณกลับมาแบบไหนThese three differ in two things: what you give it, and what it hands back.
Supervised · คุณให้คำตอบที่ถูกต้องSupervised · you give the right answer
Unsupervised · ให้ภาพโดยไม่บอกชื่อUnsupervised · pictures without labels
Reinforcement · คุณให้คะแนนReinforcement · you give a score
ภาพจริงจากกล้องสาธารณะของมูลนิธิ iTIC ที่แคตตาล็อกนี้ใช้อยู่แล้ว รถแน่น: ถนนพระราม 4 แยกทางด่วนพระราม 4 กรุงเทพฯ · ถนนโล่ง: สามแยกศรีโสธรตัดใหม่–ถนนมหาจักพรรดิ์ ฉะเชิงเทรา ไม่ใช่ภาพวาดReal frames from public iTIC cameras this catalogue already plays. Busy: Rama IV Road at the expressway junction, Bangkok. Quiet: Si Sothon–Mahachak intersection, Chachoengsao. Not a drawing.这些是本目录已在播放的 iTIC 公共摄像头真实画面。繁忙:曼谷拉玛四路与高速公路交叉口。清静:北柳府是素通–玛哈查克路口。不是图画。
ทุกวิธีใช้ MobileNet ที่ฝึกมาแล้วเพื่ออธิบายภาพ จากนั้นเรียนกฎเล็ก ๆ ของบทเรียนนี้ ไม่ได้ฝึกสมองใหญ่ใหม่ ไม่มีการตรวจนับรถหรือควบคุมรถจริง ข้อมูลอยู่ในแท็บนี้ ปิดหน้าแล้วหายAll three methods borrow a pretrained MobileNet to describe each frame, then learn a small rule for this lesson. They do not retrain the large network, count vehicles, or control real cars. Learning stays in this tab and disappears when you leave.
ทั้งสี่ข้างล่างใช้ขั้นตอนเดียวกัน — เปิดภาพ เพิ่มตัวอย่าง ดูมันเดา ฝึก แล้วทดสอบกับกล้องอื่นAll four below run the same steps — open a picture, add examples, watch it guess, train, then test it on another camera
อยากสอนท่ามือให้แล็ปท็อปนั้นอยู่คนละห้อง — ห้อง 04 · สั่งด้วยท่ามือTeaching your laptop a gesture is another room — Room 04 · Gestures
เริ่มที่ “ลองเลย” ได้ทันที หรือเลือกกิจกรรมที่ใช้กล้องของคุณStart with “Try it without a camera”, or choose a camera activity.
ให้เครื่องดูภาพของแต่ละกลุ่ม กด “เพิ่มตัวอย่าง” ตอนที่เห็นสิ่งนั้น ลองเก็บกลุ่มละ 10 ภาพจากหลายมุม แล้วกด “ฝึกแล้วลองทาย”Show it each group. Press “Add example” when that thing is in the picture. Aim for 10 pictures per group from different angles. Then press “Train and try it”.
สอนด้วยกล้องของฉันOpen a picture first — press Teach it with my camera
เบราว์เซอร์จะถาม กดอนุญาตThe browser will ask — allow it
+ เพิ่มตัวอย่าง ของแต่ละกลุ่ม ทีละภาพPress + Add example on each group, one picture at a time
ให้แต่ละกลุ่มต่างมุมและต่างแสงกันVary the angle and the light
ฝึกแล้วลองทาย แถบล่างจึงจะตอบPress Train and try it — now the bottom bar answers
▶ เริ่มเกมนี้ เพื่อทดสอบกับกล้องถนนอื่นPress ▶ Start this game to test it on other road cameras
ภาพจากกล้องเดิมไม่ใช่หลักฐานว่าใช้กับกล้องอื่นได้A new frame from the same camera does not prove it works on another camera
สองแถบนี้คือสองวิธีทายของเครื่อง แถบบนทำงานทันที ไม่ต้องฝึก แถบล่างมีชีวิตขึ้นมาก็ต่อเมื่อกด “ฝึกแล้วลองทาย” แล้วเท่านั้นThese two bars are two ways the machine guesses. The top one works at once, with no training. The bottom one comes alive only after you press “Train and try it”.
ทายทันที — ดูภาพที่คล้ายกันGuesses right away — from similar examples ทายหลังกดฝึกGuesses after you press Trainลองภาพวาดใหม่ที่ไม่ได้ใช้ฝึก แล้วดูคำตอบด้านบน นี่เป็นภาพวาด ไม่ใช่การทดสอบกับถนนจริงTry a new drawing it did not train on. Watch the answer above. These are drawings, not a test on real roads.
คะแนนบอกว่าภาพคล้ายกลุ่มไหน ไม่ได้แปลว่าเครื่องตอบถูกแน่นอน ลองของที่ไม่เคยสอน แล้วดูว่ามันสับสนไหมThe bars show which group looks most similar. A high score can still be wrong. Try something you never taught it and see what happens.
ปุ่มนี้วาดภาพถนนจำลอง “รถแน่น / ถนนโล่ง” ขึ้นมาเอง 16 ภาพ — ไม่ใช่ภาพถ่าย ไม่ได้ใช้กล้อง และไม่มีอะไรออกจากเครื่องคุณ ใช้ดูให้ทุกชิ้นส่วนของหน้านี้ทำงานได้ในคลิกเดียวThis button draws 16 synthetic “busy / empty road” frames itself — not photographs, not from a camera, and nothing leaves your device. It exists so every instrument on this page can move in one click.
อยู่ในแท็บนี้เท่านั้นThis tab only. ตัวอย่างทั้งหมดอยู่ในหน่วยความจำของแท็บนี้ ไม่ได้บันทึกและไม่ได้ส่งไปไหน โหลดหน้าใหม่เมื่อไรก็หายหมด ภาพจากกล้องของคุณประมวลผลในเครื่องนี้เท่านั้นYour examples live in this tab's memory — not saved, not sent anywhere. Reload the page and they are gone. Your camera's picture is processed on this device only.
เริ่มที่กลุ่มละ 10–20 ภาพ และให้ตัวอย่างหลากหลาย ทั้งมุม ระยะ และแสง ถ้าทุกภาพของ “ยกมือ” คุณใส่เสื้อแดง เครื่องอาจเรียนรู้เสื้อแดงแทนมือStart with 10–20 per class and vary them: angle, distance, light. If you wear a red shirt in every “hand up” example, it may learn the shirt instead of the hand.
โครงข่ายนี้ถูกฝึกมาแล้วกับภาพจาก ImageNet กว่าล้านภาพ (Sandler และคณะ, 2018) ระหว่างทาง ชั้นต่าง ๆ ของมันเรียนรู้ที่จะเห็นขอบ ลวดลาย พื้นผิว และส่วนประกอบของสิ่งของ เราขอยืมความรู้นั้นมาทั้งก้อน แล้วฝึกเพียงชั้นสุดท้ายเล็ก ๆ ที่มีน้ำหนัก (ตัวเลขในโมเดลที่การฝึกคอยปรับ) แค่กลุ่มละ 1,280 ตัว บวกอีกหนึ่งตัว ตัวอย่างไม่กี่สิบภาพจึงพอ และฝึกเสร็จในไม่กี่วินาทีแม้บนโทรศัพท์
The network was already trained on more than a million ImageNet photos (Sandler et al., 2018). Along the way its layers learned to pick out edges, textures, patterns and parts of things. We borrow all of that as it is and train only a small last layer: 1,280 weights per class, plus one. A weight is one of the adjustable numbers inside the model that training nudges. That is why a few dozen examples are enough, and why training takes seconds, even on a phone.
จำตัวอย่างไว้ทุกภาพ เมื่อเจอภาพใหม่ ก็หาตัวอย่าง 5 ภาพที่ตัวเลข 1,280 ตัว “ชี้ไปทางเดียวกัน” มากที่สุด แล้วให้มันโหวต ภาพที่คล้ายกว่าได้เสียงมากกว่า วิธีนี้เก่าแก่มาก (Cover และ Hart, 1967) และใช้ได้ทันทีที่คุณเพิ่มตัวอย่าง
Remember every example. For a new picture, find the 5 examples whose 1,280 numbers point most nearly the same way, and let them vote — closer ones count more. The idea is old (Cover & Hart, 1967) and works the instant you add an example.
—
ซ่อนตัวอย่างไว้หนึ่งภาพ ให้ภาพที่เหลือทายว่าเป็นกลุ่มไหน ทำแบบนี้ทีละภาพจนครบ สัดส่วนที่ทายถูกคือการเดาที่ซื่อตรงกว่าว่ามันจะทำได้ดีแค่ไหนกับภาพที่ไม่เคยเห็น แต่ก็ยังเป็นภาพแบบเดียวกับที่คุณถ่ายเท่านั้นHide one example, let the rest label it, and repeat for every example. The share it gets right is a fairer guess at how it will do on pictures it has not seen — though still only pictures like the ones you took.
ชั้นน้ำหนักเดียว (softmax regression — สูตรที่เปลี่ยนตัวเลขดิบเป็นคะแนนของแต่ละกลุ่ม) เริ่มจากค่าสุ่ม แล้วถูกปรับทีละนิด ซ้ำ ๆ ไปเรื่อย ๆ แบบที่เรียกว่าการลดตามความชัน (gradient descent) คือปรับตัวเลขทุกตัวเล็กน้อยในทิศทางที่ทำให้เดาผิดน้อยลง โดยมีวิธี Adam (Kingma และ Ba, 2015) คอยกำหนดว่าแต่ละครั้งจะปรับมากน้อยแค่ไหน จนแยกกลุ่มของคุณออกจากกันได้ กด “ฝึก” แล้วดูเส้นค่าผิดพลาดค่อย ๆ ลดลง ตลอด 200 รอบที่มันไล่ดูตัวอย่างทั้งหมด
One layer of weights (softmax regression — a formula that turns raw numbers into a score for each group) starts random and is nudged a little at a time, pass after pass, in the way called gradient descent: adjust every number a little in whichever direction makes it wrong less often. Adam (Kingma & Ba, 2015) decides how big each nudge is, until it separates your classes. Press Train and watch the loss — one number saying how wrong it is right now — fall, over 200 passes of every example.
ใช้ปุ่มฝึกใต้จอ แล้วลองภาพใหม่เพื่อดูว่ามันเรียนรู้อะไรUse the training button below the demonstration. Then try a new picture to see what it learned.
ความแม่นตรงนี้วัดจากตัวอย่างชุดเดียวกับที่มันใช้เรียน จึงดูดีเกินจริง คะแนนแบบเว้นทีละภาพทางซ้ายเป็นการทดสอบที่ยุติธรรมกว่าAccuracy here is measured on the very examples it learned from, so it flatters. The leave-one-out score is the fairer test.
สอนเรื่องถนนแล้วใช่ไหม? ลองกล้องถนนอื่นอีก 24 ตัว แล้วดูว่ามันสับสนตรงไหน ถ้าสอนเรื่องมือหรือแก้ว ให้ลองภาพใหม่ของมือหรือแก้วก่อน ภาพถนนไม่ใช่ข้อสอบที่เหมาะกับสิ่งที่สอน
Taught it about roads? Try 24 other road cameras. Watch where it gets confused. If you taught it about hands or cups, road pictures will not be a fair test — try new pictures of those things first.
ป้ายสีส้มคือคำตอบที่มั่นใจตั้งแต่ 70% ขึ้นไป ต่ำกว่านั้นเราเขียนว่า “ไม่แน่ใจ”An orange tag means 70% or more for one class; below that we write “unsure”.
อยากใช้สิ่งที่สอนอีกครั้งไหม? บันทึกเป็นไฟล์ไว้ แล้วเปิดกลับมาในหน้านี้ได้ ไฟล์เก็บชื่อกลุ่มและสิ่งที่เครื่องเรียนรู้ แต่ไม่เก็บรูปของคุณ และไม่มีอะไรถูกส่งไปที่อื่น
Want to use what you taught next time? Save it as a file, then open it here later. The file keeps the group names and what the computer learned. It does not keep your pictures. Nothing is uploaded.