<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Super AI Engineer - Medium]]></title>
        <description><![CDATA[โครงการ Super AI Engineer by AIAT เพื่อการพัฒนากำลังคนและสร้างความตระหนักด้านเทคโนโลยีปัญญาประดิษฐ์เพื่อรองรับการเปลี่ยนผ่านของภาคเศรษฐกิจและสังคมจากยุคเทคโนโลยีสารสนเทศไปสู่ยุคปัญญาประดิษฐ์ - Medium]]></description>
        <link>https://medium.com/super-ai-engineer?source=rss----103b05fd72e4---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Super AI Engineer - Medium</title>
            <link>https://medium.com/super-ai-engineer?source=rss----103b05fd72e4---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 30 May 2026 09:18:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/super-ai-engineer" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Introductory of Speech and Signal Processing | Lifelike Speech Synthesis]]></title>
            <link>https://medium.com/super-ai-engineer/introductory-of-speech-and-signal-processing-lifelike-speech-synthesis-380d87d0727d?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/380d87d0727d</guid>
            <category><![CDATA[tts]]></category>
            <category><![CDATA[signal]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[speech-processing]]></category>
            <dc:creator><![CDATA[Prim Wong]]></dc:creator>
            <pubDate>Tue, 31 Aug 2021 11:11:07 GMT</pubDate>
            <atom:updated>2021-08-31T11:11:07.381Z</atom:updated>
            <content:encoded><![CDATA[<h4>Basic Knowledge about Speech Processing and Tacotron2</h4><p>In this emerging technology, we are<strong> Leveraging Machine Learning</strong> with Text to Speech model which is the preferred tools in many services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V1wiIuT1i4jZWZn3cqDFwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*6PypuDQ9vwOEwLaX.png" /></figure><h3>Benefits of Text to Speech</h3><p><strong>Accessibility is Essential</strong></p><p>Text to Speech allows a <em>sensational and lifelike conversation</em> in the nature of how human speaks. Text to Speech can be applied in a<strong> wide range across all industries</strong>, that are aiming to <strong>enhace customer experiences</strong> and <strong>expand to the global market</strong>. With the use of Text To Speech, it is more <strong>user friendly</strong> and <strong>efficient</strong> that could<strong> save your time and money</strong>. Furthermore, text to speech<strong> boost up the effective branding</strong> across all the touchpoints and with the <strong>growth of Eldery users and people with literature issues.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJpNfqMc3JPvVYfhGV54SQ.png" /><figcaption><a href="https://www.readspeaker.com/learn-more/benefits-of-text-to-speech/">Benefits of Text To Speech</a></figcaption></figure><h3>Signal Processing and Wave Knowledges</h3><p>Once we are synthesizing the speech, let’s look at the signal preprocessing stage, it is crucial to understand our dataset before training it.</p><p>We will covered mainly 3 types of the signal waves :</p><ol><li>The waveforms and frequency</li><li>Fourier Transform</li><li>Spectrogram and Mel-Spectrogram</li></ol><h3>Waveforms</h3><p>Waveforms are the signal that have amplitute (loudest) on the y-axis and time domain on the x-axis. Raw audio is a type of the waveforms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Vji8JnX0o0wB0qVR.png" /><figcaption>Waveform | <a href="https://www.storyblocks.com/video/stock/audio-spectrum-line-waveform-animation-on-white-background-byhp0oi-xjir48bix">Credit</a></figcaption></figure><h3>Frequency</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*bBJSJSIOg7hUJdm9" /></figure><h3>Fourier Transform</h3><p>We are decomposing frequency from the original sound wave, to extract more features, learn significant insights from the wave sound and it is much easier to process the wave sound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*PDcZ2pV3pQX3i66D.png" /></figure><p>In a millisecond of the wave signal, there are monochannel and multiple channels (stereo). In order to extract different properties of the sound, we use “<strong>Fourier Transform”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*kN8PGdXmUeuY92r-" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/0*cIqWsFl9x8JLLzAJ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Zc4TTs7m-vlEEJWq.png" /></figure><h3>Spectrograms</h3><blockquote><em>A </em><strong><em>spectrogram</em></strong><em> is a visual representation of the </em><a href="https://en.wikipedia.org/wiki/Spectral_density"><em>spectrum</em></a><em> of </em><a href="https://en.wikipedia.org/wiki/Frequencies"><em>frequencies</em></a><em> of a signal as it varies with time. — wikipedia</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/0*r3rkXXuwvAjwZli5.png" /><figcaption><a href="https://www.youtube.com/watch?v=ijhZR43TOwc">Credit</a></figcaption></figure><p>The mel-spectrogram is manipulating the idea how our ears works, we are taking log or multiplying it to the mel-filterbank, to get the mel — spectogram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*dTAxtUkRDwbmRJ3c.png" /><figcaption>mel spectrogram</figcaption></figure><h4>The journey of the Wave :</h4><ol><li>Raw audio</li><li>Spectrogram ( Raw audio take Furior Transform )</li><li>Mel-Spectrogram (multiply by a <em>log-alike scale </em>called <em>mel-scale</em> which mimics the frequency range of <em>how human’s ears perceive</em>)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*di4mIEkOM-vMFCDY.png" /><figcaption>Journey of the Wave</figcaption></figure><h3>One Full History of TTS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ACBYF5IeWM13e3qW98RlBQ.png" /><figcaption>History of Thai TTS</figcaption></figure><h3>Tacotron2</h3><p>Tacotron 2 is the very natural sounding of synthesizing the speech by using the advancing AI and ML technology by just using the text, without any redundant specifications of the acoustic features.</p><blockquote><em>The Tacotron2 is the neural network model that researchers around the globe aimed for, we are manipulating the most nature, human-liked sound, that was synthesized and without having sophisticated linguistic and acoustic features as input. The input of Tacotron2 is only the sound waves and the script files.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*2Lv096eKAj1LujyM.png" /><figcaption>Input of Tacotron</figcaption></figure><p>Why do we choose tacotron : <strong>The Ease of Data Preparation</strong></p><blockquote>ALL WE NEED to train the model<br>is the AUDIO WAVE and the SCRIPT!</blockquote><h4>Tacotron 2 Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIFX5oW_YoxYi5ifxfjSCQ.png" /><figcaption>Tacotron 2</figcaption></figure><p>Tacotron2 split in 2 main parts :</p><ol><li>Spectrogram Prediction<br>Spectrogram Prediction Network is a seq2seq attention mechanism which combines with Short Time Furior Transform (STFT) and Autoencoder.</li><li>WaveNet vocoder<br>Vocoder (Voice Encoder) is a synthesizer and analyser of the input mel-spectrogram. <a href="https://support.apple.com/guide/logicpro/vocoder-history-lgsifc369a5f/10.6.2/mac/10.15.7">History of Vocoder</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cCpK8lBtqcXlp_xyTUsrJw.png" /><figcaption>Tacotron 2 Architecture</figcaption></figure><h3>Conclusion</h3><h4>Signal Waves</h4><p>There are 3 types of the signal waves :</p><ol><li>The waveforms and frequency</li><li>Fourier Transform</li><li>Spectrogram and Mel-Spectrogram</li></ol><h4>One Full History of Text To Speech</h4><p>Starting from the <strong>Traditional Method</strong> and then enhancing with the Machine Learning approach of text synthesizer with <strong>Wavenet</strong>. During this modern days, we have<strong> Tacotron2</strong> with an <em>exceptional performance</em> and <em>ease of data preparation</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*8nZyZThXPob40LUK5yFNng.png" /></figure><h3>Lifelike Speech Synthesis | Thai Text To Speech with Tacotron2</h3><p><a href="https://prim9000.medium.com/lifelike-speech-synthesis-thai-text-to-speech-with-tacotron2-24460af0b33e">Thai Text To Speech with Tacotron2 | Lifelike Speech Synthesis</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=380d87d0727d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/introductory-of-speech-and-signal-processing-lifelike-speech-synthesis-380d87d0727d">Introductory of Speech and Signal Processing | Lifelike Speech Synthesis</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[True Lab Startup Sandbox Ep.1]]></title>
            <link>https://medium.com/super-ai-engineer/true-lab-startup-sandbox-ep-1-cb5003498bf8?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/cb5003498bf8</guid>
            <category><![CDATA[sandbox]]></category>
            <category><![CDATA[hackaton]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[labeling]]></category>
            <dc:creator><![CDATA[Pawut Jingjit]]></dc:creator>
            <pubDate>Sun, 01 Aug 2021 01:44:11 GMT</pubDate>
            <atom:updated>2021-08-01T01:44:11.203Z</atom:updated>
            <content:encoded><![CDATA[<h4>Hackathon , Naive Solution and Labeling</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e2uNSVDx-XZJzuBS5jrxGQ.jpeg" /><figcaption>ภาพประกอบสวยๆจาก Mr.Kim สมาชิกทีม Deepsec</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ABW2uPKmG1DYMLTGWFrwAw.jpeg" /></figure><blockquote>True Lab Startup Sandbox</blockquote><blockquote>For young startups in robotics and AI</blockquote><blockquote>ภายใต้ Startup Sandbox โครงการ True Lab Startup Sandbox จัดขึ้นเพื่อสตาร์ทอัปยุคใหม่และผู้มีหัวใจผู้ประกอบการที่สนใจด้าน Robotic และ AI เชิญมาร่วม hack idea และคัดเลือกสมาชิกทีมไปกับกลุ่มทรู ทีมที่ผ่านการคัดเลือกจะได้รับทุนพัฒนาต้นแบบและสิทธิในการใช้พื้นที่ทำงานที่ทรู ดิจิทัล พาร์คฟรี ตลอดระยะเวลาร่วมโครงการ และยังได้เป็นสมาชิก co-working space ต่อหลังจบโครงการอีก 3 เดือน รวมเงินรางวัลทั้งสิ้น 1.5 ล้านบาท</blockquote><blockquote>คัดเลือกเข้าร่วม Hackathon (2 วัน 1 คืน ที่ ทรู ดิจิทัล พาร์ค) ทั้งหมด 10 ทีม (ทีมละ 3–5 คน)</blockquote><blockquote>และจะรับเพียง 4 ทีมที่มีผลงานดีที่สุดเข้าร่วมโครงการ</blockquote><h3>Introduction</h3><p>เนื่องด้วยโอกาสที่เจ้าของบทความ ทีม DeepSec ได้มีโอกาสได้รับคัดเลือกในโครงการ True Lab Startup Sandbox จึงอยากจะแชร์ประสบการณ์การแข่งขัน Hackathon ให้เพื่อนๆที่มีความสนใจใน Start Up เหมือนกัน</p><p>โดยการแข่งครั้งนี้จะมาใน Theme ของ Image Recognition และ Speech Recognition</p><p>โจทย์ของ True Lab Startup Sandbox Hackathon จะเป็นเช่นใด ? ทางทีม DeepSec จะมีวิธีการใดแก้ไขปัญหา ? เพื่อนๆสามารถติดตามชมได้พร้อมๆกันเลยครับ</p><h3><strong>Problem</strong></h3><ul><li>ถ้าคุณเป็นเจ้าของธุรกิจจำหน่ายสินค้า เคยไหม? ที่ต้องเดินเช็คของทุก 30 นาที หรือทุกๆครึ่งชั่วโมง เพื่อตรวจสอบสินค้าว่ามีเพียงพอสำหรับการจำหน่ายแก่ลูกค้าหรือไม่</li><li><strong>จะเป็นไปได้หรือไม่ ถ้าจะมีระบบช่วยแจ้งเตือนจำนวนสินค้าที่ใกล้จะหมด ให้กับพนักงานในร้านค้า</strong></li><li>แข่งขันเพื่อสร้างและพัฒนาระบบปัญญาประดิษฐ์สำหรับระบุจำนวนสินค้าบนชั้นวางของ</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5WeeT28KVVL5myuYoaRqiA.png" /><figcaption>ภาพตัวอย่าง เป็นตู้แช่ของ 7/11 (เอ้ะ หรือ BIG-C)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*CT3gmBzcxrFP86Jb89lnVQ.png" /><figcaption>รายละเอียดของ Shelf &amp; Product</figcaption></figure><h3><strong>Data</strong></h3><p>Train Set เป็น Video ~ 15 File ; File ละ 45 ถึง 90 นาที โดยจะเป็นภาพจากกล้อง Video ที่ถ่ายไปยังตู้แช่เช่นเดียวกับภาพตัวอย่าง</p><p>ที่น่าสนใจคือ หลายๆ Video ตำแหน่งของกล้องเป็นคนละมุมกัน (น่าจะมาจากคนละร้าน ) และจำนวนแถวอาจจะไม่ตรงกัน เช่น Video A มีน้ำสิงห์ 3 แถว Video B อาจจะมี น้ำสิงห์ 6 แถวได้</p><p>Test Set เป็น File Image 50 ภาพ โดยจะให้มาในภายหลัง (กลัวว่ามีคนนั่งนับส่ง)</p><h3><strong>Naive Solution</strong></h3><p>ในเมื่อโจทย์ “ต้องการระบุจำนวนสินค้า” ที่วางบนชั้นวางของ เราสามารถมั่นใจได้ ว่า โจทย์นี้เป็น Object Detection อย่างแน่นอน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*FfwGJOHT-SEzzM0_f9pPBA.jpeg" /><figcaption>ใครยังไม่ทราบความแตกต่างระหว่าง Image Classification vs. Object Detection vs. Image Segmentation ต้องไปอ่าน <a href="https://medium.com/analytics-vidhya/image-classification-vs-object-detection-vs-image-segmentation-f36db85fe81">Medium </a>นี้ก่อน</figcaption></figure><p>แต่สังเกตว่า เราไม่สามารถนับว่ามีสินค้าเท่าไหร่ได้ตรงๆ เนื่องจากสินค้าวางซ้อนกัน บางครั้งอาจจะเห็นแค่สินค้าที่วางข้างหน้าสุดเท่านั้น</p><p>เมื่อจินตนาการไปถึงเวลาที่เราเข้าไปใน Super Market หรือ 7/11 สังเกตได้ว่า สินค้ามักจะวางอยู่เต็ม(หรือเกือบเต็ม) เสมอ เนื่องจากมีพนักงานเติมอยู่ตลอด</p><blockquote>เมื่อคิดอย่างไร้เดียงสา(Naive)ที่สุดแล้ว จาก Data ที่ให้ความลึกของ Shelf และ รัศมีของ Product เราสามารถคำนวณได้ว่า “Product A 1 แถว จะมี Product A nชิ้น ”</blockquote><blockquote>เมื่อเราทราบว่า มี Product A m แถว เราจะสามารถทราบได้ว่า มี Product A n*m ชิ้น</blockquote><p>เมื่อลองตรวจ Data ดู พบว่า เมื่อสินค้าหายไปเพียง 4–5 ชิ้น ก็มักจะมีพนักงานมาเติมแล้ว ซึ่งถูกต้องตามสมมุติฐานข้างต้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*o2sEUU1FjTWbkoEGCopUwQ.jpeg" /><figcaption>สังเกตว่า สินค้าหายไปเพียง 4–5 ชิ้น อย่างไรก็ดี ก็มีบางภาพที่หายไปเป็น 10–20ชิ้น แต่ยังถือเป็นส่วนน้อยของภาพทั้งหมด และอย่างที่บอกข้างต้น จำนวนแถวในแต่ละ supermarket อาจจะไม่เท่ากันได้</figcaption></figure><p>โดยการที่สินค้าหายไป 4–5 ชิ้น เทียบกับสินค้าที่นับถูกประมาณ 100–150 ชิ้น คิดเป็น Accuracy ประมาณ 95% ซึ่งถือว่าเป็น Accuracy ที่ดีมากสำหรับ Naive Solution</p><p><em>Pipeline แรก สำหรับโจทย์ข้อนี้จึงเป็น “Product A1 — A10 มีชนิดละกี่แถว?”</em></p><h3><strong>Labeling Policy</strong></h3><p>ปัญหา Labeling ที่มักจะเกิดขึ้นคือ เราไม่ได้วางนโยบาย(Policy) ที่ดีพอ ส่งผลให้ Data ที่แต่ละคน Label มา มีลักษณะไม่เหมือนกัน ซึ่งถ้า Model ไป Train อาจจะเกิดปัญหาได้ ( Garbage in , Garbage out )</p><p>ซึ่ง Policy ที่ทีมวางไว้คือ</p><ul><li>Label เฉพาะขวดที่เห็นเต็มๆ ข้างหน้าสุด</li><li>ถ้าขวดแรกถูกหยิบไป ให้ Label ขวดที่ 2 ( ในกรณีนี้ จะเห็นแบบเต็มขวด เพราะไม่มีขวดที่วางข้างหน้า )</li></ul><p>โดยไม่รู้ตัวเลยว่า Policy ที่วางไว้โดยไม่ละเอียดพอ จะทำให้เกิดปัญหาในภายหลัง</p><h3><strong>รู้จักกับ “เครื่องมือสร้าง Annotations” (Annotation tools)</strong></h3><p>เพราะ Object Detection เป็นการหาว่า “Object ที่สนใจ อยู่ส่วนไหนของภาพ” Label(คำตอบ) ของ Object Detection ย่อมเป็น “ตำแหน่ง X,Y ของมุมทั้ง 4 ของ Object ที่สนใจ”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*rypfqkwPkYnPbnn4Xiv-Uw.png" /><figcaption>ตัวอย่าง YOLO format : ชนิดของ &lt;object-class&gt; , &lt;x&gt; ,&lt;y&gt; &lt;width&gt; &lt;height&gt; สังเกตว่า อาจจะไม่ใช่ 4 มุมตรงๆ แต่เป็นค่าที่แสดงถึง 4 มุมของ Object นั้นๆได้</figcaption></figure><blockquote>ถ้าคำตอบของ Image Classification เรียกว่า “Label” เราจะเรียกคำตอบของ Object Detection ว่า “Annotations”</blockquote><p>ปัจจุบัน เครื่องมือในการสร้าง Annotations มีอยู่หลายตัวเช่นกัน ที่ถูกพูดถึงมากที่สุด คงจะเป็น labelme ที่ เล็ก , ติดตั้งได้ง่าย , ทำงานได้หลายระบบปฏิบัติการ</p><p>เพื่อป้องกันความยุ่งยาก เมื่อมีการ Labeling มากกว่า 1 คน ทั้งเรื่องการแจกจ่ายงาน การรวมไฟล์ที่ Label แล้ว ทางทีมจึงตัดสินใจที่จะใช้ CVAT ซึ่งเป็น Online Annotations Tools</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*gyw7_0qdvEaQXZcpmXEUkQ.png" /><figcaption>ใช้ CVAT เพราะเซิร์ซ google ขึ้นชื่อแรก // จริงๆคือเป็น Tools ที่เขาแนะนำใน Super AI แต่จริงๆ Tools ไหนก็ทำงานได้ใกล้เคียงกันนะ</figcaption></figure><h3><strong>ปัญหาของการ Labeling Data</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*AY30phqH4caMfjafR-V3LQ.png" /><figcaption>Tips for Best Training Results จาก YOLOV5 ต้องใช้มากกว่า 1500 Images per class , 10000 instances per class</figcaption></figure><p>เนื่องจาก สมาชิกมี 5 คน แบ่งกันคนละ 300 Images , 1 Images มี 30 Instances+ (นับจากภาพตัวอย่าง) สรุป 1 คนทำ Annotations 9,000 Instances</p><blockquote>1 Annotations ใช้เวลาไวที่สุดคือ 2 วินาที สมมุติว่าทำได้ด้วยความเร็วแบบไม่มีตกเลย ต้องใช้ 18,000 วินาที หรือ 5 ชั่วโมง/คน</blockquote><p>นี่มัน Hackathon หรือคำสาปแห่งซิซีฟิส (<em>Sisyphus) </em>ทางทีมจึงเสนอ ลดงานเหลือ 1/2 (ราวๆ 750 Images ) ซึ่งแน่นอนว่า ทุกคนในทีมเห็นพ้องต้องกัน</p><p>ซึ่งกรณีนี้ แต่ละภาพใน Train Set มีหน้าตาใกล้เคียงกันมาก (มาจาก Video เพียง 15 File หมายความว่ามีอย่างมากที่สุด 15 มุมกล้อง ) การจะ Train ภาพที่ใกล้เคียงกันมากๆ อาจไม่มีความจำเป็นขนาดนั้น การลด Train Images ลงครึ่งนึง จึงดูเป็นเหตุผลที่รับได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*VeuffECsuwUi4Wg3JoJ-nw.jpeg" /><figcaption>ซิซีฟัส (Sisyphus) ผู้ถูกฮาเดสลงโทษ ให้กลิ้งก้อนหินก้อนใหญ่ขึ้นไปบนยอดเขาทาร์ทารัส แล้วกลิ้งลงมาทับเขาอีก และยังถูกบังคับให้กลิ้งหินขึ้นไปอีกเป็นอย่างนี้ไม่มีที่สิ้นสุด</figcaption></figure><p>อย่างไรก็ดี การ Label อย่างต่อเนื่อง 2.5 ชั่วโมง ก็ยังเป็นงานที่ค่อนข้างหนัก โชคดี CVAT มีเครื่องมือที่ชื่อ “Propagate” ที่สามารถ “ส่งต่อ” Annotations ของภาพหนึ่งๆ ไปภาพอื่นได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Ylla8yUBghvZ1o_kG5vNw.png" /><figcaption>แทนที่จะ Annotations 30 ขวด ในภาพขวามือ เราสามารถ ใช้ Annotations ของภาพ ซ้าย แล้วแก้ขวดในวงแดง แค่ 3–4 ขวดแทนได้</figcaption></figure><p>ด้วยวิธีดังกล่าว สามารถลดเวลา Label เหลือแค่ประมาณ 1 ชม. เท่านั้น (งานลดลง แต่ท้ายที่สุด ต้องใช้เวลาในการตรวจเช็คผลลัพท์ของการ Propagate)</p><h3>บทส่งท้าย</h3><p>ผ่านมาครึ่งทางแล้วกับบทความนี้ สังเกตว่ายังไม่มีการพูดถึง Model ที่ใช้เลย (ไม่มีแม้แต่การ Coding) ซึ่งจริงๆแล้ว การตั้งคำถาม , การคิดวิธีในการแก้ไขปัญหา , การจัดการ Data (Pre-process) นั้นสำคัญไม่แพ้การสร้าง Model หรือ Coding เลย</p><p>หลังจาก Naive Solution แล้ว ทีม Deep Sec จะใช้วิธีการใด , ใช้ Model ตัวใด สามารถติดตามได้ในบทความต่อไปนะครับ</p><p>ส่วนเพื่อนๆที่สนใจโครงการนี้ ในวันนี้(7/30/2021) ทางโครงการ True Lab Startup Sandbox ได้มีการรับสมัครรุ่นที่ 2 แล้ว ซึ่งคราวนี้ มีในธีม Business Analytics สามารถฟอร์มทีมแล้วเริ่มสมัครกันได้เลย สามารถอ่านรายละเอียดเพิ่มเติมได้ที่ <a href="https://bit.ly/3wUkPQW?fbclid=IwAR27g6FHNRlmD1W6g8oxsiWwou0qM3QyDmwiyV3AigqNKFCbBUHTE27GrxY">https://bit.ly/3wUkPQW</a></p><p>หรือทาง Fanpage <a href="https://www.facebook.com/TrueDigitalPark">https://www.facebook.com/TrueDigitalPark</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*JoPhAEwrdNX1HgO80lTrDw.jpeg" /><figcaption>เพื่อนๆคนใด มีแผนธุรกิจในใจอยู่แล้ว สามารถจับมือกับสหาย Data Analyst แล้วสมัครโครงการนี้ได้เลย เจ้าของบทความมองว่า ได้มีโอกาสทดสอบว่าแผนธุรกิจของตัวเองเจ๋งพอไหม เอาแผนมาให้ผู้เชี่ยวชาญสับเล่นๆก็คุ้มแล้ว ได้ทำโจทย์สนุกๆ นอกจากนี้ยังได้ Connection ดีๆในงานอีกด้วย</figcaption></figure><h4>Ref</h4><p>YOLO Format <a href="https://github.com/AlexeyAB/Yolo_mark/issues/60">https://github.com/AlexeyAB/Yolo_mark/issues/60</a></p><p>LabelMe <a href="https://github.com/wkentaro/labelme">https://github.com/wkentaro/labelme</a></p><p>YOLOV5 ,Tips for Best Training Results <a href="https://github.com/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results">https://github.com/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results</a></p><p>Sisyphus <a href="https://en.wikipedia.org/wiki/Sisyphus">https://en.wikipedia.org/wiki/Sisyphus</a></p><p><a href="https://www.facebook.com/TrueDigitalPark">https://www.facebook.com/TrueDigitalPark</a></p><p><a href="https://medium.com/analytics-vidhya/image-classification-vs-object-detection-vs-image-segmentation-f36db85fe81">https://medium.com/analytics-vidhya/image-classification-vs-object-detection-vs-image-segmentation-f36db85fe81</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb5003498bf8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/true-lab-startup-sandbox-ep-1-cb5003498bf8">True Lab Startup Sandbox Ep.1</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to set up Jupyter Lab on Huawei cloud]]></title>
            <link>https://medium.com/super-ai-engineer/how-to-set-up-jupyter-lab-on-huawei-cloud-fa959f530809?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/fa959f530809</guid>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[huawei]]></category>
            <dc:creator><![CDATA[Pawut Jingjit]]></dc:creator>
            <pubDate>Fri, 09 Jul 2021 07:49:31 GMT</pubDate>
            <atom:updated>2021-07-09T07:49:31.888Z</atom:updated>
            <content:encoded><![CDATA[<h4>วิธีการติดตั้ง Jupyter Lab บน Huawei Cloud</h4><p>สำหรับงานสาย <em>Data Sci</em> หรือ <em>Hackathon</em> ก็ตามที เพื่อนๆมักคุ้นชินกับ การใช้ <em>Google Colab</em> หรือการทำบน <em>Localhost</em> ใช่ไหม</p><p>ซึ่งในหลายๆงาน ไม่ว่าจะเป็นงานวิจัย หรือ <em>Hackathon </em>มักจะมี <em>Cloud </em>ให้ใช้ หลายๆคนอาจจะไม่คุ้นชิน ซึ่งคงเป็นเรื่องที่น่าเสียดายมาก ถ้า Facility ที่ได้มาให้คุ้ม</p><p>อนึ่ง จริงๆ Cloud ไม่ว่าจะเป็น GCP , AWS , Huawei ก็ Setting คล้ายๆกัน (เพราะเป็น Ubuntu ) บทความนี้จึงสามารถปรับใช้กับ GCP , AWS ได้อีกด้วย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8HzbzsNntwPUMWH9eCBuFw.jpeg" /></figure><p><strong>TL;NR</strong></p><ul><li>ใน <em>Windows OS</em> เราสามารถใช้ <em>Bitvise </em>แทน <em>Putty </em>, <em>FileZilla </em>ได้</li><li><em>Jupyter Lab</em> มีบน <em>Anaconda Version</em> ใหม่ ซึ่งจริงๆ เราสามารถ <em>Download &amp; Install Anaconda</em> ก็สามารถใช้ <em>Jupyter Lab</em> ได้เลย</li><li>Anaconda Version ใหม่ set Path ให้เราเองเวลา Install ไม่ต้องไปแก้ <em>.bashrc</em> อีกต่อไป</li><li>เพื่อที่จะเรียก <em>Jupyter Lab </em>บน<em> Server </em>จากเครื่องเราได้ ต้องทำการ<em> Bind IP</em> ก่อน</li></ul><p><strong>0. รู้จักกับ Bitvise</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*SgZGHRzZ8NcIUQPyQJQOAw.jpeg" /></figure><p>ปกติเราจะใช้การ SSH (Secure Shell) ผ่าน CMD กันใช่ไหม แต่ SSH ของ window จะ Disconnect เอง เมื่อไม่ได้รับ Response ในระยะเวลาหนึ่ง</p><p>หลายๆคนอาจจะแก้ปัญหา ด้วยการใช้ <em>Putty </em>แทน ซึ่งสามารถใช้แทน SSH บน CMD ได้</p><p>แต่ตัว Putty ไม่สามารถ FTP ได้ จึงต้อง FTP ผ่าน FileZilla แทน แต่หมายความว่า เราต้อง Login 2 Program ซึ่งถือว่ายุ่งยากระดับหนึ่ง ( แล้วตัว Putty กับ FileZilla นี่ไม่ได้ใช้ง่ายนะ ใช้ครั้งแรกต้องมางมแน่ๆ )</p><p>ผู้เขียนบทความจึงเสนอให้ใช้ <em>Bitvise </em>แทน โดยสามารถเป็นได้ทั้ง FTP และ SSH ซึ่ง UX&amp;UI ถือว่าใช้ง่ายอย่างสุดๆ ประเภทที่ ใส่ HOST , Username , Password (Port ก็ไม่ต้องใส่ ถ้าเป็น default) ก็สามารถใช้ได้ทันที</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*SEJAwirKWl6GAthyUjbH8g.png" /><figcaption>Just Login &amp; get terminal , port ยังไม่ต้องใส่เลย</figcaption></figure><p>อนึ่ง OSX , Linux ไม่มี <em>Bitvise </em>ใครใช้ระบบดังกล่าว ต้องใช้วิธี SSH , FTP แบบเดิม</p><p><strong>1. Install Anaconda</strong></p><p><strong>1.1 Download Anaconda</strong></p><p><em>Anaconda</em> เป็น<em> Starter Package</em> ของ <em>Python </em>ส่วนตัวผู้เขียนบทความ <em>Download </em>ด้วย <strong>wget </strong>ผ่าน <a href="https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/">tsinghua.edu</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58e7beac4dd491525257bc90bada219b/href">https://medium.com/media/58e7beac4dd491525257bc90bada219b/href</a></iframe><p>โดยให้เลือก Download Link ที่เป็น <a href="https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh">Linux-x86_64.sh</a> เพราะเราทำงานบน<em> Ubuntu-64bit</em></p><p>อย่างไรก็ตาม ถ้า <a href="https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/">tsinghua.edu</a> เกิดเข้าไม่ได้หรือไม่อัพเดท เพื่อนๆยังสามารถ Download ผ่าน <a href="https://www.anaconda.com/">Official Website</a> ได้</p><p><strong>1.2 Install Anaconda</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb67d65b2ef523590a8c9778c62a3c98/href">https://medium.com/media/eb67d65b2ef523590a8c9778c62a3c98/href</a></iframe><p>สำคัญ ถ้าเป็น Version เก่าๆ เราจะต้อง set enviroment path เอง แต่ถ้า version ใหม่ Anaconda จะถามว่า จะให้ set Enviroment path ไหม ให้ตอบ yes ไป</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/660e85d2ef24530020786c86efb84817/href">https://medium.com/media/660e85d2ef24530020786c86efb84817/href</a></iframe><blockquote>สำคัญ เวลา set Enviroment Path ทุกครั้ง ต้อง Restart Terminal ่ด้วย(ในที่นี้คือปิดแล้วเปิดใหม่)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*y4Ue0EzpoFLQ1c7J2TaWEQ.png" /><figcaption>เมื่อลงเสร็จ ถ้าใช้ conda -V ได้ ถือว่าลงได้ถูกต้องแล้ว</figcaption></figure><p><strong>2. Install Jupyter lab</strong></p><p>Anaconda version ใหม่ๆ ปกติจะติดตั้ง Jupyter Lab ให้แล้ว สามารถทดสอบเปิดได้ผ่านคำสั่งด้านล่าง</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b08bef9641430e983e917c40dcab199/href">https://medium.com/media/2b08bef9641430e983e917c40dcab199/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/954da40adb1202d3271c530ca86d11ca/href">https://medium.com/media/954da40adb1202d3271c530ca86d11ca/href</a></iframe><p><strong>3. Binding IP</strong></p><p>ก่อนจะไปขั้นตอนต่อไป ต้องเข้าใจเรื่อง <em>Inbound &amp; Outbound</em> ก่อน</p><p>เมื่อเราเรียก <em>Jupyter Lab</em> ผ่าน localhost:8000 ซึ่ง Port 8000 ถือเป็น Inbound เพราะเรียกจาก Host เอง</p><p>ทางกลับกัน สมมุติเราเรียก SSH ผ่าน ssh user@IP -p 26 , Port 26 นี้ ถือเป็น <em>Outbound</em> เพราะถูกเรียกจาก Client -&gt; Host</p><blockquote>Inbound Port, Outbound Port ถือว่าเป็นคนละ Port กัน การที่เรา Mapping Outbound Port : Inbound Port เรียกว่า “การ Bind IP”</blockquote><p>ในที่นี้ เมื่อเราต้องการเรียกใช้งาน Jupyter Lab จาก Server สังเกตว่าเป็นการเรียก <em>Outbound Port</em> ของ Client ไป<em> Inbound Port</em> ของ Server ในกรณีนี้ ถึงต้อง Bind IP</p><p><strong>ซึ่งวิธีที่ง่ายที่สุด คือ แก้ config บนใน file jupyter_notebook_config.py</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b810deae61b9d714817bdd815ac73e50/href">https://medium.com/media/b810deae61b9d714817bdd815ac73e50/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40bc890152b6a33c7f5a417add9c7aa8/href">https://medium.com/media/40bc890152b6a33c7f5a417add9c7aa8/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e61b63197ae9d3b7e516a8131f9ebad/href">https://medium.com/media/1e61b63197ae9d3b7e516a8131f9ebad/href</a></iframe><p><strong>4. Start Jupyter Lab Server</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*boLXlep4Qm1jfGeSA42kiA.png" /><figcaption>เมื่อรัน command jupyter lab อีกครั้ง ถ้า Jupyter Server ทำงานบน NameServer@PORT ถือว่าทำงานได้แล้ว (ถ้าไม่ bind IP จะทำงานบน localhost@PORT) สังเกต token =?? ซึ่งเราจะใช้ token นี้ในขั้นตอนถัดไป</figcaption></figure><p>จากนั้น เราจะสามารถเรียก IP.huawei.cloud@8080 ผ่าน Web Browser ได้แล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ESj6nay9Zjdh1Q79CuzDJw.png" /><figcaption>สังเกตช่อง token เราสามารถนำ token จากขั้นตอนที่ผ่านมาใส่ แล้ว login ได้เลย <strong>โดยขั้นตอนนี้ต้องใช้ IP ของ huawei cloud เท่านั้น ไม่สามารถใช้ servername:PORT ได้</strong> ซึ่งเจ้าของบทวามยังหาวิธีแก้ปัญหาไม่เจอ //อ้าว</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hulzBtk9B8-x8F5WrL9zFA.png" /><figcaption>ถ้าทำทุกอย่างถูกต้อง เราจะสามารถใช้ jupyter lab บน Huawei Cloud ได้แล้ว</figcaption></figure><p>หลังจากนี้ก็สามารถใช้ Conda Install เพื่อติดตั้ง Package ที่จำเป็นเหมือนที่เพื่อนๆเคยทำได้เลย</p><p>ในส่วนท้ายของบทความนี้ ต้องขอขอบคุณทาง <a href="https://www.huaweicloud.com/intl/en-us/">Huawei Cloud</a> และ <a href="https://www.truedigitalpark.com/truelabstartupsandbox">True Lab Startup Sandbox</a> ที่จัดการแข่งขันที่น่าสนใจ และเพื่อนๆที่อ่านบทความนี้จนจบด้วยนะครับ</p><p>PS.เพื่อนๆที่เซิร์ซเจอบทความนี้ ต้องกำลังแข่ง Hackathon อยู่อย่างแน่นอน (เหมือนเจ้าของบทความในวันนั้น) ขอให้เพื่อนโชคดีกับการแข่งนะครับ</p><p><strong>Ref</strong></p><p><a href="https://www.programmersought.com/article/47726882708/">https://www.programmersought.com/article/47726882708/</a></p><p><a href="https://stackoverflow.com/questions/18675907/how-to-run-conda">https://stackoverflow.com/questions/18675907/how-to-run-conda</a></p><p><a href="https://stackoverflow.com/questions/1621457/about-ip-0-0-0-0-in-django">https://stackoverflow.com/questions/1621457/about-ip-0-0-0-0-in-django</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa959f530809" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/how-to-set-up-jupyter-lab-on-huawei-cloud-fa959f530809">How to set up Jupyter Lab on Huawei cloud</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speech Projects — Acoustical Work]]></title>
            <link>https://medium.com/super-ai-engineer/speech-projects-acoustical-work-8cc4a9a4c3af?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/8cc4a9a4c3af</guid>
            <category><![CDATA[speech]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[asr]]></category>
            <dc:creator><![CDATA[Prim Wong]]></dc:creator>
            <pubDate>Fri, 09 Jul 2021 07:49:17 GMT</pubDate>
            <atom:updated>2021-07-09T07:49:18.630Z</atom:updated>
            <content:encoded><![CDATA[<h3>Speech Projects — Acoustical Work</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CdAILUz9Yc7vTHud.jpeg" /><figcaption>Wavenet</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/0*0OQ7b4KrvA0a9YmW.jpg" /></figure><p>Communication is extremely important! The easiest and quickest ways to communicate and understand each other is the “speech”. :)</p><blockquote><strong>1. Generate</strong></blockquote><blockquote><strong>2. Recognize</strong></blockquote><blockquote><strong>3. Analysis</strong></blockquote><h3>1. How to apply machine learning and deep learning methods to audio analysis</h3><p>Audio Analysis — &gt;</p><p>Machine Learning for Audio: Digital Signal Processing, Filter Banks, Mel-Frequency Cepstral Coefficients</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UHezNvLvmDLwTup0" /><figcaption>Example waveform of an audio dataset sample from UrbanSound8k</figcaption></figure><h3>DCT for Speech Signal Compression</h3><p><a href="https://www.mathworks.com/help/signal/ug/dct-for-speech-signal-compression.html">DCT for Speech Signal Compression</a></p><p><a href="https://www.researchgate.net/publication/301552643_Audio_and_Speech_Compression_Using_DCT_and_DWT_Techniques">https://www.researchgate.net/publication/301552643_Audio_and_Speech_Compression_Using_DCT_and_DWT_Techniques</a></p><h3><strong>Mel- frequency Cepstrum MFCC</strong></h3><p>Mel Frequency Cepstral Coefficients (MFCCs)</p><p>MFCC is used for the process of feature extraction where a more compact and less redundant of the representative voice can be obtained from the input voice</p><p>Filter bank — Compressed Spectrogram manipulate our ear</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hu-s8G66ygQfwOYfyVTEbQ.png" /><figcaption>MFCC</figcaption></figure><p>Speech recognition is still a growing field. … Fast Fourier Transform (FFT) is the traditional technique to analyze frequency spectrum of the signal in speech recognition.</p><h3>Wavenet</h3><h3>Conditional WaveGAN Explained</h3><ul><li><a href="https://medium.com/@chaeyoung.lee/conditional-wavegan-explained-1c2a87e8d84d">Conditional WaveGAN Explained</a></li><li><a href="https://github.com/chaeyoung-lee/cwavegan">chaeyoung-lee/cwavegan</a></li></ul><h3>NGC</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D4sM46VSIVlQQ10Ri4KCRw.png" /></figure><p><a href="https://ngc.nvidia.com/catalog/collections/nvidia:speechsynthesis">NVIDIA NGC</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7p9RodczJj1VbkyqzwD3w.png" /></figure><h3>Real Time Cloning</h3><p><a href="https://github.com/CorentinJ/Real-Time-Voice-Cloning">GitHub - CorentinJ/Real-Time-Voice-Cloning: Clone a voice in 5 seconds to generate arbitrary speech in real-time</a></p><iframe src="https://drive.google.com/viewerng/viewer?url=https%3A//arxiv.org/pdf/1806.04558.pdf&amp;embedded=true" width="600" height="780" frameborder="0" scrolling="no"><a href="https://medium.com/media/2eb8717365fd7b0e96065a81c202c07d/href">https://medium.com/media/2eb8717365fd7b0e96065a81c202c07d/href</a></iframe><h3>Dog voice Identification</h3><p><a href="https://ieeexplore.ieee.org/document/6257264">Dog voice identification (ID) for detection system</a></p><p><a href="https://www.researchgate.net/publication/261394450_Dog_voice_identification_ID_for_detection_system/link/548e989a0cf214269f244515/download">https://www.researchgate.net/publication/261394450_Dog_voice_identification_ID_for_detection_system/link/548e989a0cf214269f244515/download</a></p><h3>Automatic Cry Recognition</h3><p>Baby voice Detection</p><h3>Voice Synthesis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4mQ8b1NuttgTmZCNDqpPA.png" /></figure><p><em>Mean Opinion Score (MOS) for each voice. Test subjects ranked each voice on a scale of 1–5 according to how much it sounded like natural speech.</em></p><p>Conditional Voice Synthesis</p><h3>Pixel Recurrent Neural Networks</h3><p><a href="https://arxiv.org/abs/1601.06759">Pixel Recurrent Neural Networks</a></p><h3>Keywords from the Meeting</h3><p>Low pass feature</p><p>Fourier Transform and then transform back</p><p>THAI SER</p><p>IEMOCAP</p><p>Speech Emotion Recognition IEMOCAP</p><p>— -</p><p>CSTR voice cloning toolkit (VCTK)</p><p>44 hours from 109 speakers</p><p><a href="https://www.researchgate.net/publication/346248936_Non-parallel_Voice_Conversion_based_on_Hierarchical_Latent_Embedding_Vector_Quantized_Variational_Autoencoder">https://www.researchgate.net/publication/346248936_Non-parallel_Voice_Conversion_based_on_Hierarchical_Latent_Embedding_Vector_Quantized_Variational_Autoencoder</a></p><ul><li><a href="https://arxiv.org/abs/1901.08810">Unsupervised speech representation learning using WaveNet autoencoders</a></li><li><a href="https://arxiv.org/abs/1906.00446">Generating Diverse High-Fidelity Images with VQ-VAE-2</a></li><li><a href="https://arxiv.org/abs/1711.00520">Uncovering Latent Style Factors for Expressive Speech Synthesis</a></li><li><a href="https://google.github.io/tacotron/publications/uncovering_latent_style_factors_for_expressive_speech_synthesis/index.html">Audio samples from &quot;Uncovering Latent Style Factors for Expressive Speech Synthesis&quot;</a></li><li><a href="https://arxiv.org/abs/1609.03499">WaveNet: A Generative Model for Raw Audio</a></li></ul><h3>TenserFlow TTS(Text to Speech)</h3><ul><li><a href="https://github.com/chaeyoung-lee/cwavegan/tree/master/data">chaeyoung-lee/cwavegan</a></li><li><a href="https://www.tensorflow.org/datasets/catalog/ljspeech">ljspeech | TensorFlow Datasets</a></li><li><a href="https://arxiv.org/abs/1703.10135">Tacotron: Towards End-to-End Speech Synthesis</a></li><li><a href="https://github.com/tensorspeech/TensorFlowTTS/tree/master/examples/multiband_melgan">TensorSpeech/TensorFlowTTS</a></li><li><a href="https://colab.research.google.com/drive/1YpSHRBRPBI7cnTkQn1UcVTWEQVbsUm1S?usp=sharing#scrollTo=hKTW94-bWK8O">Google Colaboratory</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cc4a9a4c3af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/speech-projects-acoustical-work-8cc4a9a4c3af">Speech Projects — Acoustical Work</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Graph Algorithms]]></title>
            <link>https://medium.com/super-ai-engineer/graph-algorithms-a233662da9af?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/a233662da9af</guid>
            <category><![CDATA[minimum-spanning-tree]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[shortest-path]]></category>
            <category><![CDATA[graph]]></category>
            <dc:creator><![CDATA[Prim Wong]]></dc:creator>
            <pubDate>Fri, 09 Jul 2021 07:49:08 GMT</pubDate>
            <atom:updated>2021-07-09T07:49:12.615Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we will talk about algorithms in graphs. There are various problems that can be solved by using a Graph search.</p><ol><li>Initially, we have to know about Graph</li><li>Graph traversal — look through the nodes in the Graph</li><li>In the first word, we will talk about MST (Minimum Spanning Tree)</li><li>The next algorithm will be the shortest path algorithms.</li></ol><h3>Graph Knowledges</h3><p>As we know in our secondary schools, we all have learnt about graphs. There are many types of graph, but today we will talk about path. The famous problems about Königsberg brides, with 7 paths. Such as the <strong>Euler rule </strong>of the Königsberg bride. Have you remembered?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*-M0H_-z8FleoIUaF" /><figcaption>Seven Bridges of Königsberg</figcaption></figure><blockquote>How could you travel to these islands without crossing the same bride twice?</blockquote><p>When will look at graph types :<br>There are Nodes and Edges,</p><ul><li>Nodes (vertices in the graph)</li><li>Edges</li></ul><p>There are several ways in representing data in graph</p><ol><li>Matrix Representation</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/0*oh8ZvjLhsLyScj-R.jpg" /><figcaption>Matrix Representation</figcaption></figure><p>2. Adjacency list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lA0v-WfWUswpxPcf.png" /><figcaption>Adjacency list (linked-list)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*POMrRGOJ_gm1PM2V" /><figcaption>Weighted vs unweighted Graph</figcaption></figure><p>Furthermore, there are various types of the graph such as the weighted and unweighted graph. Imagine about travelling between two towns, in each road there must be the different distance. Therefore, it shown that every route is not the same (have different weight) and we should “considered” when choosing the path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/0*f0SibzVBwaJ13cjp.png" /><figcaption>Directed and Undirect Graph</figcaption></figure><p>Directed and undirected graph<br>When we are travelling, there might be some more factors, not every road is expressway. The expressway are called the undirected graph, which means that we could travel back and front in that path. On the contraty,</p><h3>Graph Traversal</h3><p>Let’s Traverse in the Graph!</p><h4>Depth First Search</h4><p>We will traverse in the graph, by going in <strong>depth</strong> first. Therefore, this types of traverse is <em>Depth First Search</em> or <em>DFS</em>. There are 2 ways to code the Depth First Search; by using <strong>stack</strong> and <strong>recursive function</strong>.</p><p>DFS Implementation using recursive function (code in c++) :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9710fcb29ef30e84fe5c3cbdc0f0c2a1/href">https://medium.com/media/9710fcb29ef30e84fe5c3cbdc0f0c2a1/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*asL_Ahva34biiTaU.gif" /></figure><p>DFS Implementation using stack (code in c++) :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/849f6f7d5edd6c25ec95f673dcfc5781/href">https://medium.com/media/849f6f7d5edd6c25ec95f673dcfc5781/href</a></iframe><p><a href="https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/">Depth First Search or DFS for a Graph - GeeksforGeeks</a></p><h4>Breadth First Search</h4><p>We will search the graph by the Breadth, this will traverse through the nearer nodes first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*0F0J5FaNeE911qm1.png" /></figure><p>BFS Implementation using queue (code in c++) :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f03ec5f00ab2d602747cac5d1965f51c/href">https://medium.com/media/f03ec5f00ab2d602747cac5d1965f51c/href</a></iframe><h4>Mahattan Distance</h4><p><a href="https://cs50.harvard.edu/ai/2020/notes/0/">Lecture 0 - CS50&#39;s Introduction to Artificial Intelligence with Python</a></p><h3>Minimum Spanning Tree</h3><p>Minimum Spanning Tree’s aim is to : <br>connect all the nodes in the graph with the shortest distance.</p><p>In the minimum spanning tree, there must be only <strong><em>n-1 edges</em></strong><em> </em>when there is only <strong><em>n nodes</em></strong>.</p><h4>The Prim algorithm</h4><ul><li>2 subsets ( in MST or not)</li><li>find the least weight to join the MST</li></ul><ol><li>Find the starting node</li><li>look through <strong>all the edges</strong> that connected to the nodes in MST</li><li>Select the <strong>least weight</strong> in all the edges.</li><li>Join the node in <strong>MST</strong></li><li>Loop to all nodes until <strong>every nodes</strong> are in the MST</li></ol><p>These are the vectors that we have to create :<br>1. Parent [NULL]<br>2. Visited [false]<br>3. Key [infinity] (Distance from the first nodes) <br> We will updates new weight (key) when it’s less than the previous key’s value.</p><p>Prim MST Implementation using priority queue (code in c++) :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/187e21c52f50b5b9223bd5f70813f8cc/href">https://medium.com/media/187e21c52f50b5b9223bd5f70813f8cc/href</a></iframe><p><a href="https://www.geeksforgeeks.org/prims-minimum-spanning-tree-mst-greedy-algo-5/">Prim&#39;s Algorithm for Minimum Spanning Tree (MST) - GeeksforGeeks</a></p><p><strong>The Kruskal Algorithm</strong></p><ul><li>sort all the paths</li><li>select the least weight</li><li>join the graph if the nodes aren’t in the same subset</li></ul><p>UNION and FIND methods :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b9f78031edb10a387603bd821266fb1/href">https://medium.com/media/2b9f78031edb10a387603bd821266fb1/href</a></iframe><h4>Boruvka’s algorithm</h4><p><a href="https://en.wikipedia.org/wiki/Bor%C5%AFvka%27s_algorithm#/media/File:Boruvka&#39;s_algorithm_(Sollin&#39;s_algorithm)_Anim.gif">Borůvka&#39;s algorithm - Wikipedia</a></p><blockquote>1) Input is a connected, weighted and un-directed graph.<br>2) Initialize all vertices as individual components (or sets).<br>3) Initialize MST as empty.<br>4) While there are more than one components, do following<br> for each component.<br> a) Find the closest weight edge that connects this <br> component to any other component.<br> b) Add this closest edge to MST if not already added. <br>5) Return MST.</blockquote><p><a href="https://www.geeksforgeeks.org/boruvkas-algorithm-greedy-algo-9/">Boruvka&#39;s algorithm | Greedy Algo-9 - GeeksforGeeks</a></p><h3>Shortest Path</h3><p>Finding the shortest path between two distances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DuyVsQpXe6Zj0lLO.png" /></figure><h4>Dijkstra Algorithm</h4><p>Like Prim algorithm, will the note of keeping in mind the distance that have traverse through the whole graph.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/df7ab327dfd9143009ac08f133deeeea/href">https://medium.com/media/df7ab327dfd9143009ac08f133deeeea/href</a></iframe><h4>Bellman Ford Algorithm</h4><p>Using Dynamic Programming Approach</p><h3>Graph Neural Network</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lyiocqy9t06l_3uEVVLRRw.png" /><figcaption><a href="https://arxiv.org/ftp/arxiv/papers/1812/1812.08434.pdf">https://arxiv.org/ftp/arxiv/papers/1812/1812.08434.pdf</a></figcaption></figure><blockquote>“In this tutorial, we will discuss the application of neural networks on graphs. Graph Neural Networks (GNNs) have recently gained increasing popularity in both applications and research, including domains such as social networks, knowledge graphs, recommender systems, and bioinformatics.</blockquote><blockquote>While the theory and math behind GNNs might first seem complicated, the implementation of those models is quite simple and helps in understanding the methodology. Therefore, we will discuss the implementation of basic network layers of a GNN, namely graph convolutions, and attention layers. Finally, we will apply a GNN on a node-level, edge-level, and graph-level tasks.”</blockquote><ul><li><a href="https://arxiv.org/abs/1812.08434">Graph Neural Networks: A Review of Methods and Applications</a></li><li><a href="https://colab.research.google.com/github/phlippe/uvadlc_notebooks/blob/master/docs/tutorial_notebooks/tutorial7/GNN_overview.ipynb">Google Colaboratory</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8jAhobw14iiZHx4R9btng.png" /><figcaption><a href="https://arxiv.org/ftp/arxiv/papers/1812/1812.08434.pdf">https://arxiv.org/ftp/arxiv/papers/1812/1812.08434.pdf</a></figcaption></figure><h3>Couclusion and use cases</h3><p>Graph can be extremely useful in many real-world problems, of minimizing loss in every paths, that we have walk or even a journey or route that is planned for your trip. Gets everyday easier, more convinient with graph traversal in your trip to get a happier trip.</p><p>The algorithm are as follows:<br>Prim Algorithm<br>Kruskal Algorithm<br>Dijkstra Algorithm</p><p>Have fun exploring Graph! See you!</p><h4>Book suggestion</h4><p>Competitive Programmer’s Handbook</p><p><a href="https://cses.fi/book/book.pdf">https://cses.fi/book/book.pdf</a></p><h4>References</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a233662da9af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/graph-algorithms-a233662da9af">Graph Algorithms</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[วิธีการ Detect Object ด้วย YOLOv5 และ Customize Object บน Windows 10]]></title>
            <link>https://medium.com/super-ai-engineer/%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%81%E0%B8%B2%E0%B8%A3-detect-object-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-yolov5-%E0%B9%81%E0%B8%A5%E0%B8%B0-customize-object-%E0%B8%9A%E0%B8%99-windows-10-2561fbd42310?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/2561fbd42310</guid>
            <category><![CDATA[super-ai-engineer]]></category>
            <category><![CDATA[pangpuriyesuperai]]></category>
            <dc:creator><![CDATA[Pawat Saengduan]]></dc:creator>
            <pubDate>Fri, 09 Jul 2021 07:48:36 GMT</pubDate>
            <atom:updated>2021-07-09T07:48:35.943Z</atom:updated>
            <content:encoded><![CDATA[<p>รหัสโครงการ <strong>22p21n0185</strong> | <strong>บ้านปังปุริเย่</strong></p><figure><img alt="YOLOv5 Banner" src="https://cdn-images-1.medium.com/max/1024/0*RZuurDOaETZR7wC_" /><figcaption>YOLOv5 Promotional Banner</figcaption></figure><p>ในบทความนี้ก็ต่อจากบทความที่แล้ว</p><blockquote>วิธีติดตั้ง <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a> บน <strong>Windows 10</strong></blockquote><p>และก็จะขอต่อจากบทความที่แล้วหน่อยนะครับ สำหรับคนที่มีปัญหาระหว่างลง <a href="https://pypi.org/project/pycocotools/"><strong>pycocotools</strong></a> เช่น<strong>ติดตั้ง Build Tools</strong> ไปแล้ว แต่ยัง <strong>Build Wheel</strong> <strong>ไม่ผ่าน!</strong></p><p>ณ ตอนนี้มี <strong>Package</strong> ที่ชื่อว่า <a href="https://pypi.org/project/pycocotools-windows/"><strong>pycocotools-windows</strong></a><strong> </strong>ซึ่ง <strong>Build </strong>สำหรับ <strong>Windows 10</strong> มาพร้อมแล้ว สามารถ <strong>Copy </strong>คำสั่งได้จากด้านล่างเลยครับ 😁</p><pre>pip install <a href="https://pypi.org/project/pycocotools-windows/"><strong>pycocotools-windows</strong></a></pre><p>เอาละครับ ถ้า<strong>ติดตั้ง</strong>ได้แล้ว เรามาได้วิธีการ<strong>ใช้</strong>มันกันดีกว่า 🤔</p><p>เมื่อเราโหลด <strong>Repository </strong>ของ <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a><strong> </strong>มาแล้ว เรามาดู <strong>File</strong> กับ Folder ก่อนดีกว่า ว่าแต่ละ <strong>File </strong>ทำอะไรและแต่ละโฟลเดอร์เก็บอะไร 🤔</p><pre>.<br>├── Dockerfile<br>├── LICENSE<br>├── READMEt.md<br>├── data<br>│   ├── argoverse_hd.yaml<br>│   ├── coco.yaml<br>│   ├── coco128.yaml<br>│   ├── hyp.finetune.yaml<br>│   ├── hyp.scratch.yaml<br>│   ├── images<br>│   ├── scripts<br>│   └── voc.yaml<br>├── detect.py<br>├── hubconf.py<br>├── models<br>│   ├── __init__.py<br>│   ├── __pycache__<br>│   ├── common.py<br>│   ├── experimental.py<br>│   ├── export.py<br>│   ├── hub<br>│   ├── yolo.py<br>│   ├── yolov5l.yaml<br>│   ├── yolov5m.yaml<br>│   ├── yolov5s.yaml<br>│   └── yolov5x.yaml<br>├── requirements.txt<br>├── runs<br>│   └── detect<br>├── test.py<br>├── train.py<br>├── tutorial.ipynb<br>├── utils<br>│   ├── __init__.py<br>│   ├── __pycache__<br>│   ├── activations.py<br>│   ├── autoanchor.py<br>│   ├── aws<br>│   ├── datasets.py<br>│   ├── general.py<br>│   ├── google_app_engine<br>│   ├── google_utils.py<br>│   ├── loss.py<br>│   ├── metrics.py<br>│   ├── plots.py<br>│   ├── torch_utils.py<br>│   └── wandb_logging<br>└── weights<br>    └── download_weights.sh</pre><pre>14 directories, 35 files</pre><ol><li><strong>Dockerfile,</strong> <strong>LICENSE </strong>และ<strong> README.md</strong> — ก็ตาม<strong>ชื่อ</strong>ครับ 😐</li><li><strong>data</strong> — <strong>โฟลเดอร์</strong>ที่จะเก็บ<strong> Dataset </strong>ในรูปแบบของ<strong> YOLO Format 🤨</strong></li><li><strong>detect.py </strong>— <strong>ไฟล์</strong>ที่เอาไว้ <strong>Run Detection 😀</strong></li><li><strong>hubconf.py </strong>— สำหรับ <strong>Access</strong> ใช้<strong>โมเดล</strong> <a href="https://pytorch.org/hub/ultralytics_yolov5/"><strong>YOLOv5 </strong>ผ่าน<strong> TorchHub</strong></a><strong> 😮</strong></li><li><strong>models</strong> — <strong>โฟลเดอร์</strong>ที่เก็บ <strong>Config</strong> ของแต่ละ<strong>โมเดล</strong> ซึ่งแต่ละ<strong>โมเดล</strong>จะ<strong>แยก</strong>ออกเป็นหลายอัน ซึ่งผมจะระบุ<strong>ภายหลัง</strong>ครับ</li><li><strong>requirements.txt</strong> — “<strong>เพียงแค่ pip install -r requirements.txt ก็ใช้ได้แล้ว แค่มันใช้กับ Windows 10 ไม่ได้อะ</strong>” 5555</li><li><strong>runs</strong> — <strong>โฟลเดอร์</strong>นี้จะเก็บ<strong>ผลลัพท์</strong>การ <strong>Run</strong> จากไฟล์ <strong>detect.py </strong>และ<strong> train.py </strong>ทั้งหมดซึ่งเป็น<strong>โฟลเดอร์ Default</strong> ที่ตั้งเอาไว้</li><li><strong>test.py</strong> — ไว้สำหรับ <strong>Test โมเดล</strong>ที่เรา <strong>Custom</strong> เอง</li><li><strong>train.py </strong>— ใช่ครับทุกคนคิดถูก มันก็คือที่<strong>เทรนโมเดล</strong>นั่นแหละ 😏</li><li><strong>tutorials.py </strong>— <strong>Tutorials</strong> แหละครับตามชื่อเลย ซึ่งเขาได้เพิ่มเติม <strong>Tool</strong>s ต่างๆ เช่น <strong>Monitor</strong>, <strong>TensorRT Deployment</strong> เป็นต้น</li><li><strong>utils </strong>—<strong> อย่าไปยุ่งครับ เดี๋ยวมันพัง </strong>555</li><li><strong>weights </strong>— จะมี <strong>Scripts</strong> ที่เอาไว้สำหรับโหลด <strong>Weights</strong> ที่เขา<strong>เทรน</strong>มาให้เรียบร้อยแล้ว</li></ol><p>โอเค … มาเริ่ม <strong>Detect</strong> กันแบบง่ายๆ ดีกว่า</p><pre>python detect.py --help</pre><figure><img alt="detect.py — help" src="https://cdn-images-1.medium.com/max/1024/1*Qoevi2Dx4Ik_-_k-R1rzfQ.png" /><figcaption>detect.py — help</figcaption></figure><p>เมื่อเราเรียก <strong>help</strong> มาเขาก็แสดง <strong>Parameters</strong> ที่ต้องการแล้ว ตัวอย่างง่ายๆ นะครับ</p><pre>python detect.py --source 0             # Webcam<br>                          file.jpg      # Image<br>                          file.mp4      # Video<br>                          path\         # Directory<br>                          path\*.jpg    # glob<br>                          rtsp://[URI]  # RTSP Stream<br>                          rtmp://[URI]  # RTMP Stream<br>                          http://[URL]  # HTTP Stream</pre><p><strong>detect.py </strong>— นั้นรองรับการ <strong>Input </strong>ได้หลายรูปแบบ</p><ol><li>Webcam — ใช้เลขในการระบุว่าเป็นกล้องตัวไหน</li><li>Image — <strong>Path</strong> ที่มี<strong>นามสกุลไฟล์</strong>เป็น <strong>.png, .jpg</strong></li><li>Video — พอๆ กับ <strong>Image</strong> ครับแค่เปลี่ยน<strong>นามสกุลไฟล์</strong>เป็น<strong> .mp4, .avi,</strong> <strong>etc</strong>…</li><li>Directory — ใช้ <strong>Path</strong> ที่ลงท้ายด้วย \ (Backslash)</li><li>glob — สามารถใช้<strong>เครื่องหมาย *</strong> ในการระบุ<strong>ไฟล์</strong>ที่ต้องการจาก <strong>Directory</strong> นั้นๆ ได้เหมือนกับ <strong>Linux CLI</strong> ที่เคยใช้ๆ กัน</li><li>RTSP, RTMP, HTTP Streaming— แม้แต่ <strong>Protocol</strong> ต่างๆ ก็รองรับ สามารถยัด <strong>URI</strong> เข้าไปได้เลย</li></ol><p>และยังมี <strong>Parameters </strong>อื่นๆ ที่ <strong>detect.py</strong> ทีด้วย 😮เช่น</p><ol><li><strong>source</strong> —<strong> Input</strong> ที่อธิบายไปในด้านบนอะครับ 😁</li><li><strong>weights</strong> —<strong> Model</strong> ที่ใช้ในการ <strong>Detect</strong> เป็น <strong>.pt 🤨</strong></li><li><strong>device</strong> —<strong> Device</strong> ที่จะใช้ในการประมวลผลเช่น <a href="https://developer.nvidia.com/cuda-zone"><strong>CUDA</strong></a> หรือ <strong>CPU</strong> 🙃</li><li><strong>view-img</strong> —<strong> แสดงผลรูปภาพ</strong>ออกมาด้วย 😎</li><li><strong>save-txt</strong> — <strong>บันทึก</strong>รายละเอียดลงเป็น<strong> .txt 😃</strong></li><li><strong>save-conf</strong> — ใช้คู่กับ <strong>save-txt</strong> ซึ่งจะ<strong>บันทึก Confidence</strong> ลงไปด้วย</li><li><strong>classes</strong> — <strong>คัดกรอง Class </strong>ที่จะ <strong>detect</strong> ออกมา</li><li><strong>conf</strong> หรือ <strong>conf-thres</strong> — วัตถุนั้นจะถูก <strong>detect</strong> เมื่อมี <strong>confidence</strong> มากกว่าที่กำหนด</li></ol><p>ประมาณนี้นะครับสำหรับ <strong>detect.py </strong>เรามาพูดถึงเรื่องโมเดลของ <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a> ที่ถูก <strong>Pre-trained</strong> มาแล้ว 😁</p><figure><img alt="Pre-trained model list" src="https://cdn-images-1.medium.com/max/1024/1*Ij3Sl_ojt6Fu6M_p3DWClQ.png" /><figcaption>Pre-trained model list</figcaption></figure><blockquote><a href="https://github.com/ultralytics/yolov5#pretrained-checkpoints">https://github.com/ultralytics/yolov5#pretrained-checkpoints</a></blockquote><p>แต่ละ<strong>โมเดล</strong>มี<strong>ความแม่นยำ</strong>ต่างกันไป 😶… ยกตัวอย่าง<strong>โมเดล YOLOv5x </strong>มี<strong>ความแม่นยำมากที่สุด</strong> แต่ก็ต้อง<strong>แลก</strong>มาด้วย<strong>เวลาในการประมวณผล</strong> และ<strong>ไฟล์ใหญ่</strong>กว่าชาวบ้านเขา 😮</p><p>และสามารถเอา <strong>Pre-trained</strong> <strong>Model </strong>ของเขามา<strong>เทรน</strong>กับ <strong>Dataset</strong> ของเราได้ ส่วนเรื่องของ<strong>เวลา</strong>ในการ<strong>เทรน</strong>ก็ขึ้นอยู่กับ <strong>ขนาดของโมเดล, ขนาดของ Data </strong>และ<strong> เครื่องของเรา 😎</strong></p><p>เชื่อว่าหลายๆ คนกำลังรอสิ่งนี้นั่นก็คือ … <strong>Customize Dataset </strong>คร้าบบบ!!! 😍</p><p>พูดง่ายๆ ก็คือ <strong>Detect Object</strong> ด้วย <strong>Data</strong> ของเรานั่นแหละ 🤔</p><p><a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a> ใช้ <strong>data</strong> เป็น <strong>YOLO Format</strong> นะครับ ซึ่งเราต้องทำ <strong>Annotations</strong> หลังจากนั้นก็ <strong>Export</strong> ออกมาเป็น <strong>YOLO Format</strong> 🙂</p><p>ซึ่งมันเองก็มี <strong>Tools</strong> ในการทำ <strong>Annotations</strong> อยู่หลายอันนะครับ</p><ol><li><a href="https://cvat.org/"><strong>CVAT</strong></a><strong> </strong>— เป็น <strong>Tools</strong> ของ <a href="https://github.com/openvinotoolkit/openvino"><strong>OpenVINO</strong></a><strong> </strong>สำหรับการทำ<strong> Annotations </strong>ซึ่งเขาเปิดเป็น<strong>เว็บ</strong>ให้สามารถ<strong>ใช้ได้ฟรี</strong>แต่ก็จะมีการ <strong>Limit</strong> บางอย่างเพื่อไม่ให้<strong>เซิร์ฟเวอร์ล่ม</strong> วิธีการ<strong>ปลด Limit</strong> ผมแนะนำให้ <strong>Run</strong> บนเครื่องตัวเอง ซึ่งมันมี <a href="https://github.com/openvinotoolkit/cvat"><strong>Repository</strong></a> ของตัวเองอยู่ สามารถ<strong>โหลด</strong>มาแล้วอ่าน <a href="https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/documentation/installation.md"><strong>Installation</strong></a> ได้เลยครับ</li><li><a href="https://github.com/tzutalin/labelImg"><strong>labelImg</strong></a> — ต่างกับ <a href="https://cvat.org/"><strong>CVAT</strong></a><strong> </strong>เรื่อง UI<strong> </strong>แต่ว่ามันถูกเขียนขึ้นโดย <a href="https://www.python.org/"><strong>Python</strong></a> และ<strong>ไม่มีเว็บ</strong>ให้ลองใช้ แต่ว่ามัน<strong>ฟรี</strong>ครับ <strong>ใช้ง่ายมากก</strong> <strong>ลงบนเครื่อง</strong>ของเราได้เลย ไม่ยากครับแค่ <strong>Copy Paste</strong> เหมือนที่ทุกคนทำกันทุกวันเดี๋ยวก็ได้แล้ว</li></ol><p>ในบทความนี้ขอใช้ <strong>Dataset</strong> ของ <a href="https://www.kaggle.com/c/dogs-vs-cats/overview"><strong>Dogs vs. Cats</strong></a> จาก <a href="https://www.kaggle.com/"><strong>Kaggle</strong></a> นะครับ 😎</p><p>แต่ใน<strong>บทความ</strong>นี้ผมจะขอ<strong>ยก</strong> <a href="https://cvat.org/"><strong>CVAT</strong></a> เป็น<strong>หลัก</strong>นะครับ</p><p><a href="https://cvat.org/"><strong>CVAT</strong></a><strong> </strong>สามารถโหลดลงเครื่องแล้ว <strong>Run</strong> ผ่าน<strong> </strong><a href="https://www.docker.com/"><strong>Docker</strong> </a>หรือใช้บนเว็บก็ได้นะครับ แต่ผม<strong>แนะนำ</strong>ให้<strong>โหลดลงเครื่อง</strong>เพราะว่าเราสามารถกำหนด <strong>Limit</strong> ของมันได้ 👍</p><p>กดปุ่ม <strong>Create New Task 😁</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fJCueTcORYEZ6D9bJIJu2w.png" /><figcaption>Create New Task.</figcaption></figure><p>ใส่ชื่อของ <strong>Task</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*ITp98ysmKgyBhWHdjuVOsA.png" /><figcaption>Entering your task name.</figcaption></figure><p>เพิ่ม<strong> Label </strong>ที่ต้องการ 🤔</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*X48GWjIP2LoNxbFq-J3BtA.png" /><figcaption>Click to add the label button.</figcaption></figure><p>กดปุ่ม <strong>Continue</strong> เพื่อสร้าง<strong> Class </strong>ไปเรื่อยๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*gjEZr3i8h_69uRtjjzkLmw.png" /><figcaption>Define class name and press continue to add it.</figcaption></figure><p>หลังจากใส่ <strong>Class</strong> ครบแล้ว ก็กดปุ่ม <strong>Done</strong> ได้เลย~~</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*IgmyJqYzFQXhHGpdVCHo2Q.png" /><figcaption>Done.</figcaption></figure><p>เลือก<strong>ไฟล์</strong>ที่ต้องการที่จะ <strong>Annotate</strong> (สามารถเลือกได้หลายภาพ) 👇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*cNO6XnowPYeBEWnwWwGv6w.png" /><figcaption>Uploading files to annotating.</figcaption></figure><p>ใน <strong>Advanced configuration </strong>สามารถเลือก <strong>Segment siz</strong>e เพื่อที่จะแยก <strong>Jobs</strong> ออกมาหลายๆ อัน <strong>(ไม่จำเป็น) ✋</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*H19TVBvwzjJYR1t5qmx1Xw.png" /><figcaption>Define segment size. (Optional)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5KkKRTFKRxqDZZPGTYm0A.png" /><figcaption>Demo. (Optional)</figcaption></figure><p>หลังจากที่อัพโหลดรูปภาพแล้วก็กด <strong>Submit</strong> ได้เลย 😊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*J5VuTIyo7RpbrJ1NFH-n6w.png" /><figcaption>Submitting.</figcaption></figure><p>หลังจากที่สร้างเสร็จจะมี <strong>Notifications</strong> ขึ้นมาอยู่ทางด้านขวาบน 🤔</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*3x1zuJyOZBrimxWjspc-cA.png" /><figcaption>Open task.</figcaption></figure><p>เมื่อกดเข้าไปแล้ว ก็จะมีหน้าแต่เป็นแบบนี้ 😮</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KfihHIvCQKqUmHaVgC2Hnw.png" /></figure><p>ถ้าหากว่าไม่ได้กำหนด <strong>Segment size</strong> จะไม่มีการแยก <strong>Jobs</strong> ให้</p><blockquote><strong>แต่ว่ามันไม่จำเป็น</strong></blockquote><p>เพราะฉะนั้น … <strong>ต่อดีกว่า 😑</strong></p><p>เมื่อเรากดเข้าไปใน <strong>Jobs</strong> นะครับ มันจะมีหน้าตาแบบนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6wq3juovabiobKWAxhvEQg.png" /><figcaption>แมวเอ๋ย</figcaption></figure><p>วิธีการ <strong>Annotate</strong> นะครับ ในแถบด้าน<strong>ซ้าย </strong>จะมีไอคอนนี้ให้เรา *<strong>คลิก* 😁</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*eCbIH-1H_SYSDx43lVkmkA.png" /><figcaption>*CLICK*</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*lbZxqVsT45evnhy2qQggsw.png" /><figcaption>POP-UP</figcaption></figure><p>เมื่อคลิกแล้วมันจะขึ้น <strong>Pop-up</strong> เล็กๆ และเราก็สามารถเลือก <strong>Class</strong> ในการ <strong>Annotate</strong> ได้นะครับ หลังจากนั้นเราก็<strong>ลากกรอบ</strong>ของเราให้อยู่ใน<strong> ROI</strong> ได้เลยย 👇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*-irhEANVf6ru5uQ_Lggk-A.gif" /><figcaption>How to Annotate</figcaption></figure><p>แล้วก็ทำให้ครบเลย ทุกรูปนะครับ 😎</p><p>เมื่อ <strong>Annotat</strong>e เสร็จแล้ว<strong>อย่า</strong>ลืมปิด <strong>Jobs</strong> ด้วยนะครับ<strong> MENU &gt; Finish the job</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*J4_o35rqGKfoGGiehglT6A.png" /></figure><p>ใครที่ทำ <strong>Segment Size</strong> ก็ต้องปิด <strong>Jobs</strong> ทุกอันด้วยนะครับ 😅</p><p>หลังจากที่ปิด <strong>Jobs</strong> เสร็จแล้ว เราจะ <strong>Export Annotations</strong> ที่เราเพิ่งทำไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8RD0qChtFpd3vUwrCi2OPg.png" /></figure><pre><strong>Actions</strong> &gt; <strong>Export as a dataset</strong> &gt; <strong>YOLO 1.1</strong></pre><p>หลังจากที่เรา <strong>Export</strong> ออกมาแล้วจะได้<strong>ไฟล์ .zip </strong>มานะครับ พอดาวน์โหลด <strong>100%</strong> แล้วก็ปิด <a href="https://cvat.org/"><strong>CVAT</strong></a> ไปได้เลยครับ 😁</p><p>หลังจากนั้นก็<strong>แตกไฟล์</strong>นะครับ โดย <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a> จะรับแค่ <strong>train</strong> และ <strong>validation</strong></p><p>สร้าง <strong>Directory</strong> ชื่อว่า <strong>dataset </strong>มาใน<strong>โฟลเดอร์</strong> <strong>yolov5</strong> แล้วเราก็จะ<strong>จัด data</strong> หน้าตาแบบนี้ครับ</p><pre>.<strong>dataset</strong><br>├── <strong>images</strong><br>│   ├── <strong>train</strong><br>│   │   └── <strong><em>[set of training images]</em></strong><br>│   └── <strong>val</strong><br>│       └── <strong><em>[set of validation images]</em></strong><br>└── <strong>labels</strong><br>    ├── <strong>train</strong><br>    │   └── <strong><em>[set of training annotations]</em></strong><br>    └── <strong>val</strong><br>        └── <strong><em>[set of validation annotations]</em></strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*h4X5kk9-iOwTIC2xRd1ciw.gif" /><figcaption>Example of organize directory from the datasets.</figcaption></figure><pre><strong>A</strong>:  <strong>จัดเสร็จแล้วว</strong> เทรน<strong>โมเดล</strong>ได้ยังอะ<br><strong>B</strong>: ใจเย็นๆ ยังไม่หมด</pre><p>สร้างไฟล์ <strong>dataset.yaml </strong>ใน<strong>โฟลดเดอร์ data </strong>มา … แล้ว <strong>Copy Past</strong>e <strong>เปลี่ยน</strong>ชื่อ <strong>Class</strong> และจำนวน<strong>Class</strong>ด้วยนะครับบ!!</p><pre>train: ./dataset/images/train/<br>val: ./dataset/images/val/</pre><p>ถ้าหากว่าไม่มี <strong>Validation Set</strong> ก็ใช้เป็น <strong>directory</strong> เดียวกันได้เลยครับ</p><pre>nc: 2</pre><p><strong>จำนวน Class</strong></p><pre>names: [&#39;cat&#39;, &#39;dog&#39;]</pre><p><strong>ชื่อ Class</strong> <strong>เรียง</strong>ตามการสร้าง <strong>Class </strong>ใน <a href="https://cvat.org/"><strong>CVAT</strong></a></p><pre># ./data/dataset.yaml<br>train: ./dataset/images/train/<br>val: ./dataset/images/val/</pre><pre>nc: 2</pre><pre>names: [&#39;cat&#39;, &#39;dog&#39;]</pre><h3><strong>เทรนโมเดล</strong></h3><pre><strong>B</strong>: ไปดาวน์โหลด <strong>Model</strong> มา<br><strong>A</strong>: ดาวน์โหลดที่ไหนอะ<br><strong>B</strong>: ข้างบนๆ 👆 ตรง <strong>Pre-trained Model 😁👍</strong></pre><p>ผมเลือกเป็นโมเดล <strong>YOLOv5s </strong>…<strong> </strong>เนื่องจากขนาดของไฟล์ค่อนข้าง<strong>เล็ก</strong> สามารถนำไป <strong>Run</strong> บนเครื่องที่สเป็กต่ำๆ ได้</p><pre>*จริงๆ <strong>Wi-Fi </strong>ของผมมันไม่อำนวย*</pre><p>แถเก่งไปละ.. <strong>เข้าเรื่องดีกว่า</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UXwlYRoNxbw1KJ9sq6yMcw.png" /><figcaption>Arguments of train.py</figcaption></figure><p><strong>ไม่</strong>อธิบายครับ <strong>ยาว</strong>เกิน 😂</p><pre>python train.py --img 640 --batch 2 --epochs 5 --data &quot;.\data\dataset.yaml&quot; --weights &quot;.\weights\yolov5s.pt&quot;</pre><p><strong>img</strong> — ขนาดรูปที่จะเป็น <strong>Output</strong> ของ <strong>Model 😮</strong></p><p><strong>batch </strong>— ขนาด <strong>Input</strong> ที่จะฟีดเข้าไปใน <strong>Model </strong>…<strong> </strong>ปรับให้มันสมดุลนะครับ สำหรับเครื่องผม <strong>VRAM</strong> น้อยมากๆ ถ้าปรับ<strong>มากไปหรือน้อ</strong>ยบางที<strong>โปรแกรม</strong>อาจจะ<strong>งอแง</strong>นะครับเช่น<strong> BrokenPipe</strong> หรือ <strong>CUDA OOM 😎</strong></p><p><strong>epochs</strong> — ตามชื่อนั่นแหละ เทรนกี่รอบ</p><p><strong>data</strong> — <strong>Path</strong> หาเข้า <strong>dataset.yaml</strong></p><p><strong>weights</strong> — <strong>Path</strong> ไปหา <strong>Weights</strong> ที่เมื่อกี้ไล่ให้ไป<strong>โหลด</strong>ครับ</p><blockquote>รอ ยาวๆ~~ 😪</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gqFSjhvAO9koVCZ0ZepiHg.png" /></figure><p>ผมขอ<strong>ข้ามเวลา</strong>ด้วยการ<strong>ลด Epoch</strong> จาก <strong>100</strong> เหลือลง <strong>10</strong> ละกัน ข้้างบนนี่ภาพ<strong>แต่ง</strong></p><p>เมื่อ<strong>เทรน</strong>เสร็จแล้ว <strong>Model</strong> จะถูกบันทึกไปที่ <strong>runs/train/exp</strong></p><pre>runs<br>├── detect<br>└── train<br>    └── exp<br>        ├── F1_curve.png<br>        ├── PR_curve.png<br>        ├── P_curve.png<br>        ├── R_curve.png<br>        ├── confusion_matrix.png<br>        ├── events.out.tfevents.1616481672.DESKTOP-E3G9LEN.6228.0<br>        ├── hyp.yaml<br>        ├── labels.jpg<br>        ├── labels_correlogram.jpg<br>        ├── opt.yaml<br>        ├── results.png<br>        ├── results.txt<br>        ├── test_batch0_labels.jpg<br>        ├── test_batch0_pred.jpg<br>        ├── test_batch1_labels.jpg<br>        ├── test_batch1_pred.jpg<br>        ├── test_batch2_labels.jpg<br>        ├── test_batch2_pred.jpg<br>        ├── train_batch0.jpg<br>        ├── train_batch1.jpg<br>        ├── train_batch2.jpg<br>        └── weights<br>            ├── best.pt<br>            └── last.pt</pre><p>แต่ว่าเจ้า <strong>exp</strong> มันมาเป็น<strong>โฟลเดอร์</strong>เลย <strong>Model</strong> ของเราอยู่หนายยยย!! 😣</p><p>มันอยู่ใน <strong>exp/weights </strong>มีอยู่ 2 อันคือ<strong> best.pt </strong>กับ<strong> last.pt</strong></p><p><strong>best.pt</strong> — คือโมเดลที่ดีที่สุด</p><p><strong>last.pt</strong> — คือ <strong>Epochs</strong> ล่าสุดที่เทรนล่าสุด</p><pre><strong>A</strong>: แล้วเอา<strong>โมเดล</strong>ที่เรา<strong>เทรน</strong>มาใช้ยังไงอะ<br><strong>B</strong>: <strong>อ่านต่อสิครับ ถ้าอยากรู้ </strong>(มาเขียนตอนใกล้จบอีกด้วย 555)</pre><p>เหมือนเดิมเลยครับ กันการใช้ <strong>detect.py </strong>เพียงแค่เติม<strong> — weights</strong></p><pre>python detect.py --source 0<br>                 --weights &quot;.\runs\train\exp\weights\best.pt&quot;</pre><p>เพียงเท่านี้ก็<strong>เสร็จสมบูรณ์</strong>แล้วคร้าบบบ!! 😁</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WzDerkrRbdXO2PKn40hwg.png" /></figure><p><strong>ขอบคุณมากๆ ครับ 😀</strong></p><p>ภวัต แสงเดือน ( นน \ Non )</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2561fbd42310" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%81%E0%B8%B2%E0%B8%A3-detect-object-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-yolov5-%E0%B9%81%E0%B8%A5%E0%B8%B0-customize-object-%E0%B8%9A%E0%B8%99-windows-10-2561fbd42310">วิธีการ Detect Object ด้วย YOLOv5 และ Customize Object บน Windows 10</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Food Image Classification]]></title>
            <link>https://medium.com/super-ai-engineer/food-image-classification-c627860d306f?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/c627860d306f</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[food]]></category>
            <category><![CDATA[botnoi]]></category>
            <category><![CDATA[image-classification]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Prim Wong]]></dc:creator>
            <pubDate>Fri, 09 Jul 2021 07:48:00 GMT</pubDate>
            <atom:updated>2021-07-09T07:48:00.201Z</atom:updated>
            <content:encoded><![CDATA[<p>Thai cuisine is one of the Must! Thai cusine specialize its own taste and flavours, with spices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*KAgOa3l1EC9nhBIv.jpg" /></figure><h3>Image Processing</h3><blockquote>Convolutional Neural Network<br>The algorithm that manipulated our human brain, the brain of the machine!!!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*agwjecFaeoIBdFmw" /><figcaption>Biological Neural Network</figcaption></figure><p>With the different cross-correlation network,</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*N9XXdIZhSQTCKOqa.jpeg" /><figcaption>CNN Convolutional Neural Network</figcaption></figure><blockquote>“ In the past 10 years, the best-performing artificial-intelligence systems — such as the speech recognizers on smartphones or Google’s latest automatic translator — have resulted from a technique called “deep learning.”</blockquote><blockquote>Deep learning is in fact a new name for an approach to artificial intelligence called neural networks, which have been going in and out of fashion for more than 70 years. Neural networks were first proposed in 1944 by Warren McCullough and Walter Pitts, two University of Chicago researchers who moved to MIT in 1952 as founding members of what’s <a href="https://books.google.com/books?id=RLKxSvCBQZcC&amp;q=%22first+cognitive+science+department+in+history%22#v=snippet&amp;q=%22first%20cognitive%20science%20department%20in%20history%22&amp;f=false">sometimes called</a> the first cognitive science department.” — <a href="https://news.mit.edu/2017/explained-neural-networks-deep-learning-0414">MIT</a></blockquote><h3>Model</h3><p>We created the deep learning model for Thai Cuisine Image Classification.</p><p>Model Versions:<br>1. <a href="https://colab.research.google.com/drive/1yTKq-_m-ll4uuWXsCnQBFDzLfO0CaBgK#scrollTo=sNWKiDA-K0J1">VGG16</a> — acc 72.75% (val set)<br>2. <a href="https://colab.research.google.com/drive/13mraHOVzLkWV0Uz3UNWMeyLHA7rvXCmB?usp=sharing">EfficientNet</a> — acc 86% (val set)<br>3. <a href="https://colab.research.google.com/drive/1tmCFaASFgPsGlnuSH05bBRcecSu0qNph?usp=sharing">EfficientNet</a>_FineTuning — acc 90.94% (val_set)<br>4. Ensemble Method</p><h4>Colab Links</h4><ul><li><a href="https://colab.research.google.com/drive/1yTKq-_m-ll4uuWXsCnQBFDzLfO0CaBgK#scrollTo=sNWKiDA-K0J1">Google Colaboratory</a></li><li><a href="https://colab.research.google.com/drive/13mraHOVzLkWV0Uz3UNWMeyLHA7rvXCmB?usp=sharing">Google Colaboratory</a></li><li><a href="https://colab.research.google.com/drive/1tmCFaASFgPsGlnuSH05bBRcecSu0qNph?usp=sharing">Google Colaboratory</a></li></ul><h3>Keras Model</h3><p>Keras is the powerful open source library with various applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*3M8tARVP9Ut4L4HTXe_ECw.png" /><figcaption><a href="https://keras.io/api/applications/">https://keras.io/api/applications/</a></figcaption></figure><h3>VGG16</h3><p>VGG16 is an ancient long neural network with high memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*_s_iZwXaDyFz83X7" /></figure><p>Prepare Data<br>We create 2 datasets of Train and Validate set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SyU_W9mZ9_Fmnz-h.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*av-Unre5YG6QvK8kN_KtgA.png" /></figure><p>These are the layers in multilayer perceptron;</p><pre>x = pt.layers[-1].output</pre><pre>x = tf.keras.layers.GlobalAveragePooling2D()(x)</pre><pre>x = tf.keras.layers.Dropout(0.25)(x)</pre><pre>x = tf.keras.layers.Dense(1024,activation=&#39;relu&#39;)(x)</pre><pre>x = tf.keras.layers.Dropout(0.25)(x)</pre><pre>x =  tf.keras.layers.Dense(50,activation=&#39;softmax&#39;)(x)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*8aGTPHkRFA98us4qupsZ5w.png" /></figure><p>Model.compile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*DoIHvsjDiCRsIM1N.png" /><figcaption>Adam</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*v3ha3Wbt9DWPqVHCQkv1nw.png" /><figcaption>Binary Crossentropy</figcaption></figure><pre>model.compile(optimizer=&#39;adam&#39;,loss=tf.keras.losses.BinaryCrossentropy(),metrics=[&#39;accuracy&#39;])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JAZnrFr-d4vtB4OIewetA.png" /><figcaption>Accuracy</figcaption></figure><h3>EfficientNet: Break the Mold !!! Rethinking Model Scaling for CNN (Deep Learning)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e4caltoURjAfFnAJMc08vg.png" /><figcaption>EfficientNet</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c627860d306f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/food-image-classification-c627860d306f">Food Image Classification</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[การใช้ Intel Neural Compute Stick 2 กับ Raspberry Pi 4]]></title>
            <link>https://medium.com/super-ai-engineer/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-intel-neural-compute-stick-2-%E0%B8%81%E0%B8%B1%E0%B8%9A-raspberry-pi-4-22bc087015ca?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/22bc087015ca</guid>
            <category><![CDATA[intel]]></category>
            <category><![CDATA[raspberry-pi-4]]></category>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[ncs2]]></category>
            <dc:creator><![CDATA[Nisit Sirimarnkit]]></dc:creator>
            <pubDate>Thu, 06 May 2021 05:56:29 GMT</pubDate>
            <atom:updated>2021-05-07T02:12:30.006Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgEDLz6ER6Fp41fAQvtEyA.jpeg" /></figure><p>สวัสดีครับ… วันนี้ผมจะมาพูดถึงอุปกรณ์ Intel Neural Compute Stick 2 เรียกสั้นๆว่า NCS2 เป็นอุปกรณ์ที่ใช้เป็นตัวเร่งการประมวลผลด้าน AI ที่อยู่ในรูปแท่ง USB ยอดนิยม โดยเวอร์ชั่นใหม่นี้ ซึ่งก็คือเวอร์ชัน 2 ให้ทั้งประสิทธิภาพที่มากขึ้น รวมทั้งครอบคลุมการนำไปประยุกต์ใช้ได้หลากหลายขึ้น</p><p>สำหรับ NCS2 นี้ใช้ชิป Vision Processing Unit (VPU)ตัวล่าสุดในชื่อ Movidius Myriad X VPU ทำให้มีประสิทธิภาพเหนือกว่า NCS รุ่นแรกถึง 8 เท่า รวมทั้งมีชุดเครื่องมือ IntelOpenVINO ที่เปิดให้นักพัฒนาสามารถสร้างและฝึกโมเดล AI บนคลาวด์ได้</p><p>ซึ่งในบทความนี้จะเป็นการนำ NCS2 มาใช้กับ Raspberry Pi 4 เรียกย่อๆว่า RPI4 ซึ่งเป็นบอร์ดตัวหนึ่งที่รันแบบมี OS เป็นของตัวเอง เปรียบเสมือนคอมพิวเตอร์จิ๋วตัวหนึ่ง ประสิทธิภาพก็จะมีข้อจำกัดตามขนาด ซึ่งหากเราต้องการใช้ RPI4 รันระบบ AI ก็อาจจะทำให้การประมวลผลนั้นค่อนข้างช้ามาก จึงเป็นที่มาที่เรานำตัว NCS2 มาช่วยในส่วนนี้ครับ</p><h3>Install NCS2 บน OS ของ RPI4</h3><p>เริ่มจาก Install Software ที่ใช้ในการติดตั้งครับ</p><pre># install software</pre><pre>sudo apt-get update</pre><pre>sudo apt-get install git</pre><pre>sudo apt-get install cmake</pre><pre>sudo apt-get install libatlas-base-dev</pre><pre>sudo apt-get install python3-pip</pre><pre>sudo apt install libgtk-3-dev</pre><pre>pip3 install — upgrade pip</pre><pre>pip3 install numpy</pre><p>ดาวน์โหลด Openvino Toolkit เลือกที่เป็นเวอร์ชันสำหรับ Raspberry Pi</p><p><a href="https://storage.openvinotoolkit.org/repositories/openvino/packages/2021.2/l_openvino_toolkit_runtime_raspbian_p_2021.2.185.tgz">https://storage.openvinotoolkit.org/repositories/openvino/packages/2021.2/l_openvino_toolkit_runtime_raspbian_p_2021.2.185.tgz</a></p><p>แตกไฟล์ที่ดาวน์โหลด แก้ไขชื่อ folder ตามต้องการ ในบทความนี้ผมจะตั้งเป็น openvino_toolkit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/168/0*l9L3UKC0nRAnXKYc" /></figure><p>รัน Environment ของ Openvino ถ้ารันแล้วสามารถเช็คจากเวอร์ชันของ Opencv ถ้าเป็น Openvino จะเป็น 4.x.x-openvino</p><pre># set environment</pre><pre>source /openvino_toolkit/bin/setupvars.sh</pre><p>ติดตั้ง USB Rules เพื่อให้ RPI 4 เห็นอุปกรณ์ NCS2 ผ่าน USB</p><pre># add usb rules</pre><pre>sudo usermod -a -G users “$(whoami)”</pre><pre>sh /openvino_toolkit/install_dependencies/install_NCS_udev_rules.sh</pre><pre>cd /etc/udev/rules.d/</pre><pre>cat 97-myriad-usbboot.rules</pre><p>ในไฟล์ 97-myriad-usbboot.rules จะต้องมีข้อความตามนี้</p><pre>SUBSYSTEM==”usb”, ATTRS{idProduct}==”2150&quot;, ATTRS{idVendor}==”03e7&quot;, GROUP=”users”, MODE=”0660&quot;, ENV{ID_MM_DEVICE_IGNORE}=”1&quot;</pre><pre>SUBSYSTEM==”usb”, ATTRS{idProduct}==”2485&quot;, ATTRS{idVendor}==”03e7&quot;, GROUP=”users”, MODE=”0660&quot;, ENV{ID_MM_DEVICE_IGNORE}=”1&quot;</pre><pre>SUBSYSTEM==”usb”, ATTRS{idProduct}==”f63b”, ATTRS{idVendor}==”03e7&quot;, GROUP=”users”, MODE=”0660&quot;, ENV{ID_MM_DEVICE_IGNORE}=”1&quot;</pre><p>จากนั้นเรามาทำการทดสอบกันครับ สร้างไฟล์ openvino_fd_myriad.py</p><pre>import cv2 as cv</pre><pre># Load the model.</pre><pre>net = cv.dnn_DetectionModel(‘face-detection-adas-0001.xml’,</pre><pre>‘face-detection-adas-0001.bin’)</pre><pre># Specify target device.</pre><pre>net.setPreferableTarget(cv.dnn.DNN_TARGET_MYRIAD)</pre><pre># Read an image.</pre><pre>frame = cv.imread(‘/path/to/image’)</pre><pre>if frame is None:</pre><pre>raise Exception(‘Image not found!’)</pre><pre># Perform an inference.</pre><pre>_, confidences, boxes = net.detect(frame, confThreshold=0.5)</pre><pre># Draw detected faces on the frame.</pre><pre>for confidence, box in zip(list(confidences), boxes):</pre><pre>cv.rectangle(frame, box, color=(0, 255, 0))</pre><pre># Save the frame to an image file.</pre><pre>cv.imwrite(‘out.png’, frame)</pre><p>ดาวน์โหลดไฟล์ weight ที่เป็น .bin</p><pre>wget — no-check-certificate <a href="https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP16/face-detection-adas-0001.bin">https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP16/face-detection-adas-0001.bin</a></pre><p>ดาวน์โหลดไฟล์ .xml</p><pre>wget — no-check-certificate <a href="https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP16/face-detection-adas-0001.xml">https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP16/face-detection-adas-0001.xml</a></pre><p>จากนั้นลองรันด้วยคำสั่ง</p><pre>python3 openvino_fd_myriad.py</pre><p>จะได้ไฟล์ out.png ที่เป็นการประมวลผลรูปภาพที่สำเร็จแล้ว ลองเปิดไฟล์เพื่อดูผล</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cfbgn9k3ZASqo_Q4fY7ugA.png" /></figure><p>จากนั้นทำการรันทดสอบกับไฟล์วิดิโอกันบ้างครับ รันแบบปกติบน RPI4 แบบไม่ใช้ NCS2 จะได้ FPS ตามด้านล่างครับ</p><pre>FPS: 1.15 (excluding drawing time of 32.57ms)<br>FPS: 1.24 (excluding drawing time of 30.59ms)<br>FPS: 1.32 (excluding drawing time of 30.58ms)<br>FPS: 1.24 (excluding drawing time of 31.96ms)<br>FPS: 1.37 (excluding drawing time of 31.31ms)<br>FPS: 1.28 (excluding drawing time of 30.64ms)<br>FPS: 1.28 (excluding drawing time of 30.44ms)<br>FPS: 1.24 (excluding drawing time of 34.44ms)</pre><p>ต่อไปลองเสียบ NCS2 แล้วลองรัน Openvino Environment และลองรันโปรแกรมใหม่อีกทีครับ</p><pre>FPS: 14.02 (excluding drawing time of 55.95ms)<br>FPS: 18.72 (excluding drawing time of 40.07ms)<br>FPS: 16.93 (excluding drawing time of 40.36ms)<br>FPS: 16.29 (excluding drawing time of 42.52ms)<br>FPS: 16.75 (excluding drawing time of 39.74ms)<br>FPS: 16.54 (excluding drawing time of 41.56ms)<br>FPS: 16.84 (excluding drawing time of 41.47ms)<br>FPS: 19.02 (excluding drawing time of 39.78ms)</pre><p>จะเห็นได้ว่า FPS เร็วขึ้นมากถึง 13 เท่าเลยทีเดียวครับ ขอจบเพียงเท่านี้ครับ…</p><p><strong>Ref:</strong> <a href="https://docs.openvinotoolkit.org/2020.1/_docs_install_guides_installing_openvino_raspbian.html">https://docs.openvinotoolkit.org/2020.1/_docs_install_guides_installing_openvino_raspbian.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22bc087015ca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-intel-neural-compute-stick-2-%E0%B8%81%E0%B8%B1%E0%B8%9A-raspberry-pi-4-22bc087015ca">การใช้ Intel Neural Compute Stick 2 กับ Raspberry Pi 4</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[วิธีติดตั้ง YOLOv5 บน Windows 10]]></title>
            <link>https://medium.com/super-ai-engineer/%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-yolov5-%E0%B8%9A%E0%B8%99-windows-10-8ad1546e517?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/8ad1546e517</guid>
            <category><![CDATA[super-ai-engineer]]></category>
            <category><![CDATA[pangpuriyesuperai]]></category>
            <dc:creator><![CDATA[Pawat Saengduan]]></dc:creator>
            <pubDate>Thu, 06 May 2021 05:56:16 GMT</pubDate>
            <atom:updated>2021-05-06T05:56:16.099Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="รูปภาพ YOLOv5" src="https://cdn-images-1.medium.com/max/1024/0*gQn7Soo_G-AxturA.jpg" /><figcaption>YOLOv5</figcaption></figure><p>รหัสโครงการ 22p21n0185 | บ้านปังปุริเย่</p><p><strong>สวัสดีครับ~~</strong> ผมชื่อ <strong>“นน”</strong> นะครับ…<strong> </strong>ในบทความนี้ผมจะ<strong>ไกด์</strong>วิธีการ<strong>ลง</strong> <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a><strong> </strong>บน <strong>Windows 10</strong>…<strong> </strong>เรามาเกริ่นกันก่อนว่า <a href="https://pjreddie.com/darknet/yolo/"><strong>YOLO</strong></a><strong> </strong>คืออะไรและ <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a><strong> </strong>คืออะไร</p><p><a href="https://pjreddie.com/darknet/yolo/"><strong>YOLO</strong></a><strong> </strong>คือ <strong>State-of-the-art Object Detection </strong>ที่ถูกเขียนโดย “<strong>Joseph Redmon</strong>”</p><p><a href="https://pjreddie.com/darknet/yolo/"><strong>YOLO</strong></a> นั้นถูกสร้างโดย<a href="https://en.wikipedia.org/wiki/C_(programming_language)"><strong>ภาษา C</strong></a><strong> </strong>และ<strong>ภาษา CUDA </strong>เพื่อสร้าง <strong>Real-time Object Detection</strong></p><p>ส่วน <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a><strong> </strong>ถูกพัฒนาโดย <a href="https://github.com/ultralytics"><strong>Ultralytics</strong></a><strong> </strong>ซึ่งมี<strong>ฐาน</strong>มาจาก<strong> </strong><a href="https://pjreddie.com/darknet/yolo/"><strong>YOLO</strong></a><strong>… </strong><a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a><strong> </strong>เขียนบน<strong>เฟรมเวิร์ค</strong>ที่ชื่อว่า <a href="https://pytorch.org/"><strong>PyTorch</strong></a><strong> </strong>นั่นเองครับ</p><p>เรามาเริ่มติดตั้ง <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a><strong> </strong>ดีกว่า~~</p><p><strong>ดาวน์โหลด YOLOv5</strong></p><p>เราก็เริ่มโหลด <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a> มาจาก <a href="https://github.com/"><strong>GitHub</strong></a><strong> </strong>ด้วยคำสั่ง</p><blockquote>git clone <a href="https://github.com/ultralytics/yolov5.git`">https://github.com/ultralytics/yolov5.git</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kljNwf0ldl-97mdHk3oLfg.png" /><figcaption>A YOLOv5 Repository</figcaption></figure><p><strong>ติดตั้ง Packages</strong></p><p>หลังจากลง <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a><strong> </strong>เราใช้เลยได้มั้ย..<strong> ได้ฮะ ได้ก็บ้าแล้วว!!</strong> อย่าลืมลง <strong>Packages </strong>ก่อนนะฮะ เดี๋ยวรันแล้ว<strong>แดงเถือก!!</strong></p><p><strong>.. Package Requirements </strong>ที่ต้องมีก็ประมาณนี้ครับ</p><figure><img alt="requirements.txt" src="https://cdn-images-1.medium.com/max/995/1*ePi_2Up0mCDcXWxw3DDesg.png" /><figcaption>requirements.txt</figcaption></figure><blockquote><strong>ถึงแม้ว่าเขาจะมีมาให้หมดก็ไม่ใช่ว่า Runได้นะครับ…</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hPliLvIVUnXE2RtBjhmpow.png" /><figcaption>Error while installing the requirements.</figcaption></figure><p>ซึ่งมันก็มีบางอันที่ต้องลงเอง เช่นในรูปก็เป็น <a href="https://pytorch.org/"><strong>PyTorch</strong></a> นะครับ เราไปต่อกันดีกว่า!!</p><p>หลังจากที่เราลง <a href="https://pytorch.org/"><strong>PyTorch</strong></a><strong> </strong>เสร็จแล้ว ก็รันอีกรอบนึงแล้วจะพบว่า <strong>แดงอีกละ… </strong>ขยันแดงจริงๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fTdyEu7ZtR4hZnLwHlUweQ.png" /><figcaption>An annoying error while installing pycocotools</figcaption></figure><p>ที่มันพังเพราะว่า <strong>Windows 10 เวอร์ชั่น 2004 ขึ้นไป </strong>นั้นมันมีปัญหากับ <a href="https://numpy.org/"><strong>NumPy</strong></a><strong> </strong>(ถ้าไม่พังก็ไปต่อได้เลยนะครับ)</p><p>วิธีการแก้ก็คือ <strong>Downgrade </strong><a href="https://numpy.org/"><strong>NumPy</strong></a> ลงมาเวอร์ชั่น <strong>1.19.0 </strong>ก็ง่ายๆ เลยครับ</p><blockquote>pip install numpy ===1.19.0</blockquote><p>หลังจากนั้นก็รันใหม่ ก็<strong>ไม่แดง</strong>ละคร้าบบ.. (แต่ถ้าหากว่าไม่ได้ลง <strong>Visual C++ 2015 build tools</strong> ก็อาจจะลง <strong>pycocotools </strong>ไม่ได้นะครับ)</p><p>ก็เสร็จไปเรียบร้อยแล้วนะครับบ สำหรับไกด์การติดตั้ง <strong>prerequisites </strong>ของ <a href="https://github.com/ultralytics/yolov5"><strong>YOLOv5</strong></a></p><p>เตรียมพบกันใน<strong>บทความ</strong>ต่อไปนะครับ <strong>สวัสดีคร้าบบบบ~~~</strong></p><figure><img alt="รูปภาพ YOLOv5" src="https://cdn-images-1.medium.com/max/1024/0*gQn7Soo_G-AxturA.jpg" /><figcaption>YOLOv5</figcaption></figure><p>ภวัต แสงเดือน ( นน | Non )</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ad1546e517" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-yolov5-%E0%B8%9A%E0%B8%99-windows-10-8ad1546e517">วิธีติดตั้ง YOLOv5 บน Windows 10</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ระบบผู้ช่วยแนะนำ(Recommender Systems) เรียบง่าย ใกล้ตัว กว่าที่คิด]]></title>
            <link>https://medium.com/super-ai-engineer/%E0%B8%A3%E0%B8%B0%E0%B8%9A%E0%B8%9A%E0%B8%9C%E0%B8%B9%E0%B9%89%E0%B8%8A%E0%B9%88%E0%B8%A7%E0%B8%A2%E0%B9%81%E0%B8%99%E0%B8%B0%E0%B8%99%E0%B8%B3-recommender-systems-%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%9A%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2-%E0%B9%83%E0%B8%81%E0%B8%A5%E0%B9%89%E0%B8%95%E0%B8%B1%E0%B8%A7-%E0%B8%81%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%B4%E0%B8%94-6cb10ca86c03?source=rss----103b05fd72e4---4</link>
            <guid isPermaLink="false">https://medium.com/p/6cb10ca86c03</guid>
            <category><![CDATA[super-ai-engineer]]></category>
            <category><![CDATA[kiddeesuperai]]></category>
            <dc:creator><![CDATA[Jest.]]></dc:creator>
            <pubDate>Fri, 02 Apr 2021 08:04:43 GMT</pubDate>
            <atom:updated>2021-04-02T08:04:43.369Z</atom:updated>
            <content:encoded><![CDATA[<p>ในยุคที่ข้อมูลข่าวสารเติบโตอย่างรวดเร็ว (หรือ ยุค Big Data) ที่ไม่ว่าใครจะทำอะไร ล้วนทิ้ง ร่องรอยหลักฐานทางดิจิตอลเอาไว้ทั้งสิ้น ไม่ว่าจะเป็นการส่งข้อความหาเพื่อน กดไลค์คลิปวิดิโอที่ตนชื่นชอบ ซึ่งข้อมูลเหล่านี้ถูกนำไปใช้ประโยชน์ในด้านต่างๆ ทั้งในแง่ดี และแง่ร้าย เชื่อว่าท่านผู้อ่านหลายๆ ท่านคงจะมีประสบการณ์เจอกับโฆษณาสินค้าที่กำลังต้องการ หรือจะเป็นการดูวิดิโอใน Youtube ที่สามารถนั่งดูได้ทั้งวัน เพราะมีแต่วิดิโอประเภทที่ตนชื่นชอบู ฟังดูแล้วเหมือนแพลทฟอร์มเหล่านี้จะมีระบบอัจฉริยะที่รู้ใจเรามาก ทำงานอยู่เบื้องหลัง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*gYr9oKMkjxSF_D-2dY686w.jpeg" /></figure><p>ใบบทความนี้ผมจะพาท่านผู้อ่านมาทำความรู้จักกับเบื้องหลังของระบบอัจฉริยะนี้ แท้จริงแล้วมันเรียบง่ายเพียงใด และเราจะสามารถประยุกต์ใช้แนวคิดของระบบนี้ในชีวิตประจำวัน หรือแม้กระทั่งต่อยอดสร้างระบบแนะนำอัจฉริยะของตัวเองได้อย่างไร ระบบนี้มีชื่อว่า <strong>“ระบบผู้ช่วยแนะนำ”</strong> หรือ <strong>“Recommender Systems”</strong></p><p>Recommender Systems ที่ใช้กันแบ่งได้เป็น 3 ประเภท หลักๆ ได้แก่</p><ol><li><strong>Demographic Filtering</strong>: เป็นการคัดกรองที่เริ่มจากแนวคิดที่พื้นฐานที่ว่า <strong>หากสิ่งใดได้รับความนิยมโดยคนหมู่มาก โอกาสเป็นไปได้สูงที่จะผ่านเกณฑ์ความชอบเฉลี่ย ของคนทั่วๆ ไป</strong> ตัวอย่างเช่น มีคนแนะนำว่า “ซีรีย์เรื่อง Game of Thrones สนุกมากก! นายลองดูสิ” จริงๆ แล้วคนแนะนำอาจจะยังไม่เคยดู แต่คนส่วนมากบอกว่าสนุกจึงแนะนำเพื่อนต่อ (เพราะคิดว่าเพื่อนต้องชอบแน่)</li><li><strong>Content Based Filtering</strong>: เป็นการคัดกรองที่เริ่มจากเนื้อหาภายในข้อมูลนั้นๆ ที่มีความคล้ายคลึงกับพฤติกรรมของผู้บริโภค หรือผู้ใช้งานในอดีต ผมขอยกตัวอย่าง สถานการ์ณสมมุติ ที่ผมได้มีโอกาสแนะนำให้เพื่อนซื้อแผ่นเกมส์ PS4 โดยมี 4 เกมส์ เป็นตัวเลือก ได้แก่ <em>1.God of War 2.Diablo 3.Overcooked </em>และ <em>4.Detroit: Become Human </em>และสมมุติว่าในสถานการ์ณนี้ ทรัพยากรในกระเป๋าตังมีอยู่อย่างจำกัด ผมต้องเลือก 1 ตัวเลือก จาก 4 เกมส์ข้างต้น มาแนะนำ เพื่อให้เพื่อนประทับใจ และเล่นมันอย่างคุ้มค่า! ผมจึงสร้างระบบผู้ช่วยแนะนำของผมขึ้นมา ซึ่งเป็นตารางลักษณะดังนี้</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jYfu-kL3IEKajxBF02PkUg.png" /></figure><blockquote><strong>ข้อสังเกตุ: </strong>จะเห็นว่าฟีเจอร์อธิบายเกมส์ส่วนใหญ่ ไม่ว่าจะเป็น <strong>คำบรรยายเกมส์</strong> <strong>ความรุนแรง ระยะเวลาเคลียเกมส์</strong> และ<strong>อิสระในการเล่น</strong> ล้วนเป็นสิ่งที่ผมใส่ความเห็นของตนเองลงไป เพื่อใช้เป็นตัวคัดกรองในการทำระบบผู้ช่วยแนะนำ ดังนั้น<strong>ในระบบ Content Based Filtering จะอาศัยความรู้ ความเชี่ยวชาญในเนื้อหาของข้อมูล</strong></blockquote><p>ซึ่งก่อนหน้านี้ผมมีประวัติของเพื่อนว่า เพื่อนผมติดเกมส์มือถือ “Ragnarok Online (RO)” มาก่อน ซึ่งหากเรานำ RO เพิ่มเข้ามาในตารางเพื่อทำการเปรียบเทียบกับเกมส์อื่นๆ จะพบว่า…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H84CMCWdXOjWlHBOTaGQzw.png" /></figure><p>เราจะสามารถสร้างระบบ<strong>รวมคะแนนขึ้นจากฟีเจอร์ที่วัดผลได้</strong> (ไม่รวมคอลัมม์ <strong>บรรยายเกมส์</strong>) โดย<strong>ให้คะแนนความตรงกันเท่ากับ 1 </strong>เราจะวัด<strong>คะแนนความตรงกัน</strong>ของเกมส์ต่างๆ กับเกมส์ที่เพื่อนเคยเล่นได้ดังนี้</p><ul><li>God of War มีความเหมือนกัน 1 ช่อง = <em>1 คะแนน</em></li><li>Diablo มีความเหมือนกัน 4 ช่อง = <em>4 คะแนน</em></li><li>Overcooked มีความเหมือนกัน 1 ช่อง = <em>1 คะแนน</em></li><li>Detroit: Become Human มีความเหมือนกัน 2 ช่อง = <em>2 คะแนน</em></li></ul><p>สุดท้ายเราได้ข้อสรุปว่า เกมส์ที่เหมาะกับเพื่อนผมมากที่สุดคือเกมส์ “Diablo” และรองลงมาคือ “Detroit: Become Human”</p><p>จากระบบ Content Based Filtering ข้างต้น ท่านผู้อ่านบางคนอาจจะเห็นจุดอ่อน เช่น <strong>การให้น้ำหนักความสำคัญกับทุกฟีเจอร์เท่าๆ กัน</strong> กล่าวคือบางทีเพื่อนเราอาจจะชอบเกมส์ที่เล่นด้วยกันหลายคนมากกว่าฟีเจอร์อื่นๆ หรือความ<strong>ระดับความรุนแรงของเกมส์ ที่ผมทึกทักขึ้นมาเอง อาจะไม่ตรงกับความเห็นของเพื่อน</strong> จากระบบนี้แสดงให้เห็นว่า ยิ่งเรารู้ข้อมูลของเพื่อนและตัวเกมส์ มากเท่าไหร่ ยิ่งทำให้ผลลัพธ์เป็นที่น่าพอใจมากขึ้นเท่านั้น</p><p>3. <strong>Collaborative Filtering</strong>: อาจกล่าวได้ว่า ระบบนี้เป็นการคัดกรองที่ทำงานตรงข้ามกับระบบที่ 2 โดยจะดูจากบริบท แล้วค้นหาความสัมพันธ์ที่ซ่อนอยู่ ว่าผู้บริโภค หรือผู้ใช้งานมีแนวโน้มจะชอบอะไร ผมจะยกตัวอย่างการซื้อเกมส์อีกรอบ เพื่อให้เห็นภาพเปรียบเทียบที่ชัดเจนยิ่งขึ้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8arwpGdugNkTren6VjCVIA.png" /></figure><p>ในกรณีนี้เราจะนำประวัติความชอบ ของคนที่เคยเล่นเกมส์ต่างๆ ได้แก่ โรเจอร์ ซาโบ้ ไคโด มัลโก้ และเพื่อนของผม มาเปรียบเทียบกัน จากตาราง จะเห็นได้ว่า ซาโบ้ และ มัลโก้ ชอบเล่นเกมส์ Ragnarok Online (ซึ่งคล้ายกันกับเพื่อนผม) ซึ่งทั้งสองยังชอบเล่นเกมส์ Diablo เหมือนกันอีกด้วย ดังนั้นจึงสรุปได้ว่า เพื่อนผมมีแนวโน้มที่จะชอบเกมส์ Diablo เหมือนกันกับสองคนนี้ <strong>หรือ</strong></p><p><strong>“เกมส์ Diablo กับ Ragnarok จะต้องมีอะไรภายในบางอย่างที่ทำให้ พวกเขาชอบมันเหมือนกัน”</strong></p><blockquote><strong>ข้อสังเกตุ:</strong> ด้วยวิธีการนี้ จะใ<strong>ห้ระบบคัดกรองทำการสกัดข้อมูลแฝงออกมาจากตัวเกมส์ </strong>โ<strong>ดยที่เราไม่ต้องคิดค้นฟีเจอร์ต่างๆ ขึ้นเอง เหมือนวิธีก่อนหน้า</strong> <strong>แต่ใช้ความสัมพันธ์ของผลลัพธ์ “ความชอบ” ที่คล้ายคลึงกันในการอนุมาน</strong> หากมีตัวอย่างเยอะๆ จะทำให้การคัดกรองมีประสิทธิภาพมากขึ้น</blockquote><p>หากสังเกตุดีๆ แท้จริงแล้วแนวคิดการสร้าง Recommender Systems นั้นมาจากตรรกะที่เรียบง่ายบวกกับประสบการณ์ในชีวิตประจำวันของเรา เพียงแต่ด้วยข้อมูลมากมายมหาศาลในปัจจุบัน ทำให้ความซับซ้อนของระบบผู้ช่วยแนะนำนั้นมากขึ้นตามไปด้วย และนั่นคือเหตุผลที่ทำให้ระบบผู้ช่วยแนะนำของเรามีความอัจฉริยะมากยิ่งขึ้น ซึ่งนอกเหนือจาก 3 ระบบข้างต้นแล้ว ยังมีการใช้ระบบผู้ช่วยแนะนำแบบลูกผสม หรือ Hybrid Recommender Systems เพื่อช่วยให้ผลแม่นยำและเป็นที่น่าพอใจมากขึ้นไปอีก ตอนนี้เชื่อว่าท่านผู้อ่านคงจะเข้าใจพื้นฐานของระบบผู้ช่วยแนะนำทั้ง 3 แบบแล้ว ซึ่งในบทความหน้าเราจะมาลองสร้างระบบผู้ช่วยแนะนำโดยการใช้ข้อมูลจริงกันดู . . .</p><p>ขอบคุณที่อ่านมาจนจบครับ</p><p>Jest.</p><p><strong>Reference:</strong></p><ul><li>How Recommender Systems Work (Netflix/Amazon):[<a href="https://www.youtube.com/watch?v=n3RKsY2H-NE">https://www.youtube.com/watch?v=n3RKsY2H-NE</a>]</li><li>Recommender Systems: [<a href="https://www.youtube.com/watch?v=Eeg1DEeWUjA">https://www.youtube.com/watch?v=Eeg1DEeWUjA</a>]</li><li>The Age of Recommender Systems: [<a href="https://www.kaggle.com/ibtesama/getting-started-with-a-movie-recommendation-system">https://www.kaggle.com/ibtesama/getting-started-with-a-movie-recommendation-system</a>]</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cb10ca86c03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-ai-engineer/%E0%B8%A3%E0%B8%B0%E0%B8%9A%E0%B8%9A%E0%B8%9C%E0%B8%B9%E0%B9%89%E0%B8%8A%E0%B9%88%E0%B8%A7%E0%B8%A2%E0%B9%81%E0%B8%99%E0%B8%B0%E0%B8%99%E0%B8%B3-recommender-systems-%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%9A%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2-%E0%B9%83%E0%B8%81%E0%B8%A5%E0%B9%89%E0%B8%95%E0%B8%B1%E0%B8%A7-%E0%B8%81%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%B4%E0%B8%94-6cb10ca86c03">ระบบผู้ช่วยแนะนำ(Recommender Systems) เรียบง่าย ใกล้ตัว กว่าที่คิด</a> was originally published in <a href="https://medium.com/super-ai-engineer">Super AI Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>