@ -0,0 +1,16 @@
|
||||
# Memulai dengan IoT
|
||||
|
||||
Pada bagian ini, Anda akan diperkenalkan dengan Internet of Things, dan mempelajari konsep dasar termasuk membangung proyek IoT 'Hello World' pertama Anda yang terhubung ke *cloud*. Proyek ini merupakan lampu malam yang akan menyala saat tingkat pencahayaan diukur dengan penurunan sensor. This project is a nightlight that lights up as light levels measured by a sensor drop.
|
||||
|
||||

|
||||
|
||||
## Topik
|
||||
|
||||
1. [Pengenalan IoT](lessons/1-introduction-to-iot/README.md)
|
||||
2. [Lebih dalam dengan IoT](lessons/2-deeper-dive/README.md)
|
||||
3. [Berinteraksi dengan dunia menggunakan sensor dan aktuator](lessons/3-sensors-and-actuators/README.md)
|
||||
4. [Menghubungkan perangkat Anda ke Internet](lessons/4-connect-internet/README.md)
|
||||
|
||||
## Kredit
|
||||
|
||||
Semua pelajaran ditulis dengan ♥️ oleh [Jim Bennett](https://GitHub.com/JimBobBennett)
|
@ -0,0 +1,284 @@
|
||||
# <div dir="rtl"> مقدمة لإنترنت الأشياء </div>
|
||||
|
||||

|
||||
|
||||
> <div dir="rtl"> خريطة من <a href="https://github.com/nitya">Nitya Narasimhan</a> </div>
|
||||
> <div dir="rtl"> اضغط على الصورة لتكبيرها </div>
|
||||
|
||||
## <div dir="rtl"> اختبار ما قبل المحاضرة </div>
|
||||
|
||||
[<div dir="rtl"> اختبار ما قبل المحاضرة </div>](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/1)
|
||||
|
||||
## <div dir="rtl"> المقدمة </div>
|
||||
|
||||
<div dir="rtl"> يغطي هذا الدرس بعض الموضوعات التمهيدية حول إنترنت الأشياء ، ويساعدك على إعداد أجهزتك. </div>
|
||||
|
||||
<div dir="rtl"> سنغطي في هذا الدرس: </div>
|
||||
|
||||
<div dir="rtl">
|
||||
|
||||
- [ ما هو انترنت الأشياء ](#what-is-the-internet-of-things)
|
||||
- [الأجهزة المتعلقة بانترنت الأشياء](#iot-devices)
|
||||
- [قم بإعداد جهازك](#set-up-your-device)
|
||||
- [تطبيقات انترنت الأشياء](#applications-of-iot)
|
||||
- [أمثلة على أجهزة إنترنت الأشياء التي قد تكون موجودة حولك](#examples-of-iot-devices-you-may-have-around-you)
|
||||
</div>
|
||||
|
||||
## <div dir="rtl"> ما هو "انترنت الأشياء"؟ </div>
|
||||
|
||||
<div dir="rtl"> مصطلح "إنترنت الأشياء" ابتكره
|
||||
<a href="https://wikipedia.org/wiki/KevinAshton">Kevin Ashton</a>
|
||||
في عام 1999 ، للإشارة إلى توصيل الإنترنت بالعالم المادي عبر أجهزة الاستشعار. منذ ذلك الحين ، تم استخدام المصطلح لوصف أي جهاز يتفاعل مع العالم المادي من حوله ، إما عن طريق جمع البيانات من أجهزة الاستشعار ، أو توفير تفاعلات في العالم الحقيقي عبر المشغلات (الأجهزة التي تقوم بشيء مثل تشغيل مفتاح أو إضاءة LED ) ، متصلة بشكل عام بأجهزة أخرى أو بالإنترنت. </div>
|
||||
|
||||
> <div dir="rtl"> المستشعرات تجمع المعلومات من العالم ، مثل قياس السرعة أو درجة الحرارة أو الموقع. </div>
|
||||
>
|
||||
> <div dir="rtl"> المشغلات تحول الإشارات الكهربائية إلى تفاعلات في العالم الحقيقي مثل تشغيل مفتاح أو تشغيل الأضواء أو إصدار أصوات أو إرسال إشارات تحكم إلى أجهزة أخرى ، على سبيل المثال لتشغيل مقبس طاقة. </div>
|
||||
|
||||
<div dir="rtl">إن إنترنت الأشياء كمجال تقني هو أكثر من مجرد أجهزة - فهو يشمل الخدمات المستندة إلى السحابة التي يمكنها معالجة بيانات المستشعر ، أو إرسال طلبات إلى المشغلات المتصلة بأجهزة إنترنت الأشياء. ويشمل أيضًا الأجهزة التي لا تحتوي على اتصال بالإنترنت أو لا تحتاج إليه ، وغالبًا ما يشار إليها باسم الأجهزة المتطورة. هذه هي الأجهزة التي يمكنها معالجة بيانات الاستشعار والاستجابة لها بنفسها ، وعادةً ما تستخدم نماذج الذكاء الاصطناعي المدربة في السحابة.</div>
|
||||
|
||||
<div dir="rtl">إنترنت الأشياء هو مجال تكنولوجي سريع النمو. تشير التقديرات إلى أنه بحلول نهاية عام 2020 ، تم نشر 30 مليار جهاز إنترنت الأشياء وتوصيلها بالإنترنت. بالنظر إلى المستقبل ، تشير التقديرات إلى أنه بحلول عام 2025 ، ستجمع أجهزة إنترنت الأشياء ما يقرب من 80 زيتابايت من البيانات ، أو 80 تريليون جيجابايت. هذا كثير من البيانات!</div>
|
||||
|
||||

|
||||
|
||||
<div dir="rtl">✅ قم بإجراء القليل من البحث: ما مقدار البيانات التي تم إنشاؤها بواسطة أجهزة إنترنت الأشياء المستخدمة بالفعل ، وكم يتم إهدارها؟ لماذا يتم تجاهل الكثير من البيانات؟ </div>
|
||||
|
||||
<div dir="rtl">
|
||||
هذه البيانات هي مفتاح نجاح إنترنت الأشياء. لكي تكون مطورًا ناجحًا لإنترنت الأشياء ، فأنت بحاجة إلى فهم البيانات التي تحتاج إلى جمعها ، وكيفية جمعها ، وكيفية اتخاذ القرارات بناءً عليها ، وكيفية استخدام هذه القرارات للتفاعل مع العالم المادي إذا لزم الأمر.</div>
|
||||
|
||||
## <div dir="rtl">الأجهزة المتعلقة بانترنت الأشياء</div>
|
||||
|
||||
<div dir="rtl">
|
||||
يرمز T في إنترنت الأشياء إلى الأشياء - الأجهزة التي تتفاعل مع العالم المادي من حولها إما عن طريق جمع البيانات من أجهزة الاستشعار ، أو توفير تفاعلات واقعية عبر المشغلات.
|
||||
|
||||
عادةً ما تكون الأجهزة المخصصة للإنتاج أو الاستخدام التجاري ، مثل أجهزة تتبع اللياقة البدنية للمستهلكين أو أجهزة التحكم في الآلات الصناعية ، مصنوعة خصيصًا. يستخدمون لوحات دوائر مخصصة ، وربما حتى معالجات مخصصة ، مصممة لتلبية احتياجات مهمة معينة ، سواء كانت صغيرة بما يكفي لتناسب معصمك ، أو متينة بما يكفي للعمل في درجات حرارة عالية ، أو ضغط مرتفع ، أو بيئة مصنع عالية الاهتزاز.
|
||||
|
||||
بصفتك مطورًا إما يتعلم عن إنترنت الأشياء أو يصنع نموذجًا أوليًا للجهاز ، فستحتاج إلى البدء بمجموعة أدوات التطوير. هذه أجهزة إنترنت الأشياء للأغراض العامة مصممة للمطورين لاستخدامها ، غالبًا مع ميزات لن تراها على جهاز إنتاج ، مثل مجموعة من المسامير الخارجية لتوصيل المستشعرات أو المشغلات بها ، أو الأجهزة لدعم التصحيح ، أو الموارد الإضافية التي سيضيف تكلفة غير ضرورية عند إجراء عملية تصنيع كبيرة.
|
||||
|
||||
تنقسم مجموعات المطورين هذه عادةً إلى فئتين - المتحكمات الدقيقة وأجهزة الكمبيوتر أحادية اللوحة. سيتم تقديم هذه هنا ، وسنتناول المزيد من التفاصيل في الدرس التالي.
|
||||
|
||||
>💁يمكن أيضًا اعتبار هاتفك جهاز إنترنت الأشياء للأغراض العامة ، مع أجهزة استشعار ومحركات مدمجة ، مع تطبيقات مختلفة تستخدم المستشعرات والمشغلات بطرق مختلفة مع خدمات سحابية مختلفة. يمكنك أيضًا العثور على بعض البرامج التعليمية لإنترنت الأشياء التي تستخدم تطبيق الهاتف كجهاز إنترنت الأشياء.
|
||||
|
||||
</div>
|
||||
|
||||
</br>
|
||||
|
||||
### <div dir="rtl">المتحكم الدقيق</div>
|
||||
|
||||
<div dir="rtl">
|
||||
المتحكم الدقيق (يشار إليه أيضًا باسم MCU ، اختصارًا لوحدة التحكم الدقيقة) هو جهاز كمبيوتر صغير يتكون من:
|
||||
|
||||
🧠 واحدة أو أكثر من وحدات المعالجة المركزية (CPUs) - "عقل" المتحكم الدقيق الذي يدير برنامجك
|
||||
|
||||
💾 الذاكرة (ذاكرة الوصول العشوائي وذاكرة البرنامج) - حيث يتم تخزين البرنامج والبيانات والمتغيرات الخاصة بك
|
||||
|
||||
🔌 اتصالات الإدخال / الإخراج القابلة للبرمجة (I / O) - للتحدث إلى الأجهزة الطرفية الخارجية (الأجهزة المتصلة) مثل المستشعرات والمشغلات
|
||||
|
||||
عادةً ما تكون وحدات التحكم الدقيقة أجهزة حوسبة منخفضة التكلفة ، حيث ينخفض متوسط أسعار الأجهزة المستخدمة في الأجهزة المخصصة إلى حوالي 0.50 دولار أمريكي ، وبعض الأجهزة رخيصة مثل 0.03 دولار أمريكي. يمكن أن تبدأ مجموعات المطورين بسعر منخفض يصل إلى 4 دولارات أمريكية ، مع ارتفاع التكاليف كلما أضفت المزيد من الميزات. <a href="https://www.seeedstudio.com/Wio-Terminal-p-4509.html">محطة Wio</a>, مجموعة مطور متحكم من <a href="https://www.seeedstudio.com">Seeed studios</a> تحتوي على أجهزة استشعار ومحركات واي فاي وشاشة تكلف حوالي 30 دولارًا أمريكيًا.
|
||||
</div>
|
||||
|
||||

|
||||
|
||||
> <div dir="rtl">💁 عند البحث في الإنترنت عن المتحكمات الدقيقة ، احذر من البحث عن المصطلح MCU لأن هذا سيعيد لك الكثير من النتائج ل Marvel السينمائي ، وليس للمتحكمات الدقيقة.</div>
|
||||
|
||||
<div dir="rtl">
|
||||
تم تصميم وحدات التحكم الدقيقة بحيث تتم برمجتها للقيام بعدد محدود من المهام المحددة للغاية ، بدلاً من أن تكون أجهزة كمبيوتر للأغراض العامة مثل أجهزة الكمبيوتر الشخصية أو أجهزة Mac. باستثناء سيناريوهات محددة للغاية ، لا يمكنك توصيل الشاشة ولوحة المفاتيح والماوس واستخدامها في مهام الأغراض العامة.
|
||||
|
||||
عادة ما تأتي مجموعات مطوري وحدات التحكم الدقيقة بأجهزة استشعار ومشغلات إضافية على متنها. تحتوي معظم اللوحات على واحد أو أكثر من مصابيح LED التي يمكنك برمجتها ، بالاضافة الى الأجهزة الأخرى مثل المقابس القياسية لإضافة المزيد من أجهزة الاستشعار أو المشغلات باستخدام أنظمة بيئية مختلفة للمصنعين ، أو أجهزة استشعار مدمجة (عادةً ما تكون الأكثر شيوعًا مثل مستشعرات درجة الحرارة). تحتوي بعض وحدات التحكم الدقيقة على اتصال لاسلكي مدمج مثل Bluetooth أو WiFi ، أو تحتوي على وحدات تحكم دقيقة إضافية على اللوحة لإضافة هذا الاتصال.
|
||||
</div>
|
||||
|
||||
> <div dir="rtl">💁 عادة ما يتم برمجة المتحكمات الدقيقة في C / C ++. </div>
|
||||
|
||||
### <div dir="rtl"> أجهزة كمبيوتر أحادية اللوحة</div>
|
||||
|
||||
<div dir="rtl"> الكمبيوتر أحادي اللوحة هو جهاز حوسبة صغير يحتوي على جميع عناصر الكمبيوتر الكامل الموجودة على لوحة صغيرة واحدة. هذه هي الأجهزة التي لها مواصفات قريبة من سطح المكتب أو الكمبيوتر المحمول أو جهاز Mac ، وتعمل بنظام تشغيل كامل ، ولكنها صغيرة ، وتستخدم طاقة أقل ، وأرخص بكثير.</div>
|
||||
|
||||

|
||||
|
||||
|
||||
***Raspberry Pi 4. Michael Henzler / [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page) / [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)***
|
||||
|
||||
|
||||
<div dir="rtl">
|
||||
يعد Raspberry Pi أحد أشهر أجهزة الكمبيوتر أحادية اللوحة.
|
||||
|
||||
مثل وحدة التحكم الدقيقة ، تحتوي أجهزة الكمبيوتر أحادية اللوحة على وحدة معالجة مركزية وذاكرة ودبابيس إدخال / إخراج ، ولكنها تحتوي على ميزات إضافية مثل شريحة رسومات للسماح لك بتوصيل الشاشات ومخرجات الصوت ومنافذ USB مثل كاميرات الويب أو وحدات التخزين الخارجية. يتم تخزين البرامج على بطاقات SD أو محركات أقراص ثابتة بالاضافة الى نظام التشغيل ، بدلاً من شريحة ذاكرة مدمجة في اللوحة.
|
||||
</div>
|
||||
|
||||
> <div dir="rtl">🎓 يمكنك التفكير في الكمبيوتر أحادي اللوحة كإصدار أصغر وأرخص من الكمبيوتر الشخصي أو جهاز Mac الذي تقرأ عليه ، مع إضافة دبابيس GPIO (إدخال / إخراج للأغراض العامة) للتفاعل مع المستشعرات والمحركات.</div>
|
||||
|
||||
|
||||
<div dir="rtl">أجهزة الكمبيوتر أحادية اللوحة هي أجهزة كمبيوتر كاملة الميزات ، لذا يمكن برمجتها بأي لغة. عادةً ما تتم برمجة أجهزة إنترنت الأشياء بلغة Python.</div>
|
||||
</br>
|
||||
|
||||
### <div dir="rtl"> اختيارات الأجهزة لبقية الدروس</div>
|
||||
|
||||
<div dir="rtl">تتضمن جميع الدروس اللاحقة مهام باستخدام جهاز إنترنت الأشياء للتفاعل مع العالم والتواصل مع السحابة. يدعم كل درس 3 خيارات للأجهزة - Arduino (باستخدام Seeed Studios Wio Terminal) ، أو كمبيوتر لوحة واحدة ، إما جهاز (Raspberry Pi 4) ، أو جهاز كمبيوتر افتراضي أحادي اللوحة يعمل على الكمبيوتر الشخصي أو جهاز Mac.</div>
|
||||
|
||||
يمكنك أن تقرأ عن الأجهزة اللازمة لإكمال جميع المهام في ملف [hardware guide](../../../../hardware.md)
|
||||
|
||||
> <div dir="rtl">💁 لا تحتاج إلى شراء أي جهاز إنترنت الأشياء لإكمال المهام ، يمكنك القيام بكل شيء باستخدام جهاز كمبيوتر افتراضي أحادي اللوحة. </div>
|
||||
|
||||
<div dir="rtl">تحديد الأجهزة التي تختارها متروك لك - يعتمد ذلك على ما لديك إما في المنزل أو في مدرستك ، ولغة البرمجة التي تعرفها أو تخطط لتعلمها. سيستخدم كلا النوعين من الأجهزة نفس نظام المستشعر البيئي ، لذلك إذا بدأت في مسار واحد ، يمكنك التغيير إلى الآخر دون الحاجة إلى استبدال معظم المجموعة. سيكون الكمبيوتر الافتراضي أحادي اللوحة مكافئًا للتعلم على Raspberry Pi ، حيث يمكن نقل معظم الشفرة إلى Pi إذا حصلت في النهاية على جهاز ومستشعرات.</div>
|
||||
|
||||
</br>
|
||||
|
||||
### <div dir="rtl"> مجموعة مطوري Arduino </div>
|
||||
|
||||
<div dir="rtl"> إذا كنت مهتمًا بتعلم تطوير وحدة التحكم الدقيقة ، فيمكنك إكمال المهام باستخدام جهاز Arduino. ستحتاج إلى فهم أساسي لبرمجة C / C ++ ، حيث أن الدروس ستعلم فقط الكود ذي صلة بإطار عمل Arduino ، وأجهزة الاستشعار والمشغلات المستخدمة ، والمكتبات التي تتفاعل مع السحابة. </div>
|
||||
|
||||
<div dir="rtl"> ستستخدم الواجبات <a href="https://www.seeedstudio.com/Wio-Terminal-p-4509.html">Visual Studio Code</a> مع <a href="https://www.seeedstudio.com/Wio-Terminal-p-4509.html">امتداد PlatformIO لتطوير وحدة التحكم الدقيقة</a>. يمكنك أيضًا استخدام Arduino IDE إذا كنت من ذوي الخبرة في هذه الأداة ، حيث لن يتم توفير الإرشادات.</div>
|
||||
|
||||
</br>
|
||||
|
||||
### <div dir="rtl"> مجموعة مطوري الكمبيوتر أحادية اللوحة </div>
|
||||
|
||||
<div dir="rtl">
|
||||
إذا كنت مهتمًا بتعلم تطوير إنترنت الأشياء باستخدام أجهزة كمبيوتر أحادية اللوحة ، فيمكنك إكمال المهام باستخدام Raspberry Pi ، أو جهاز افتراضي يعمل على جهاز الكمبيوتر أو جهاز Mac.
|
||||
|
||||
ستحتاج إلى فهم أساسي لبرمجة Python ، حيث ستعلم الدروس فقط التعليمات البرمجية ذات الصلة بالمستشعرات والمشغلات المستخدمة والمكتبات التي تتفاعل مع السحابة.
|
||||
</div>
|
||||
|
||||
> <div dir="rtl">💁 إذا كنت تريد تعلم البرمجة في Python ، فراجع سلسلتي الفيديو التاليين:
|
||||
>
|
||||
>* [بايثون للمبتدئين](https://channel9.msdn.com/Series/Intro-to-Python-Development?WT.mc_id=academic-17441-jabenn)
|
||||
> * [ المزيد من بايثون للمبتدئين ](https://channel9.msdn.com/Series/More-Python-for-Beginners?WT.mc_id=academic-7372-jabenn)
|
||||
</div>
|
||||
|
||||
<div dir="rtl">
|
||||
الواجبات ستستخدم <a href="https://www.seeedstudio.com/Wio-Terminal-p-4509.html">Visual Studio Code</a>
|
||||
|
||||
إذا كنت تستخدم Raspberry Pi ، فيمكنك إما تشغيل Pi الخاص بك باستخدام إصدار سطح المكتب الكامل من Raspberry Pi OS ، والقيام بكل الترميز مباشرة على Pi باستخدام <a href="https://code.visualstudio.com/docs/setup/raspberry-pi?WT.mc_id=academic-17441-jabenn">the Raspberry Pi OS version of VS Code</a> ، أو قم بتشغيل Pi من جهاز الكمبيوتر أو جهاز Mac باستخدام VS Code مع <a href="https://code.visualstudio.com/docs/remote/ssh?WT.mc_id=academic-17441-jabenn">Remote SSH extension</a> التي يتيح لك الاتصال بـ Pi الخاص بك وتحرير التعليمات البرمجية وتصحيحها وتشغيلها كما لو كنت تقوم بالتشفير عليها مباشرةً.
|
||||
|
||||
إذا كنت تستخدم خيار الجهاز الظاهري ، فستقوم بالتشفير مباشرة على جهاز الكمبيوتر الخاص بك. بدلاً من الوصول إلى المستشعرات والمشغلات ، ستستخدم أداة لمحاكاة هذا الجهاز لتوفير قيم أجهزة الاستشعار التي يمكنك تحديدها ، وإظهار نتائج المشغلات على الشاشة.
|
||||
</div>
|
||||
|
||||
### <div dir="rtl"> قم بإعداد جهازك </div>
|
||||
|
||||
<div dir="rtl"> قبل أن تبدأ في برمجة جهاز إنترنت الأشياء الخاص بك ، ستحتاج إلى إجراء قدر صغير من الإعداد. اتبع التعليمات ذات الصلة أدناه بناءً على الجهاز الذي ستستخدمه. </div>
|
||||
|
||||
> <div dir="rtl">💁 إذا لم يكن لديك جهاز بعد ، فارجع إلى </div>
|
||||
>
|
||||
>[hardware guide](../../../../hardware.md) للمساعدة في تحديد الجهاز الذي ستستخدمه والأجهزة الإضافية التي تحتاج إلى شرائها. لا تحتاج إلى شراء أجهزة ، حيث يمكن تشغيل جميع المشاريع على أجهزة افتراضية.
|
||||
|
||||
<div dir="rtl">
|
||||
تتضمن هذه التعليمات ارتباطات إلى مواقع ويب تابعة لجهات خارجية من منشئي الأجهزة أو الأدوات التي ستستخدمها. هذا للتأكد من أنك تستخدم دائمًا أحدث الإرشادات للأدوات والأجهزة المختلفة.
|
||||
|
||||
اعمل من خلال الدليل ذي الصلة لإعداد جهازك وإكمال مشروع "Hello World". ستكون هذه هي الخطوة الأولى في إنشاء ضوء ليلي لإنترنت الأشياء على الدروس الأربعة .
|
||||
|
||||
* [ وحدة Arduino - Wio ](../wio-terminal.md)
|
||||
* [كمبيوتر ذو لوحة واحدة - Raspberry Pi](../pi.md)
|
||||
* [كمبيوتر ذو لوحة واحدة - جهاز افتراضي](../virtual-device.md)
|
||||
</div>
|
||||
|
||||
### <div dir="rtl"> تطبيقات إنترنت الأشياء </div>
|
||||
|
||||
<div dir="rtl">يغطي إنترنت الأشياء مجموعة كبيرة من حالات الاستخدام عبر مجموعات قليلة:
|
||||
|
||||
* انترنت الاشياء المستهلك
|
||||
* إنترنت الأشياء التجاري
|
||||
* إنترنت الأشياء الصناعي
|
||||
* انترنت الاشياء البنية التحتية
|
||||
</div>
|
||||
|
||||
<div dir="rtl">✅ قم ببعض البحث: لكل مجال من المجالات الموضحة أدناه ، ابحث عن مثال ملموس واحد لم يرد في النص.</div>
|
||||
|
||||
### <div dir="rtl"> انترنت الاشياء المستهلك </div>
|
||||
|
||||
<div dir="rtl">
|
||||
يشير IoT للمستهلكين إلى أجهزة IoT التي سيشتريها المستهلكون ويستخدمونها في المنزل. بعض هذه الأجهزة مفيدة بشكل لا يصدق ، مثل مكبرات الصوت الذكية وأنظمة التدفئة الذكية والمكانس الكهربائية الآلية. البعض الآخر مشكوك فيه في فائدته ، مثل الصنابير التي يتم التحكم فيها بالصوت والتي تعني بعد ذلك أنه لا يمكنك إيقاف تشغيلها لأن التحكم الصوتي لا يمكنه سماع صوت المياه الجارية.
|
||||
|
||||
تعمل أجهزة إنترنت الأشياء للمستهلكين على تمكين الأشخاص من تحقيق المزيد في محيطهم ، وخاصة المليار شخص من ذوي الإعاقة. يمكن للمكانس الكهربائية الروبوتية توفير أرضيات نظيفة للأشخاص الذين يعانون من مشاكل في الحركة والذين لا يستطيعون تنظيف أنفسهم ، وتسمح الأفران التي يتم التحكم فيها بالصوت للأشخاص ذوي الرؤية المحدودة أو التحكم في المحرك بتسخين أفرانهم بصوتهم فقط ، ويمكن أن تسمح أجهزة المراقبة الصحية للمرضى بمراقبة الحالات المزمنة بأنفسهم بمزيد من الانتظام والمزيد من التحديثات التفصيلية عن ظروفهم. أصبحت هذه الأجهزة منتشرة في كل مكان حتى أن الأطفال الصغار يستخدمونها كجزء من حياتهم اليومية ، على سبيل المثال الطلاب الذين يقومون بالتعليم الافتراضي أثناء جائحة COVID يضبطون أجهزة ضبط الوقت على الأجهزة المنزلية الذكية لتتبع أعمالهم المدرسية أو أجهزة الإنذار لتذكيرهم باجتماعات الفصل القادمة.
|
||||
</div>
|
||||
|
||||
|
||||
<div dir="rtl">✅ ما هي أجهزة IoT الاستهلاكية التي لديك أو في منزلك؟ </div>
|
||||
|
||||
</br>
|
||||
|
||||
### <div dir="rtl">انترنت الأشياء التجاري </div>
|
||||
|
||||
<div dir="rtl">
|
||||
يغطي إنترنت الأشياء التجاري استخدام إنترنت الأشياء في مكان العمل. في مكتب ما ، قد يكون هناك أجهزة استشعار إشغال وكاشفات حركة لإدارة الإضاءة والتدفئة لإبقاء الأضواء والتدفئة فقط عند عدم الحاجة إليها ، مما يقلل التكلفة وانبعاثات الكربون. في المصنع ، يمكن لأجهزة إنترنت الأشياء مراقبة مخاطر السلامة مثل عدم ارتداء العمال للقبعات الصلبة أو الضوضاء التي وصلت إلى مستويات خطيرة. في البيع بالتجزئة ، يمكن لأجهزة إنترنت الأشياء قياس درجة حرارة التخزين البارد ، وتنبيه صاحب المتجر إذا كانت الثلاجة أو الفريزر خارج نطاق درجة الحرارة المطلوبة ، أو يمكنهم مراقبة العناصر الموجودة على الأرفف لتوجيه الموظفين لإعادة تعبئة المنتجات التي تم بيعها. تعتمد صناعة النقل أكثر فأكثر على إنترنت الأشياء لمراقبة مواقع المركبات ، وتتبع الأميال على الطريق لشحن مستخدمي الطريق ، وتتبع ساعات السائق وانقطاع الامتثال ، أو إخطار الموظفين عند اقتراب مركبة من المستودع للاستعداد للتحميل أو التفريغ.
|
||||
</div>
|
||||
|
||||
|
||||
<div dir="rtl">✅ ما هي أجهزة إنترنت الأشياء التجارية المتوفرة لديك في مدرستك أو مكان عملك؟ </div>
|
||||
|
||||
</br>
|
||||
|
||||
### <div dir="rtl">انترنت الأشياء الصناعي </div>
|
||||
|
||||
<div dir="rtl">
|
||||
إنترنت الأشياء الصناعي ، أو IIoT ، هو استخدام أجهزة إنترنت الأشياء للتحكم في الآلات وإدارتها على نطاق واسع. يغطي هذا مجموعة واسعة من حالات الاستخدام ، من المصانع إلى الزراعة الرقمية.
|
||||
|
||||
تستخدم المصانع أجهزة إنترنت الأشياء بعدة طرق مختلفة. يمكن مراقبة الماكينات بأجهزة استشعار متعددة لتتبع أشياء مثل درجة الحرارة والاهتزاز وسرعة الدوران. يمكن بعد ذلك مراقبة هذه البيانات للسماح للجهاز بالتوقف إذا خرج عن تفاوتات معينة - يعمل على درجة حرارة عالية جدًا ويتم إيقاف تشغيله على سبيل المثال. يمكن أيضًا جمع هذه البيانات وتحليلها بمرور الوقت لإجراء الصيانة التنبؤية ، حيث ستنظر نماذج الذكاء الاصطناعي في البيانات المؤدية إلى الفشل ، وتستخدم ذلك للتنبؤ بحالات الفشل الأخرى قبل حدوثها.
|
||||
|
||||
تعتبر الزراعة الرقمية مهمة إذا كان كوكب الأرض يريد إطعام العدد المتزايد من السكان ، خاصة بالنسبة لملياري شخص في 500 مليون أسرة تعيش على <a href="https://wikipedia.org/wiki/Subsistence_agriculture">زراعة الكفاف</a> يمكن أن تتراوح الزراعة الرقمية من عدد قليل من أجهزة الاستشعار بالدولار الواحد ، إلى الأجهزة التجارية الضخمة. يمكن للمزارع أن يبدأ بمراقبة درجات الحرارة واستخدام <a href="https://wikipedia.org/wiki/Growing_degree-day">أيام الدرجات المتزايدة</a> للتنبؤ بموعد جاهزية المحصول للحصاد. يمكنهم ربط مراقبة رطوبة التربة بأنظمة الري الآلية لمنح نباتاتهم القدر المطلوب من المياه ، ولكن ليس أكثر لضمان عدم جفاف محاصيلهم دون إهدار المياه. بل إن المزارعين يأخذون الأمر إلى أبعد من ذلك ويستخدمون الطائرات بدون طيار وبيانات الأقمار الصناعية والذكاء الاصطناعي لمراقبة نمو المحاصيل والأمراض وجودة التربة في مساحات شاسعة من الأراضي الزراعية
|
||||
</div>
|
||||
|
||||
<div dir="rtl">✅ ما هي أجهزة إنترنت الأشياء الأخرى التي يمكن أن تساعد المزارعين؟ </div>
|
||||
|
||||
### <div dir="rtl"> انترنت الاشياء البنية التحتية </div>
|
||||
|
||||
<div dir="rtl"> يقوم إنترنت الأشياء للبنية التحتية بمراقبة والتحكم في البنية التحتية المحلية والعالمية التي يستخدمها الناس كل يوم. </div>
|
||||
|
||||
<div dir="rtl"> <a href="https://wikipedia.org/wiki/Growing_degree-day">المدن الذكية </a> هي مناطق حضرية تستخدم أجهزة إنترنت الأشياء لجمع البيانات حول المدينة واستخدامها لتحسين كيفية إدارة المدينة. عادة ما يتم تشغيل هذه المدن بالتعاون بين الحكومات المحلية والأوساط الأكاديمية والشركات المحلية ، وتتبع وإدارة الأشياء التي تختلف من النقل إلى وقوف السيارات والتلوث. على سبيل المثال ، في كوبنهاغن ، الدنمارك ، يعد تلوث الهواء مهمًا للسكان المحليين ، لذلك يتم قياسه واستخدام البيانات لتوفير معلومات حول أنظف طرق ركوب الدراجات والركض. </div>
|
||||
|
||||
|
||||
<div dir="rtl"> <a href="https://wikipedia.org/wiki/Smart_grid">شبكات الكهرباء الذكية </a> تسمح بتحليلات أفضل للطلب على الطاقة من خلال جمع بيانات الاستخدام على مستوى المنازل الفردية. يمكن أن توجه هذه البيانات القرارات على مستوى الدولة بما في ذلك مكان بناء محطات طاقة جديدة ، وعلى المستوى الشخصي من خلال إعطاء المستخدمين رؤى حول مقدار الطاقة التي يستخدمونها ، وأوقات استخدامها ، وحتى اقتراحات حول كيفية تقليل التكاليف ، مثل لشحن السيارات الكهربائية في الليل. </div>
|
||||
|
||||
<div dir="rtl">✅ إذا كان بإمكانك إضافة أجهزة إنترنت الأشياء لقياس أي شيء تعيش فيه ، فماذا سيكون؟</div>
|
||||
|
||||
</br>
|
||||
|
||||
### <div dir="rtl">أمثلة على أجهزة إنترنت الأشياء التي قد تكون موجودة حولك </div>
|
||||
|
||||
<div dir="rtl">
|
||||
|
||||
ستندهش من عدد أجهزة إنترنت الأشياء الموجودة حولك. أكتب هذا من المنزل و لدي الأجهزة التالية متصلة بالإنترنت بميزات ذكية مثل التحكم في التطبيق أو التحكم الصوتي أو القدرة على إرسال البيانات إلي عبر هاتفي:
|
||||
|
||||
* مكبرات صوت ذكية متعددة
|
||||
* ثلاجة وغسالة صحون وفرن وميكروويف
|
||||
* مرقاب كهرباء الألواح الشمسية
|
||||
* المقابس الذكية
|
||||
* جرس باب بالفيديو وكاميرات مراقبة
|
||||
* ترموستات ذكي مع عدة مستشعرات ذكية للغرفة
|
||||
* فتحت باب المرآب
|
||||
* أنظمة الترفيه المنزلي وأجهزة التلفزيون ذات التحكم الصوتي
|
||||
* أضواء
|
||||
* أجهزة تتبع اللياقة البدنية والصحة
|
||||
|
||||
كل هذه الأنواع من الأجهزة لها مستشعرات و / أو مشغلات وتتحدث إلى الإنترنت. يمكنني معرفة ما إذا كان باب الكاراج الخاص بي مفتوحًا من هاتفي ، وأطلب من السماعة الذكية إغلاقها من أجلي. يمكنني حتى ضبطه على مؤقت ، لذلك إذا كان لا يزال مفتوحًا في الليل ، فسيتم إغلاقه تلقائيًا. عندما يرن جرس الباب ، يمكنني أن أرى من هاتفي من يوجد أينما كنت في العالم ، وأتحدث إليهم عبر مكبر صوت وميكروفون مدمجين في جرس الباب. يمكنني مراقبة الجلوكوز في الدم ومعدل ضربات القلب وأنماط النوم ، والبحث عن أنماط في البيانات لتحسين صحتي. يمكنني التحكم في الأضواء الخاصة بي عبر السحابة ، والجلوس في الظلام عندما ينقطع الاتصال بالإنترنت.
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## <div dir="rtl">تحدي </div>
|
||||
|
||||
<div dir="rtl">ضع قائمة بأكبر عدد ممكن من أجهزة إنترنت الأشياء الموجودة في منزلك أو مدرستك أو مكان عملك - قد يكون هناك أكثر مما تعتقد! </div>
|
||||
|
||||
</br>
|
||||
|
||||
## <div dir="rtl">مسابقة ما بعد المحاضرة </div>
|
||||
|
||||
<div dir="rtl">
|
||||
<a href="https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/2">مسابقة ما بعد المحاضرة </a> </div>
|
||||
|
||||
</br>
|
||||
|
||||
## <div dir="rtl">المراجعة والدراسة الذاتية </div>
|
||||
|
||||
<div dir="rtl"> اقرأ عن مزايا وإخفاقات مشروعات إنترنت الأشياء للمستهلكين. تحقق من المواقع الإخبارية بحثًا عن مقالات عن الأوقات التي حدث فيها خطأ ، مثل مشكلات الخصوصية أو مشكلات الأجهزة أو المشكلات الناجمة عن نقص الاتصال.
|
||||
|
||||
بعض الأمثلة:
|
||||
|
||||
* قم بالاطلاع على حساب التويتر لأمثلة جيدة على انترنت الاشياء المستهلك **[Internet of Sh*t](https://twitter.com/internetofshit)** *(profanity warning)*
|
||||
* [c|net - My Apple Watch saved my life: 5 people share their stories](https://www.cnet.com/news/apple-watch-lifesaving-health-features-read-5-peoples-stories/)
|
||||
* [c|net - ADT technician pleads guilty to spying on customer camera feeds for years](https://www.cnet.com/news/adt-home-security-technician-pleads-guilty-to-spying-on-customer-camera-feeds-for-years/) *(trigger warning - non-consensual voyeurism)*
|
||||
|
||||
### الواجب
|
||||
|
||||
[التحقيق في مشروع إنترنت الأشياء](assignment.ar.md)
|
||||
|
||||
</div>
|
||||
|
@ -0,0 +1,99 @@
|
||||
# Pengenalan IoT
|
||||
|
||||

|
||||
|
||||
> Sketsa dibuat oleh [Nitya Narasimhan](https://github.com/nitya). Klik gambar untuk versi yang lebih besar.
|
||||
|
||||
## Kuis prakuliah
|
||||
|
||||
[Kuis prakuliah](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/1)
|
||||
|
||||
## Pengantar
|
||||
|
||||
Pelajaran ini mencakup beberapa topok pengantar mengenai Internet of Things, dan membuat Anda dapat mempersiapkan dan mengatur perangkat keras Anda.
|
||||
|
||||
Dalam pelajaran ini kita akan membahas:
|
||||
|
||||
* [Apa itu 'Internet of Things'?](#apa-itu-internet-of-things)
|
||||
* [Perangkat IoT](#perangkat-iot)
|
||||
* [Mengatur Perangkat Anda](#set-up-your-device)
|
||||
* [Penerapan dari IoT](#applications-of-iot)
|
||||
* [Contoh Perangkat IoT yang Mungkin Anda Punya di Sekitar](#examples-of-iot-devices-you-may-have-around-you)
|
||||
|
||||
## Apa itu 'Internet of Things'?
|
||||
|
||||
Istilah 'Internet of Things' diciptakan oleh [Kevin Ashton](https://wikipedia.org/wiki/Kevin_Ashton) pada tahun 1999, yang merujuk pada menghubungkan Internet ke dunia fisik melalui sensor. Sejak saat itu, istilah IoT digunakan untuk menggambarkan perangkat apa pun yang berinteraksi dengan dunia fisik di sekitarnya, baik dengan mengumpulkan data dari sensor, atau menyediakan interaksi dunia nyata melalui aktuator (perangkat yang melakukan sesuatu seperti menyalakan sakelar atau menyalakan LED), dan terhubung ke perangkat lain atau Internet.
|
||||
|
||||
> **Sensor** mengumpulkan informasi dari lingkungan, seperti mengukur kecepatan, suhu, atau lokasi.
|
||||
>
|
||||
> **Aktuator** mengubah sinyal listrik menjadi interaksi pada lingkungan seperti memicu sakelar, menyalakan lampu, membuat suara, atau mengirim *control signal* ke perangkat keras lain, misalnya untuk menyalakan soket listrik.
|
||||
|
||||
IoT sebagai suatu bidang teknologi lebih dari sekadar perangkat. Hal ini mencakup layanan berbasis cloud yang dapat memproses data sensor, atau mengirim permintaan ke aktuator yang terhubung ke perangkat IoT. IoT juga mencakup perangkat yang tidak memiliki atau tidak memerlukan konektivitas Internet, sering disebut sebagai *edge devices* atau perangkat tepi. Perangkat tepi adalah perangkat yang dapat memproses dan merespons data sensor itu sendiri, biasanya menggunakan model AI yang dilatih di cloud.
|
||||
|
||||
IoT merupakan bidang teknologi yang berkembang pesat. Diperkirakan pada akhir tahun 2020, 30 miliar perangkat IoT dikerahkan dan terhubung ke Internet. Jika melihat ke masa depan, diperkirakan pada tahun 2025, perangkat IoT akan mengumpulkan hampir 80 zettabytes data atau 80 triliun gigabyte. Banyak sekali bukan?
|
||||
|
||||

|
||||
|
||||
✅ Lakukan sedikit riset: Berapa banyak data yang dihasilkan oleh perangkat IoT yang benar-benar digunakan, dan berapa banyak yang terbuang? Mengapa begitu banyak data yang diabaikan?
|
||||
|
||||
Data ini adalah kunci kesuksesan IoT. Untuk menjadi pengembang IoT yang sukses, Anda perlu memahami data yang perlu Anda kumpulkan, cara mengumpulkannya, cara membuat keputusan berdasarkan data tersebut, dan cara menggunakan keputusan tersebut untuk berinteraksi dengan lingkungan fisik jika diperlukan.
|
||||
|
||||
## Perangkat IoT
|
||||
|
||||
Huruf **T** di IoT adalah singkatan dari **Things** - perangkat yang berinteraksi dengan lingkungan fisik di sekitarnya baik dengan mengumpulkan data dari sensor atau menyediakan interaksi dunia nyata melalui aktuator.
|
||||
|
||||
Perangkat untuk produksi atau penggunaan komersial, seperti pelacak kebugaran konsumen, atau pengontrol mesin industri, biasanya dibuat khusus. Mereka menggunakan papan sirkuit khusus, bahkan mungkin prosesor khusus, yang dirancang untuk memenuhi kebutuhan tugas tertentu, apakah itu cukup kecil untuk muat di pergelangan tangan, atau cukup kuat untuk bekerja di lingkungan pabrik dengan suhu tinggi, stres tinggi, atau getaran tinggi.
|
||||
|
||||
Sebagai pengembang yang belajar tentang IoT atau membuat prototipe perangkat, Anda harus mulai dengan *developer kit* atau perangkat pengembang. Perangkat tersebut adalah perangkat IoT untuk tujuan umum yang dirancang untuk digunakan pengembang, seringkali dengan fitur yang tidak akan Anda miliki di perangkat produksi, seperti satu set pin eksternal untuk menghubungkan sensor atau aktuator, perangkat keras untuk mendukung debugging, atau sumber daya tambahan yang akan menambah biaya yang tidak perlu saat melakukan produksi manufaktur.
|
||||
|
||||
Perangkat pengembang ini biasanya terbagi dalam dua kategori - mikrokontroler dan komputer papan tunggal. Perangkat tersebut akan diperkenalkan di sini, dan kita akan membahas lebih detail di pelajaran berikutnya.
|
||||
|
||||
> 💁 Ponsel Anda juga dapat dianggap sebagai perangkat IoT tujuan umum, dengan sensor dan aktuator bawaan, dengan berbagai aplikasi yang menggunakan sensor dan aktuator dengan cara yang berbeda dengan layanan cloud yang berbeda. Anda bahkan dapat menemukan beberapa tutorial IoT yang menggunakan aplikasi ponsel sebagai perangkat IoT.
|
||||
|
||||
### Mikrokontroler
|
||||
|
||||
Mikrokontroler atau Pengendali mikro (juga disebut sebagai MCU, kependekan dari microcontroller unit) adalah komputer kecil yang terdiri dari:
|
||||
|
||||
🧠 Satu atau lebih unit pemrosesan pusat (CPU) - 'otak' mikrokontroler yang menjalankan program Anda
|
||||
|
||||
💾 Memori (RAM dan memori program) - tempat program, data, dan variabel Anda disimpan
|
||||
|
||||
🔌 Koneksi input/output (I/O) yang dapat diprogram - untuk berbicara dengan periferal eksternal (perangkat yang terhubung) seperti sensor dan aktuator
|
||||
|
||||
Mikrokontroler biasanya merupakan perangkat komputasi berbiaya rendah, dengan harga rata-rata untuk yang digunakan dalam perangkat keras khusus turun menjadi sekitar US$0,50, dan beberapa perangkat bahkan semurah US$0,03. Perangkat pengembang dapat ditemukan mulai dari harga US$4, dengan biaya meningkat karena Anda menambahkan lebih banyak fitur. [Wio Terminal](https://www.seeedstudio.com/Wio-Terminal-p-4509.html), perangkat pengembang mikrokontroler dari [Seeed studios](https://www.seeedstudio.com) yang memiliki sensor , aktuator, WiFi, dan layar berharga sekitar US$30.
|
||||
|
||||

|
||||
|
||||
> 💁 Saat mencari mikrokontroler di Internet, berhati-hatilah saat mencari istilah **MCU** karena ini akan mengembalikan banyak hasil untuk Marvel Cinematic Universe, bukan mikrokontroler.
|
||||
|
||||
Mikrokontroler dirancang untuk diprogram untuk melakukan sejumlah tugas yang sangat spesifik, daripada menjadi komputer dengan tujuan umum seperti PC atau Mac. Kecuali untuk skenario yang sangat spesifik, Anda tidak dapat menghubungkan monitor, keyboard, dan mouse dan menggunakannya untuk tugas umum.
|
||||
|
||||
Perangkat pengembang mikrokontroler biasanya dilengkapi dengan sensor dan aktuator tambahan. Sebagian besar papan (board) akan memiliki satu atau lebih LED yang dapat Anda program, bersama dengan perangkat lain seperti steker standar untuk menambahkan lebih banyak sensor atau aktuator menggunakan berbagai ekosistem pabrikan atau sensor bawaan (biasanya yang paling populer seperti sensor suhu). Beberapa mikrokontroler memiliki konektivitas nirkabel bawaan seperti Bluetooth atau WiFi atau memiliki mikrokontroler tambahan di papan untuk menambahkan konektivitas ini.
|
||||
|
||||
> 💁 Mikrokontroler biasanya diprogram dalam bahasa C/C++.
|
||||
|
||||
### Komputer papan tunggal
|
||||
|
||||
Komputer papan tunggal adalah perangkat komputasi kecil yang memiliki semua elemen komputer lengkap yang terdapat pada satu papan kecil. Ini adalah perangkat yang memiliki spesifikasi yang mirip dengan desktop atau laptop PC atau Mac, menjalankan sistem operasi lengkap, tetapi berukuran kecil, menggunakan lebih sedikit daya, dan jauh lebih murah.
|
||||
|
||||

|
||||
|
||||
***Raspberry Pi 4. Michael Henzler / [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page) / [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)***
|
||||
|
||||
Raspberry Pi adalah salah satu komputer papan tunggal yang paling populer.
|
||||
|
||||
Seperti mikrokontroler, komputer papan tunggal memiliki CPU, memori dan pin input/output, tetapi mereka memiliki fitur tambahan seperti chip grafis untuk memungkinkan Anda menghubungkan monitor, output audio, dan port USB untuk menghubungkan mouse keyboard dan USB standar lainnya. perangkat seperti webcam atau penyimpanan eksternal. Program disimpan di kartu SD atau hard drive bersama dengan sistem operasi, bukan chip memori yang terpasang di papan.
|
||||
|
||||
> 🎓 Anda dapat menganggap komputer papan tunggal sebagai versi PC atau Mac yang lebih kecil dan lebih murah, dengan tambahan pin GPIO (general-purpose input/output) untuk berinteraksi dengan sensor dan aktuator.
|
||||
|
||||
Komputer papan tunggal adalah komputer berfitur lengkap, sehingga dapat diprogram dalam bahasa apa pun. Perangkat IoT biasanya diprogram dengan Python.
|
||||
|
||||
### Pilihan perangkat keras untuk sisa pelajaran
|
||||
|
||||
Semua pelajaran selanjutnya mencakup tugas menggunakan perangkat IoT untuk berinteraksi dengan dunia fisik dan berkomunikasi dengan cloud. Setiap pelajaran mendukung 3 pilihan perangkat - Arduino (menggunakan Terminal Seeed Studios Wio), atau komputer papan tunggal, baik perangkat fisik (Raspberry Pi 4) atau komputer papan tunggal virtual yang berjalan di PC atau Mac Anda.
|
||||
|
||||
Anda dapat membaca tentang perangkat keras yang diperlukan untuk menyelesaikan semua tugas di [panduan perangkat keras](../../../hardware.md).
|
||||
|
||||
> 💁 Anda tidak perlu membeli perangkat keras IoT apa pun untuk menyelesaikan tugas, Anda dapat melakukan semuanya menggunakan komputer papan tunggal virtual.
|
||||
|
||||
Perangkat keras mana yang Anda pilih terserah Anda - itu tergantung pada apa yang Anda miliki di rumah di sekolah Anda, dan bahasa pemrograman apa yang Anda ketahui atau rencanakan untuk dipelajari. Kedua varian perangkat keras akan menggunakan ekosistem sensor yang sama, jadi jika Anda memulai pada salah satu perangkat, Anda dapat dengan mudah melakukannya pada perangkat lain tanpa harus mengganti sebagian besar perangkat pengembang. Komputer papan tunggal virtual akan setara dengan pembelajaran di Raspberry Pi, dengan sebagian besar kode dapat ditransfer ke Pi jika Anda akhirnya mendapatkan perangkat dan sensor.
|
@ -0,0 +1,20 @@
|
||||
|
||||
<div dir="rtl">
|
||||
|
||||
# التحقيق في مشروع إنترنت الأشياء
|
||||
|
||||
## تعليمات
|
||||
|
||||
هناك العديد من مشاريع إنترنت الأشياء الكبيرة والصغيرة التي يتم طرحها على مستوى العالم ، من المزارع الذكية إلى المدن الذكية ، ومراقبة الرعاية الصحية ، والنقل ، أو استخدام الأماكن العامة.
|
||||
|
||||
ابحث في الويب عن تفاصيل المشروع الذي يثير اهتمامك ، ومن الأفضل أن يكون مشروعًا قريبًا من المكان الذي تعيش فيه. اشرح الجوانب الإيجابية والسلبية للمشروع ، مثل الفائدة التي تأتي منه ، وأي مشاكل يسببها وكيف يتم أخذ الخصوصية في الاعتبار.
|
||||
|
||||
## الموضوع
|
||||
|
||||
|
||||
| المعايير | نموذجي | كافية | يحتاج إلى تحسين |
|
||||
| -------- | --------- | -------- | ----------------- |
|
||||
| اشرح الإيجابيات والسلبيات | قدّم شرحاً واضحاً لأوجه الإيجابيات والسلبيات للمشروع | قدم شرحا مختصرا للجوانب الإيجابية والسلبية | لم يشرح الإيجابيات أو السلبيات |
|
||||
|
||||
|
||||
</div>
|
@ -0,0 +1,13 @@
|
||||
# একটি IoT প্রজেক্ট পর্যালোচনা
|
||||
|
||||
## নির্দেশাবলী
|
||||
|
||||
স্মার্ট ফার্ম থেকে শুরু করে স্মার্ট শহরগুলিতে, স্বাস্থ্যসেবা পর্যবেক্ষণ, পরিবহন এবং জনসাধারণের ব্যবহারের জন্য বিশ্বব্যাপী বড় এবং ছোট আকারের অনেক আইওটি প্রকল্প আসছে।
|
||||
|
||||
আপনার বসবাসের জায়গার আশেপাশের এমন কোন প্রকল্প থাকলে, সেটি সম্পর্কে ইন্টারনেটে সার্চ করুন। প্রজেক্টটির ইতিবাচক এবং নেতিবাচক দিকগুলো (যেমন: এটির কারণে কী কী সুবিধা হচ্ছে, কোন সমস্যা তৈরী করছে কিনা বা তথ্যের গোপনীয়তা সংক্রান্ত বিষয়গুলি কীভাবে দেখা হচ্ছে) ব্যখ্যা করুন।
|
||||
|
||||
## এসাইনমেন্ট মূল্যায়ন মানদন্ড
|
||||
|
||||
| ক্রাইটেরিয়া | দৃষ্টান্তমূলক ব্যখ্যা | পর্যাপ্ত ব্যখ্যা | আরো উন্নতির প্রয়োজন |
|
||||
| -------- | --------- | -------- | -----------------|
|
||||
| ইতিবাচক এবং নেতিবাচক দিকগুলোর ব্যখ্যা করুন | বিশদভাব ব্যখ্যা করা হয়েছে | সংক্ষিপ্ত ব্যখ্যা করা হয়েছে | ভালোভাবে ব্যখ্যা করা হয়নি |
|
@ -0,0 +1,16 @@
|
||||
<div dir="rtl">
|
||||
|
||||
# قارن بين المتحكمات الدقيقة وأجهزة الكمبيوتر أحادية اللوحة
|
||||
|
||||
## التعليمات
|
||||
|
||||
غطى هذا الدرس المتحكمات الدقيقة وأجهزة الكمبيوتر أحادية اللوحة. قم بإنشاء جدول لمقارنتها ، ولاحظ على الأقل سببين لاستخدام متحكم دقيق على جهاز كمبيوتر ذي لوحة واحدة ، وسببين على الأقل لاستخدام جهاز كمبيوتر من لوحة واحدة بدلاً من متحكم دقيق.
|
||||
|
||||
## نماذج
|
||||
|
||||
| معايير | نموذجي | مناسب | يحتاج الى تحسين |
|
||||
| -------- | --------- | -------- | ----------------- |
|
||||
| قم بإنشاء جدول يقارن المتحكمات الدقيقة بأجهزة الكمبيوتر أحادية اللوحة | إنشاء قائمة بالعناصر المتعددة للمقارنة والتباين بشكل صحيح | تم إنشاء قائمة تحتوي على عنصرين فقط | كان قادرًا على الخروج بعنصر واحد فقط ، أو لا توجد عناصر للمقارنة والتباين |
|
||||
| أسباب استخدام أحدهما على الآخر | كان قادرًا على تقديم سببين أو أكثر لاجهزة التحكم الدقيق ، وسببين أو أكثر لأجهزة الكمبيوتر ذات اللوحة الواحدة | كان قادرًا فقط على تقديم 1-2 سبب لمتحكم دقيق ، وسببين أو اكثر لجهاز كمبيوتر لوحة واحدة | لم يكن قادرًا على تقديم سبب واحد أو أكثر لمتحكم دقيق أو لجهاز كمبيوتر أحادي اللوحة |
|
||||
|
||||
<div>
|
@ -0,0 +1,13 @@
|
||||
# মাইক্রোকন্ট্রোলার এবং সিংগেল-বোর্ড কম্পিউটারের তুলনা করে পার্থক্য দাঁড় করানো
|
||||
|
||||
## নির্দেশনা
|
||||
|
||||
এই পাঠটিতে মাইক্রোকন্ট্রোলার এবং সিংগেল-বোর্ড কম্পিউটার নিয়ে আলোচনা হয়েছে । তাদের তুলনা করে এবং বিপরী্ত্য সম্বলিত একটি সারণী তৈরি করে কমপক্ষে ২টি কারণ লিখতে হবে যে কেন একটি সিংগেল-বোর্ড কম্পিউটারের পরিবর্তে মাইক্রোকন্ট্রোলার ব্যবহার করা উচিত। একইভাবে কমপক্ষে ২টি কারণ লিখতে হবে যে কেন একট মাইক্রোকন্ট্রোলারের পবিবর্তে সিংগেল-বোর্ড কম্পিউটার ব্যবহার করা উচিত।
|
||||
|
||||
|
||||
## এসাইনমেন্ট মূল্যায়ন মানদন্ড
|
||||
|
||||
| ক্রাইটেরিয়া | দৃষ্টান্তমূলক ব্যখ্যা (সর্বোত্তম) | পর্যাপ্ত ব্যখ্যা (মাঝারি) | আরো উন্নতির প্রয়োজন (নিম্ন) |
|
||||
| -------- | ---------------------- | ------------------- | ------------------------- |
|
||||
| একক-বোর্ড কম্পিউটারের সাথে মাইক্রোকন্ট্রোলার এর তুলনা করে একটি সারণী তৈরি করা | একাধিক আইটেম সঠিকভাবে তুলনা এবং বৈপরীত্যসহ একটি তালিকা তৈরি করেছে | কেবল অল্প কয়েকটি বিষয় নিয়ে একটি তালিকা তৈরি করেছে | শুধুমাত্র একটি বা শুণ্যটি তুলনা এবং বৈপরীত্যসহ তালিকা তৈরি করেছে |
|
||||
| একটির পরিবর্তে অন্যটি ব্যবিহারের কারণ | ২ বা ততোধিক কারণ প্রদর্শন করেছে | ১ বা ২টি কারণ প্রদর্শন করেছে | ১ বা ততোধিক কারণ প্রদর্শন করতে পারেনি |
|
@ -1,9 +1,10 @@
|
||||
import time
|
||||
import seeed_si114x
|
||||
from grove.grove_light_sensor_v1_2 import GroveLightSensor
|
||||
|
||||
light_sensor = seeed_si114x.grove_si114x()
|
||||
light_sensor = GroveLightSensor(0)
|
||||
|
||||
while True:
|
||||
light = light_sensor.ReadVisible
|
||||
light = light_sensor.light
|
||||
print('Light level:', light)
|
||||
|
||||
time.sleep(1)
|
@ -0,0 +1,21 @@
|
||||
<div dir="rtl">
|
||||
|
||||
# بحث مستشعرات و مشغلات
|
||||
|
||||
## تعليمات
|
||||
|
||||
غطى هذا الدرس أجهزة الاستشعار والمحركات. ابحث وأوصف مستشعرًا ومشغلًا واحدًا يمكن استخدامه مع مجموعة أدوات تطوير إنترنت الأشياء ، بما في ذلك:
|
||||
|
||||
* ماذا يفعل
|
||||
* الأجهزة الإلكترونية / الأجهزة المستخدمة بالداخل
|
||||
* هل هو تناظري أم رقمي
|
||||
* ما هي وحدات ونطاق المدخلات أو القياسات
|
||||
|
||||
## الموضوع
|
||||
|
||||
| المعايير | نموذجي | كافية | يحتاج إلى تحسين |
|
||||
| -------- | --------- | -------- | ----------------- |
|
||||
| وصف جهاز استشعار | وصف جهاز استشعار بما في ذلك تفاصيل عن جميع الأقسام الأربعة المذكورة أعلاه. | وصف جهاز استشعار ، ولكنه كان قادرًا فقط على توفير 2-3 من الأقسام أعلاه | وصف جهاز استشعار ، لكنه كان قادرًا فقط على توفير 1 من الأقسام أعلاه |
|
||||
| وصف المشغل | وصف المشغل بما في ذلك التفاصيل لجميع الأقسام الأربعة المذكورة أعلاه. | وصف مشغل ، لكنه كان قادرًا فقط على توفير 2-3 من الأقسام أعلاه | وصف مشغل ، لكنه كان قادرًا فقط على توفير 1 من الأقسام أعلاه |
|
||||
|
||||
</div>
|
@ -0,0 +1,17 @@
|
||||
# সেন্সর এবং অ্যাকচুয়েটর সংক্রান্ত গবেষণা
|
||||
|
||||
## নির্দেশনা
|
||||
|
||||
এই পাঠটিতে সেন্সর এবং অ্যাকচুয়েটর আলোচনা হয়েছে। একটি আইওটি ডেভলাপার কিটে ব্যবহার করা যেতে পারে এমন একটি সেন্সর এবং একটি অ্যাকচুয়েটর বর্ণনা করতে হবে, যেখানে উল্লেখ থাকবে:
|
||||
|
||||
* এটি কী কাজ করে
|
||||
* ভিতরে ব্যবহৃত ইলেকট্রনিক্স/হার্ডওয়্যার
|
||||
* এটি কি অ্যানালগ নাকি ডিজিটাল
|
||||
* ইনপুট বা পরিমাপের একক কী এবং যন্ত্রটির ব্যবহার্য সীমা (range) কতটুকু
|
||||
|
||||
## এসাইনমেন্ট মূল্যায়ন মানদন্ড
|
||||
|
||||
| ক্রাইটেরিয়া | দৃষ্টান্তমূলক ব্যখ্যা (সর্বোত্তম) | পর্যাপ্ত ব্যখ্যা (মাঝারি) | আরো উন্নতির প্রয়োজন (নিম্ন) |
|
||||
| -------- | --------- | -------- | ----------------- |
|
||||
| একটি সেন্সর সংক্রান্ত বর্ণনা | উপরে তালিকাভুক্ত 4 টি বিভাগের বিশদ ব্যখ্যা সহ সেন্সর বর্ণিত হয়েছে | একটি সেন্সর বর্ণিত হয়েছ, তবে উপরের তালিকা থেকে কেবল 2-3টি বিষয় ব্যখ্যা করতে সক্ষম হয়েছে | একটি সেন্সর বর্ণিত হয়েছ, তবে উপরের তালিকা থেকে কেবল 1টি বিষয় ব্যখ্যা করতে সক্ষম হয়েছে |
|
||||
| একটি অ্যাকচুয়েটর সংক্রান্ত বর্ণনা | উপরে তালিকাভুক্ত 4 টি বিভাগের বিশদ ব্যখ্যা সহ অ্যাকচুয়েটর বর্ণিত হয়েছে | একটি অ্যাকচুয়েটর বর্ণিত হয়েছ, তবে উপরের তালিকা থেকে কেবল 2-3টি বিষয় ব্যখ্যা করতে সক্ষম হয়েছে | একটি অ্যাকচুয়েটর বর্ণিত হয়েছ, তবে উপরের তালিকা থেকে কেবল 1টি বিষয় ব্যখ্যা করতে সক্ষম হয়েছে |
|
@ -1,9 +1,12 @@
|
||||
#
|
||||
# Deploy your app
|
||||
|
||||
## Instructions
|
||||
|
||||
There are several ways that you can deploy your app so that you can share it with the world, including using GitHub pages or using one of many service providers. A really excellent way to do this is to use Azure Static Web Apps. In this assignment, build your web app and deploy it to the cloud by following [these instructions](https://github.com/Azure/static-web-apps-cli) or watching [these videos](https://www.youtube.com/watch?v=ADVGIXciYn8&list=PLlrxD0HtieHgMPeBaDQFx9yNuFxx6S1VG&index=3).
|
||||
A benefit of using Azure Static Web Apps is that you can hide any API keys in the portal, so take this opportunity to refactor your subscriptionKey as a variable and store it in the cloud.
|
||||
|
||||
## Rubric
|
||||
|
||||
| Criteria | Exemplary | Adequate | Needs Improvement |
|
||||
| -------- | --------- | -------- | ----------------- |
|
||||
| | | | |
|
||||
| -------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
||||
| | A working web app is presented in a documented GitHub repository with its subscriptionKey stored in the cloud and called via a variable | A working web app is presented in a documented GitHub repository but its subscriptionKey is not stored in the cloud | The web app contains bugs or does not work properly |
|
||||
|
@ -0,0 +1,68 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.css"
|
||||
type="text/css" />
|
||||
<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.js"></script>
|
||||
<script type='text/javascript'>
|
||||
function init() {
|
||||
fetch("https://<storage_name>.blob.core.windows.net/gps-data/?restype=container&comp=list")
|
||||
.then(response => response.text())
|
||||
.then(str => new window.DOMParser().parseFromString(str, "text/xml"))
|
||||
.then(xml => {
|
||||
let blobList = Array.from(xml.querySelectorAll("Url"));
|
||||
blobList.forEach(async blobUrl => {
|
||||
loadJSON(blobUrl.innerHTML)
|
||||
});
|
||||
})
|
||||
.then(response => {
|
||||
map = new atlas.Map('myMap', {
|
||||
center: [-122.26473, 47.73444],
|
||||
zoom: 14,
|
||||
authOptions: {
|
||||
authType: "subscriptionKey",
|
||||
subscriptionKey: "<subscription_key>",
|
||||
|
||||
}
|
||||
});
|
||||
map.events.add('ready', function () {
|
||||
var source = new atlas.source.DataSource();
|
||||
map.sources.add(source);
|
||||
map.layers.add(new atlas.layer.BubbleLayer(source));
|
||||
source.add(features);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
var map, features;
|
||||
|
||||
function loadJSON(file) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
features = [];
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === XMLHttpRequest.DONE) {
|
||||
if (xhr.status === 200) {
|
||||
gps = JSON.parse(xhr.responseText)
|
||||
features.push(
|
||||
new atlas.data.Feature(new atlas.data.Point([parseFloat(gps.gps.lon), parseFloat(gps.gps.lat)]))
|
||||
)
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.open("GET", file, true);
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#myMap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="init()">
|
||||
<div id="myMap"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,66 @@
|
||||
# Create a virtual machine running IoT Edge
|
||||
|
||||
In Azure, you can create a virtual machine - a computer in the cloud that you can configure any way you wish and run your own software on it.
|
||||
|
||||
> 💁 You can read more about virtual machines on teh [Virtual Machine page on Wikipedia](https://wikipedia.org/wiki/Virtual_machine).
|
||||
|
||||
## Task - Set up an IoT Edge virtual machine
|
||||
|
||||
1. Run the following command to create a VM that has Azure IoT Edge already pre-installed:
|
||||
|
||||
```sh
|
||||
az deployment group create \
|
||||
--resource-group fruit-quality-detector \
|
||||
--template-uri https://raw.githubusercontent.com/Azure/iotedge-vm-deploy/1.2.0/edgeDeploy.json \
|
||||
--parameters dnsLabelPrefix=<vm_name> \
|
||||
--parameters adminUsername=<username> \
|
||||
--parameters deviceConnectionString="<connection_string>" \
|
||||
--parameters authenticationType=password \
|
||||
--parameters adminPasswordOrKey="<password>"
|
||||
```
|
||||
|
||||
Replace `<vm_name>` with a name for this virtual machine. This needs to be globally unique, so use something like `fruit-quality-detector-vm-` with your name or another value on the end.
|
||||
|
||||
Replace `<username>` and `<password>` with a username and password to use to log in to the VM. These need to be relatively secure, so you can't use admin/password.
|
||||
|
||||
Replace `<connection_string>` with the connection string of your `fruit-quality-detector-edge` IoT Edge device.
|
||||
|
||||
This will create a VM configured as a `DS1 v2` virtual machine. These categories indicate how powerful the machine is, and therefor how much it costs. This VM has 1 CPU and 3.5GB of RAM.
|
||||
|
||||
> 💰 You can see the current pricing of these VMs on the [Azure Virtual Machine pricing guide](https://azure.microsoft.com/pricing/details/virtual-machines/linux/?WT.mc_id=academic-17441-jabenn)
|
||||
|
||||
Once the VM has been created, the IoT Edge runtime will be installed automatically, and configured you connect to your IoT Hub as your `fruit-quality-detector-edge` device.
|
||||
|
||||
1. VMs cost money. At the time of writing, a DS1 VM costs about $0.06 per hour. To keep costs down, you should shut down the VM when you are not using it, and delete it when you are finished with this project.
|
||||
|
||||
To shut down the VM, use the following command:
|
||||
|
||||
```sh
|
||||
az vm deallocate --resource-group fruit-quality-detector \
|
||||
--name <vm_name>
|
||||
```
|
||||
|
||||
Replace `<vm_name>` with the name of your virtual machine.
|
||||
|
||||
> 💁 There is an `az vm stop` command which will stop the VM, but it keeps the computer allocated to you, so you still pay as if it was still running.
|
||||
|
||||
To restart the VM, use the following command:
|
||||
|
||||
```sh
|
||||
az vm start --resource-group fruit-quality-detector \
|
||||
--name <vm_name>
|
||||
```
|
||||
|
||||
Replace `<vm_name>` with the name of your virtual machine.
|
||||
|
||||
You can also configure your VM to automatically shut down at a certain time each day. This means if you forget to shut it down, you won't be billed for more than the time till the automatic shutdown. Use the following command to set this:
|
||||
|
||||
```sh
|
||||
az vm auto-shutdown --resource-group fruit-quality-detector \
|
||||
--name <vm_name> \
|
||||
--time <shutdown_time_utc>
|
||||
```
|
||||
|
||||
Replace `<vm_name>` with the name of your virtual machine.
|
||||
|
||||
Replace `<shutdown_time_utc>` with the UTC time that you want the VM to shut down using 4 digits as HHMM. For example, if you want to shutdown at midnight UTC, you would set this to `0000`. For 7:30PM on the west coast of the USA, you would use 0230 (7:30PM on the US west coast is 2:30AM UTC).
|
@ -1,7 +1,20 @@
|
||||
# Retail - using IoT to manage stock levels
|
||||
|
||||
The last stage for feed before it reaches consumers is retail - the markets, greengrocers, supermarkets and stores that sell produce to consumers. These stores want to ensure they have produce out on shelves for consumers to see and buy.
|
||||
|
||||
One of the most manual, time consuming tasks in food stores, especially in large supermarkets, is making sure the shelves are stocked. Checking individual shelves to ensure any gaps are filled with produce from store rooms.
|
||||
|
||||
IoT can help with this, using AI models running on IoT devices to count stock, using machine learning models that don't just classify images, but can detect individual objects and count them.
|
||||
|
||||
In these 2 lessons you'll learn how to train image-based AI models to count stock, and run these models on IoT devices.
|
||||
|
||||
> 💁 These lessons will use some cloud resources. If you don't complete all the lessons in this project, make sure you [Clean up your project](../clean-up.md).
|
||||
|
||||
## Topics
|
||||
|
||||
1. [Train a stock detector](./lessons/1-train-stock-detector/README.md)
|
||||
1. [Check stock from an IoT device](./lessons/2-check-stock-device/README.md)
|
||||
|
||||
## Credits
|
||||
|
||||
All the lessons were written with ♥️ by [Jim Bennett](https://GitHub.com/JimBobBennett)
|
||||
|
@ -0,0 +1,189 @@
|
||||
# Train a stock detector
|
||||
|
||||
This video gives an overview of Object Detection the Azure Custom Vision service, a service that will be covered in this lesson.
|
||||
|
||||
[](https://www.youtube.com/watch?v=wtTYSyBUpFc)
|
||||
|
||||
> 🎥 Click the image above to watch the video
|
||||
|
||||
## Pre-lecture quiz
|
||||
|
||||
[Pre-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/37)
|
||||
|
||||
## Introduction
|
||||
|
||||
In the previous project, you used AI to train an image classifier - a model that can tell if an image contains something, such as ripe fruit or unripe fruit. Another type of AI model that can be used with images is object detection. These models don't classify an image by tags, instead they are trained to recognize objects, and can find them in images, not only detecting that the image is present, but detecting where in the image it is. This allows you to count objects in images.
|
||||
|
||||
In this lesson you will learn about object detection, including how it can be used in retail. You will also learn how to train an object detector in the cloud.
|
||||
|
||||
In this lesson we'll cover:
|
||||
|
||||
* [Object detection](#object-detection)
|
||||
* [Use object detection in retail](#use-object-detection-in-retail)
|
||||
* [Train an object detector](#train-an-object-detector)
|
||||
* [Test your object detector](#test-your-object-detector)
|
||||
* [Retrain your object detector](#retrain-your-object-detector)
|
||||
|
||||
## Object detection
|
||||
|
||||
Object detection involves detecting objects in images using AI. Unlike the image classifier you trained in the last project, object detection is not about predicting the best tag for an image as a whole, but for finding one or more objects in an image.
|
||||
|
||||
### Object detection vs image classification
|
||||
|
||||
Image classification is about classifying an image as a whole - what are the probabilities that the whole image matches each tag. You get back probabilities for every tag used to train the model.
|
||||
|
||||

|
||||
|
||||
In the example above, two images are classified using a model trained to classify tubs of cashew nuts or cans of tomato paste. The first image is a tub of cashew nuts, and has two results from the image classifier:
|
||||
|
||||
| Tag | Probability |
|
||||
| -------------- | ----------: |
|
||||
| `cashew nuts` | 98.4% |
|
||||
| `tomato paste` | 1.6% |
|
||||
|
||||
The second image is of a can of tomato paste, and the results are:
|
||||
|
||||
| Tag | Probability |
|
||||
| -------------- | ----------: |
|
||||
| `cashew nuts` | 0.7% |
|
||||
| `tomato paste` | 99.3% |
|
||||
|
||||
You could use these value with a threshold percentage to predict what was in the image. But what if an image contained multiple cans of tomato paste, or both cashew nuts and tomato paste? The results would probably not give you what you want. This is where object detection comes in.
|
||||
|
||||
Object detection involves training a model to recognize objects. Instead of giving it images containing the object and telling it each image is one tag or another, you highlight the section of an image that contains the specific object, and tag that. You can tag a single object in an image or multiple. This way the model learns what the object itself looks like, not just what images that contain the object look like.
|
||||
|
||||
When you then use it to predict images, instead of getting back a list of tags and percentages, you get back a list of detected objects, with their bounding box and the probability that the object matches the assigned tag.
|
||||
|
||||
> 🎓 *Bounding boxes* are the boxes around an object.
|
||||
|
||||

|
||||
|
||||
The image above contains both a tub of cashew nuts and three cans of tomato paste. The object detector detected the cashew nuts, returning the bounding box that contains the cashew nuts with the percentage chance that that bounding box contains the object, in this case 97.6%. The object detector has also detected three cans of tomato paste, and provides three separate bounding boxes, one for each detected can, and each one has a percentage probability that the bounding box contains a can of tomato paste.
|
||||
|
||||
✅ Think of some different scenarios you might want to use image-based AI models for. Which ones would need classification, and which would need object detection?
|
||||
|
||||
### How object detection works
|
||||
|
||||
Object detection uses complex ML models. These models work by diving the image up into multiple cells, then checks if the center of the bounding box is the center of an image that matches one of the images used to train the model. You can think of this as kind of like running an image classifier over different parts of the image to look for matches.
|
||||
|
||||
> 💁 This is a drastic over-simplification. There are many techniques for object detection, and you can read more about them on the [Object detection page on Wikipedia](https://wikipedia.org/wiki/Object_detection).
|
||||
|
||||
There are a number of different models that can do object detection. One particularly famous model is [YOLO (You only look once)](https://pjreddie.com/darknet/yolo/), which is incredibly fast and can detect 20 different class of objects, such as people, dogs, bottles and cars.
|
||||
|
||||
✅ Read up on the YOLO model at [pjreddie.com/darknet/yolo/](https://pjreddie.com/darknet/yolo/)
|
||||
|
||||
Object detection models can be re-trained using transfer learning to detect custom objects.
|
||||
|
||||
## Use object detection in retail
|
||||
|
||||
Object detection has multiple uses in retail. Some include:
|
||||
|
||||
* **Stock checking and counting** - recognizing when stock is low on shelves. If stock is too low, notifications can be sent to staff or robots to re-stock shelves.
|
||||
* **mask detection** - in stores with mask policies during public health events, object detection can recognize people with masks and those without.
|
||||
* **Automated billing** - detecting items picked off shelves in automated stores and billing customers appropriately.
|
||||
* **Hazard detection** - recognizing broken items on floors, or spilled liquids, alerting cleaning crews.
|
||||
|
||||
✅ Do some research: What are some more use cases for object detection in retail?
|
||||
|
||||
## Train an object detector
|
||||
|
||||
You can train an object detector using Custom Vision, in a similar way to how you trained an image classifier.
|
||||
|
||||
### Task - create an object detector
|
||||
|
||||
1. Create a Resource Group for this project called `stock-detector`
|
||||
|
||||
1. Create a free Custom Vision training resource, and a free Custom Vision prediction resource in the `stock-detector` resource group. Name them `stock-detector-training` and `stock-detector-prediction`.
|
||||
|
||||
> 💁 You can only have one free training and prediction resource, so make sure you've cleaned up your project from the earlier lessons.
|
||||
|
||||
> ⚠️ You can refer to [the instructions for creating training and prediction resources from project 4, lesson 1 if needed](../../../4-manufacturing/lessons/1-train-fruit-detector/README.md#task---create-a-cognitive-services-resource).
|
||||
|
||||
1. Launch the Custom Vision portal at [CustomVision.ai](https://customvision.ai), and sign in with the Microsoft account you used for your Azure account.
|
||||
|
||||
1. Follow the [Create a new Project section of the Build an object detector quickstart on the Microsoft docs](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/get-started-build-detector?WT.mc_id=academic-17441-jabenn#create-a-new-project) to create a new Custom Vision project. The UI may change and these docs are always the most up to date reference.
|
||||
|
||||
Call your project `stock-detector`.
|
||||
|
||||
When you create your project, make sure to use the `stock-detector-training` resource you created earlier. Use a n*Object Detection* project type, and the *Products on Shelves* domain.
|
||||
|
||||

|
||||
|
||||
✅ The products on shelves domain is specifically targeted for detecting stock on store shelves. Read more on the different domains in the [Select a domian documentation on Microsoft Docs](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/select-domain?WT.mc_id=academic-17441-jabenn#object-detection)
|
||||
|
||||
✅ Take some time to explore the Custom Vision UI for your object detector.
|
||||
|
||||
### Task - train your object detector
|
||||
|
||||
To train your model you will need a set of images containing the objects you want to detect.
|
||||
|
||||
1. Gather images that contain the object to detect. You will need at least 15 images containing each object to detect from a variety of different angles and in different lighting conditions, but the more the better. This object detector uses the *Products on shelves* domain, so try to set up the objects as if they were on a store shelf. You will also need a few images to test the model. If you are detecting more than one object, you will want some testing images that contain all the objects.
|
||||
|
||||
> 💁 Images with multiple different objects count towards the 15 image minimum for all the objects in the image.
|
||||
|
||||
Your images should be png or jpegs, small than 6MB. If you create them with an iPhone for example they may be high-resolution HEIC images, so will need to be converted and possibly shrunk. The more images the better, and you should have a similar number of ripe and unripe.
|
||||
|
||||
The model is designed for products on shelves, so try to take the photos of the objects on shelves.
|
||||
|
||||
You can find some example images that you can use in the [images](./images) folder of cashew nuts and tomato paste that you can use.
|
||||
|
||||
1. Follow the [Upload and tag images section of the Build an object detector quickstart on the Microsoft docs](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/get-started-build-detector?WT.mc_id=academic-17441-jabenn#upload-and-tag-images) to upload your training images. Create relevant tags depending on the types of objects you want to detect.
|
||||
|
||||

|
||||
|
||||
When you draw bounding boxes for objects, keep them nice and tight around the object. It can take a while to outline all the images, but the tool will detect what it thinks are the bounding boxes, making it faster.
|
||||
|
||||

|
||||
|
||||
> 💁 If you have more than 15 images for each object, you can train after 15 then use the **Suggested tags** feature. This will use the trained model to detect the objecs in the untagged image. You can then confirm the detected objects, or reject and re-draw the bounding boxes. This can save a *lot* of time.
|
||||
|
||||
1. Follow the [Train the detector section of the Build an object detector quickstart on the Microsoft docs](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/get-started-build-detector?WT.mc_id=academic-17441-jabenn#train-the-detector) to train the object detector on your tagged images.
|
||||
|
||||
You will be given a choice of training type. Select **Quick Training**.
|
||||
|
||||
The object detector will then train. It will take a few minutes for the training to complete.
|
||||
|
||||
## Test your object detector
|
||||
|
||||
Once your object detector is trained, you can test it by giving it new images to detect objects in.
|
||||
|
||||
### Task - test your object detector
|
||||
|
||||
1. Use the **Quick Test** button to upload testing images and verify the objects are detected. Use the testing images you created earlier, not any of the images you used for training.
|
||||
|
||||

|
||||
|
||||
1. Try all the testing images you have access to and observe the probabilities.
|
||||
|
||||
## Retrain your object detector
|
||||
|
||||
When you test your object detector, it may not give the results you expect, the same as with image classifiers in the previous project. You can improve your object detector by retraining it with images it gets wrong.
|
||||
|
||||
Every time you make a prediction using the quick test option, the image and results are stored. You can use these images to retrain your model.
|
||||
|
||||
1. Use the **Predictions** tab to locate the images you used for testing
|
||||
|
||||
1. Confirm any accurate detections, delete an incorrect ones and add any missing objects.
|
||||
|
||||
1. Retrain and re-test the model.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Challenge
|
||||
|
||||
What would happen if you used the object detector with similar looking items, such as same brand cans of tomato paste and chopped tomatoes?
|
||||
|
||||
If you have any similar looking items, test it out by adding images of them to your object detector.
|
||||
|
||||
## Post-lecture quiz
|
||||
|
||||
[Post-lecture quiz](https://brave-island-0b7c7f50f.azurestaticapps.net/quiz/38)
|
||||
|
||||
## Review & Self Study
|
||||
|
||||
* When you trained your object detector, you would have seen values for *Precision*, *Recall*, and *mAP* that rate the model that was created. Read up on what these values are using [the Evaluate the detector section of the Build an object detector quickstart on the Microsoft docs](https://docs.microsoft.com/azure/cognitive-services/custom-vision-service/get-started-build-detector?WT.mc_id=academic-17441-jabenn#evaluate-the-detector)
|
||||
* Read more about object detection on the [Object detection page on Wikipedia](https://wikipedia.org/wiki/Object_detection)
|
||||
|
||||
## Assignment
|
||||
|
||||
[Compare domains](assignment.md)
|
@ -0,0 +1,14 @@
|
||||
# Compare domains
|
||||
|
||||
## Instructions
|
||||
|
||||
When you created your object detector, you had a choice of multiple domains. Compare how well they work for your stock detector, and describe which gives better results.
|
||||
|
||||
To change the domain, select the **Settings** button on the top menu, select a new domain, select the **Save changes** button, then retrain the model. Make sure you test with the new iteration of the model trained with the new domain.
|
||||
|
||||
## Rubric
|
||||
|
||||
| Criteria | Exemplary | Adequate | Needs Improvement |
|
||||
| -------- | --------- | -------- | ----------------- |
|
||||
| Train the model with a different domain | Was able to change the domain and re-train the model | Was able to change the domain and re-train the model | Was unable to change the domain or re-train the model |
|
||||
| Test the model and compare the results | Was able to test the model with different domains, compare results, and describe which is better | Was able to test the model with different domains, but was unable to compare the results and describe which is better | Was unable to test the model with different domains |
|
After Width: | Height: | Size: 445 KiB |
After Width: | Height: | Size: 483 KiB |
After Width: | Height: | Size: 450 KiB |
After Width: | Height: | Size: 457 KiB |
After Width: | Height: | Size: 480 KiB |
After Width: | Height: | Size: 465 KiB |
After Width: | Height: | Size: 455 KiB |
After Width: | Height: | Size: 465 KiB |
After Width: | Height: | Size: 438 KiB |
After Width: | Height: | Size: 420 KiB |
After Width: | Height: | Size: 374 KiB |
After Width: | Height: | Size: 410 KiB |