<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Blog #6: Third Eye for Blind - Final Blog</title><link>/challenges-projects/design-challenges/eye-on-intelligence-challenge/b/blog/posts/blog-6-third-eye-for-blind---final-blog</link><description>Introduction
About 2.2 Billion people globally don&amp;rsquo;t have the capability to see. Due to blindness or shortsight, they cannot perceive their environment and navigate like normal humans which results in reduced mobility. In my country, I see most...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Blog #6: Third Eye for Blind - Final Blog</title><link>https://community.element14.com/challenges-projects/design-challenges/eye-on-intelligence-challenge/b/blog/posts/blog-6-third-eye-for-blind---final-blog</link><pubDate>Fri, 06 Dec 2024 12:22:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:55a715cb-4f53-4d2a-9dc0-a99daae2fb84</guid><dc:creator>bidrohini</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Where did you buy this Xillinx board from?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28530&amp;AppID=445&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Blog #6: Third Eye for Blind - Final Blog</title><link>https://community.element14.com/challenges-projects/design-challenges/eye-on-intelligence-challenge/b/blog/posts/blog-6-third-eye-for-blind---final-blog</link><pubDate>Wed, 20 Nov 2024 18:26:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:55a715cb-4f53-4d2a-9dc0-a99daae2fb84</guid><dc:creator>taifur</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I made an update on the code. The Python code is below:&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:51184171-deec-4d41-b644-b3d024f48c1e:type=python&amp;text=import%20cv2%0Aimport%20time%0Aimport%20wave%0Aimport%20pyttsx3%0Aimport%20argparse%0Aimport%20numpy%20as%20np%0A%0Afrom%20matplotlib%20import%20pyplot%20as%20plt%0Afrom%20time%20import%20sleep%0Afrom%20pynq.overlays.base%20import%20BaseOverlay%0A%0Abase%20%3D%20BaseOverlay%28%22base.bit%22%29%0ApAudio%20%3D%20base.audio%0A%0Adef%20load_yolo%28%29%3A%0A%20%20%20%20net%20%3D%20cv2.dnn.readNet%28%22yolov3.weights%22%2C%20%22yolov3.cfg%22%29%0A%20%20%20%20classes%20%3D%20%5B%5D%0A%20%20%20%20with%20open%28%22coco.names%22%2C%20%22r%22%29%20as%20f%3A%0A%20%20%20%20%20%20%20%20classes%20%3D%20%5Bline.strip%28%29%20for%20line%20in%20f.readlines%28%29%5D%0A%20%20%20%20%0A%20%20%20%20output_layers%20%3D%20%5Blayer_name%20for%20layer_name%20in%20net.getUnconnectedOutLayersNames%28%29%5D%0A%20%20%20%20colors%20%3D%20np.random.uniform%280%2C%20255%2C%20size%3D%28len%28classes%29%2C%203%29%29%0A%20%20%20%20return%20net%2C%20classes%2C%20colors%2C%20output_layers%0A%0Adef%20load_image%28img_path%29%3A%0A%20%20%20%20%23%20image%20loading%0A%20%20%20%20img%20%3D%20cv2.imread%28img_path%29%0A%20%20%20%20img%20%3D%20cv2.resize%28img%2C%20None%2C%20fx%3D0.4%2C%20fy%3D0.4%29%0A%20%20%20%20height%2C%20width%2C%20channels%20%3D%20img.shape%0A%20%20%20%20return%20img%2C%20height%2C%20width%2C%20channels%0A%0Adef%20detect_objects%28img%2C%20net%2C%20outputLayers%29%3A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20blob%20%3D%20cv2.dnn.blobFromImage%28img%2C%20scalefactor%3D0.00392%2C%20size%3D%28320%2C%20320%29%2C%20mean%3D%280%2C%200%2C%200%29%2C%20swapRB%3DTrue%2C%20crop%3DFalse%29%0A%20%20%20%20net.setInput%28blob%29%0A%20%20%20%20outputs%20%3D%20net.forward%28outputLayers%29%0A%20%20%20%20return%20blob%2C%20outputs%0A%0Adef%20get_box_dimensions%28outputs%2C%20height%2C%20width%29%3A%0A%20%20%20%20boxes%20%3D%20%5B%5D%0A%20%20%20%20confs%20%3D%20%5B%5D%0A%20%20%20%20class_ids%20%3D%20%5B%5D%0A%20%20%20%20for%20output%20in%20outputs%3A%0A%20%20%20%20%20%20%20%20for%20detect%20in%20output%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20scores%20%3D%20detect%5B5%3A%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%23print%28scores%29%0A%20%20%20%20%20%20%20%20%20%20%20%20class_id%20%3D%20np.argmax%28scores%29%0A%20%20%20%20%20%20%20%20%20%20%20%20conf%20%3D%20scores%5Bclass_id%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20conf%20%3E%200.3%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20center_x%20%3D%20int%28detect%5B0%5D%20%2A%20width%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20center_y%20%3D%20int%28detect%5B1%5D%20%2A%20height%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20w%20%3D%20int%28detect%5B2%5D%20%2A%20width%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20h%20%3D%20int%28detect%5B3%5D%20%2A%20height%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20x%20%3D%20int%28center_x%20-%20w%2F2%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20y%20%3D%20int%28center_y%20-%20h%20%2F%202%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20boxes.append%28%5Bx%2C%20y%2C%20w%2C%20h%5D%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20confs.append%28float%28conf%29%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20class_ids.append%28class_id%29%0A%20%20%20%20return%20boxes%2C%20confs%2C%20class_ids%0A%0Adef%20draw_labels%28boxes%2C%20confs%2C%20colors%2C%20class_ids%2C%20classes%2C%20img%29%3A%0A%20%20%20%20indexes%20%3D%20cv2.dnn.NMSBoxes%28boxes%2C%20confs%2C%200.5%2C%200.4%29%0A%20%20%20%20font%20%3D%20cv2.FONT_HERSHEY_PLAIN%0A%20%20%20%20for%20i%20in%20range%28len%28boxes%29%29%3A%0A%20%20%20%20%20%20%20%20if%20i%20in%20indexes%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20x%2C%20y%2C%20w%2C%20h%20%3D%20boxes%5Bi%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20label%20%3D%20str%28classes%5Bclass_ids%5Bi%5D%5D%29%0A%20%20%20%20%20%20%20%20%20%20%20%20print%28label%29%0A%20%20%20%20%20%20%20%20%20%20%20%20color%20%3D%20colors%5Bi%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20color1%20%3D%20%28255%2C0%2C0%29%0A%20%20%20%20%20%20%20%20%20%20%20%20cv2.rectangle%28img%2C%20%28x%2Cy%29%2C%20%28x%2Bw%2C%20y%2Bh%29%2C%20color%2C%202%29%0A%20%20%20%20%20%20%20%20%20%20%20%20cv2.putText%28img%2C%20label%2C%20%28x%2C%20y%20-%205%29%2C%20font%2C%204%2C%20color1%2C%202%29%0A%20%20%20%20%23cv2.imshow%28%22Image%22%2C%20img%29%20%23a%20hdmi%20monitor%2Fdisplay%20is%20required%20to%20run%20this%20function%0A%20%20%20%20plt.imshow%28cv2.cvtColor%28img%2C%20cv2.COLOR_BGR2RGB%29%29%0A%20%20%20%20plt.show%28%29%0A%20%20%20%20return%20label%0A%20%20%20%20%0Adef%20start_webcam%28%29%3A%0A%20%20%20%20cap%20%3D%20cv2.VideoCapture%280%29%0A%20%20%20%20return%20cap%0A%20%20%20%20%0Adef%20webcam_detect%28%29%3A%0A%20%20%20%20model%2C%20classes%2C%20colors%2C%20output_layers%20%3D%20load_yolo%28%29%0A%20%20%20%20cap%20%3D%20start_webcam%28%29%0A%20%20%20%20while%20True%3A%0A%20%20%20%20%20%20%20%20_%2C%20frame%20%3D%20cap.read%28%29%0A%20%20%20%20%20%20%20%20height%2C%20width%2C%20channels%20%3D%20frame.shape%0A%20%20%20%20%20%20%20%20blob%2C%20outputs%20%3D%20detect_objects%28frame%2C%20model%2C%20output_layers%29%0A%20%20%20%20%20%20%20%20boxes%2C%20confs%2C%20class_ids%20%3D%20get_box_dimensions%28outputs%2C%20height%2C%20width%29%0A%20%20%20%20%20%20%20%20label%20%3D%20draw_labels%28boxes%2C%20confs%2C%20colors%2C%20class_ids%2C%20classes%2C%20frame%29%0A%20%20%20%20%20%20%20%20return%20label%0A%20%20%20%20%20%20%20%20key%20%3D%20cv2.waitKey%281%29%0A%20%20%20%20%20%20%20%20if%20key%20%3D%3D%2027%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20cap.release%28%29%0A%0A%23%20Initialize%20the%20pyttsx3%20engine%0Aengine%20%3D%20pyttsx3.init%28%29%0A%0A%23%20Set%20properties%20for%20the%20speech%20output%20%28optional%29%0Aengine.setProperty%28%27rate%27%2C%20150%29%20%20%23%20Speed%20of%20speech%0Aengine.setProperty%28%27volume%27%2C%201.0%29%20%20%23%20Volume%20%280.0%20to%201.0%29%0A%0A%23%20Set%20the%20output%20file%20name%0Aoutput_file%20%3D%20%27output.wav%27%0A%0Avolume%20%3D%205%0Awhile%20True%3A%0A%20%20%20%20global%20volume%0A%20%20%20%20if%20%28base.buttons%5B0%5D.read%28%29%3D%3D1%29%3A%0A%20%20%20%20%20%20%20%20volume%20%3D%20volume%20%2B%201%0A%20%20%20%20%20%20%20%20if%20%28volume%20%3E%2010%29%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20volume%20%3D%2010%0A%20%20%20%20%20%20%20%20engine.setProperty%28%27volume%27%2C%20volume%2F10%29%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20if%20%28base.buttons%5B1%5D.read%28%29%3D%3D1%29%3A%0A%20%20%20%20%20%20%20%20volume%20%3D%20volume%20-%201%0A%20%20%20%20%20%20%20%20if%20%28volume%20%3C%200%29%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20volume%20%3D%200%0A%20%20%20%20%20%20%20%20engine.setProperty%28%27volume%27%2C%20volume%2F10%29%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20detected_label%20%3D%20webcam_detect%28%29%0A%20%20%20%20text%20%3D%20detected_label%0A%20%20%20%20engine.save_to_file%28text%2C%20output_file%29%0A%0A%20%20%20%20%23%20Run%20the%20speech%20synthesis%0A%20%20%20%20engine.runAndWait%28%29%0A%20%20%20%20pAudio.load%28%22output.wav%22%29%0A%20%20%20%20pAudio.play%28%29]&amp;nbsp;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28530&amp;AppID=445&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Blog #6: Third Eye for Blind - Final Blog</title><link>https://community.element14.com/challenges-projects/design-challenges/eye-on-intelligence-challenge/b/blog/posts/blog-6-third-eye-for-blind---final-blog</link><pubDate>Tue, 19 Nov 2024 19:59:47 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:55a715cb-4f53-4d2a-9dc0-a99daae2fb84</guid><dc:creator>DAB</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Good finish, you did a very good job bringing your project to completion.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28530&amp;AppID=445&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Blog #6: Third Eye for Blind - Final Blog</title><link>https://community.element14.com/challenges-projects/design-challenges/eye-on-intelligence-challenge/b/blog/posts/blog-6-third-eye-for-blind---final-blog</link><pubDate>Tue, 19 Nov 2024 16:24:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:55a715cb-4f53-4d2a-9dc0-a99daae2fb84</guid><dc:creator>rsc</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Cool project, congratulations on finishing.&amp;nbsp; I feel your pain with all the software issues.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28530&amp;AppID=445&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Blog #6: Third Eye for Blind - Final Blog</title><link>https://community.element14.com/challenges-projects/design-challenges/eye-on-intelligence-challenge/b/blog/posts/blog-6-third-eye-for-blind---final-blog</link><pubDate>Tue, 19 Nov 2024 10:14:19 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:55a715cb-4f53-4d2a-9dc0-a99daae2fb84</guid><dc:creator>javagoza</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Well done&amp;nbsp;[mention:5a1cfe9081a4403c8a680a2b4d1abcfe:e9ed411860ed4f2ba0265705b8793d05]&amp;nbsp;, it has been very enriching to follow your blogs and your progress during this challenge.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28530&amp;AppID=445&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>