COE 592Lecture 00المحاضرة 00Full guideالشرح الكامل
Course overviewنظرة عامة على المقرر
The whole lecture on one page, taught concept by concept. Work through the parts in order, mark each concept once you understand it, and open the slide chips when you want the original slides.المحاضرة كاملة في صفحة واحدة، مشروحة مفهومًا مفهومًا. امشِ على الأجزاء بالترتيب، وعلّم كل مفهوم بعد أن تفهمه، وافتح أزرار الشرائح عندما تريد الرجوع إلى الشرائح الأصلية.
- Partsالأجزاء
- 2
- Conceptsالمفاهيم
- 8
- Slidesالشرائح
- 12
- Readingمدة القراءة
- 48 min48 دقيقة
Part 01: The instructor and edge AI in practiceالمحاضر والذكاء الاصطناعي على الحافة (Edge AI) عمليًا
Who teaches the course, and what his lab's projects show about running vision and security models on UAVs, farm robots, vehicles and IoT devices.من يدرّس المقرر، وماذا تكشف مشاريع مختبره عن تشغيل نماذج الرؤية والأمن على الطائرات المسيّرة (UAV) وروبوتات المزارع والمركبات وأجهزة إنترنت الأشياء (IoT).
5 concepts5 مفاهيم, ، slides 1-8الشرائح 1-8
Why this part mattersلماذا يهمّ هذا الجزء
This part is the course's motivation written as a portfolio. Every image on slides 3 to 8 is the same problem you will face in the research project: a model sitting next to a sensor, a budget of weight, power, memory and latency, and a requirement to stay correct when the world is wet, noisy or hostile.
Read these slides as budget problems rather than as a list of the instructor's papers. That reading habit is what the rest of COE 592 builds on, because pruning, quantization, neural architecture search, distillation and TinyML are all answers to one question: how much model can this platform afford, and how do we make a good model fit inside that? The bio matters less for exams than the three words in the lab's name, which turn out to be the syllabus in miniature.
هذا الجزء هو دافع المقرر مكتوبًا في صورة ملف أعمال بحثية. كل صورة في الشرائح من 3 إلى 8 هي المشكلة نفسها التي ستواجهها في المشروع البحثي: نموذج يجلس بجوار حساس، وميزانية من الوزن والطاقة والذاكرة وزمن الاستجابة latency، وشرط أن يبقى صحيحًا حين يكون العالم مبتلًّا أو مليئًا بالضوضاء أو عدائيًا.
اقرأ هذه الشرائح على أنها مسائل ميزانية، لا على أنها قائمة بأبحاث الأستاذ. عادة القراءة هذه هي ما يبني عليه بقية COE 592، لأن pruning وquantization وneural architecture search وdistillation وTinyML كلها إجابات عن سؤال واحد: كم من النموذج تستطيع هذه المنصة تحمّله، وكيف نجعل نموذجًا جيدًا يتّسع داخل ذلك؟ السيرة الذاتية أقل أهمية للاختبارات من الكلمات الثلاث في اسم المختبر، والتي يتضح أنها المنهج الدراسي في صورة مصغّرة.
By the end you canفي نهاية هذا الجزء ستستطيع
- Expand SERV and map each word to a later course theme.تفكّ اختصار SERV وتربط كل كلمة منه بموضوع سيأتي لاحقًا في المقرر.
- Name the sensor modalities on a UAV or vehicle inspection rig and explain why payload limits force small on-board models or data offloading.تسمّي أنواع الحساسات على منصة فحص محمولة على طائرة مسيّرة UAV أو مركبة، وتشرح لماذا تفرض حدود الحمولة نماذج صغيرة على متن المنصة أو نقل البيانات إلى مكان آخر.
- Read a detector's size class (n, s, m, l, x) from Ultralytics tables and compute the parameter, FLOP and mAP trade-off between two sizes.تقرأ فئة حجم الكاشف (n, s, m, l, x) من جداول Ultralytics، وتحسب المقايضة في عدد المعاملات وFLOPs وmAP بين حجمين.
- Read a detection figure critically: separate confidence from correctness, and a saliency map from a metric.تقرأ شكل كشف الأجسام قراءة ناقدة: تفصل الثقة عن الصواب، وتفصل خريطة البروز saliency map عن المقياس.
- State why an IoT intrusion detector must be lightweight and what generalizable means.تذكر لماذا يجب أن يكون كاشف التسلل في IoT خفيفًا، وما معنى أن يكون قابلًا للتعميم generalizable.
- Explain why roadside and rolling-stock inspection are real-time, safety-critical edge inference problems.تشرح لماذا يُعدّ فحص الطرق وفحص عربات القطارات مسألتي استدلال على الطرف edge في الزمن الحقيقي وحرجتين للسلامة.
The course is COE 592, Machine Learning on Embedded Systems, offered in term T261 and taught by Dr. Abdul Jabbar Siddiqui of the Department of Computer Engineering. Of everything on the title and bio slides, one line carries the most information: he leads the SERV Lab, and SERV stands for Secure, Efficient, Robust Vision. Those three adjectives are the map of the course before the syllabus arrives in Part 02.
المقرر هو COE 592، تعلّم الآلة على الأنظمة المدمجة (Machine Learning on Embedded Systems)، ويُطرح في الفصل T261، ويدرّسه الدكتور عبد الجبار صدّيقي (Dr. Abdul Jabbar Siddiqui) من قسم هندسة الحاسب. من بين كل ما في شريحتي العنوان والسيرة الذاتية، هناك سطر واحد يحمل أكبر قدر من المعلومات: فهو يقود SERV Lab، وSERV اختصار لـ Secure, Efficient, Robust Vision، أي رؤية آمنة وفعّالة ومتينة. هذه الصفات الثلاث هي خريطة المقرر قبل أن يصل المنهج الدراسي في الجزء 02.
Instructor profile, as stated on slide 2الملف التعريفي للأستاذ كما ورد في الشريحة 2
- Nameالاسم
- Dr. Abdul Jabbar Siddiquiالدكتور عبد الجبار صدّيقي (Dr. Abdul Jabbar Siddiqui)
- Rolesالمناصب
- Assistant Professor, Computer Engineering, KFUPM; Research Scholar, SDAIA-KFUPM JRC for AI; Lead of SERV Labأستاذ مساعد في قسم هندسة الحاسب في KFUPM، وباحث في SDAIA-KFUPM JRC for AI، وقائد SERV Lab
- Degreesالشهادات
- PhD, University of Ottawa (2021); MASc, University of Ottawa (2015); BSc, KFUPM (2012)الدكتوراه PhD من جامعة أوتاوا University of Ottawa (2021)، والماجستير MASc من جامعة أوتاوا (2015)، والبكالوريوس BSc من KFUPM (2012)
- Previouslyسابقًا
- National Research Council of Canada; NSERC TRANSIT Networkالمجلس الوطني للبحوث في كندا (National Research Council of Canada)، وشبكة NSERC TRANSIT Network
- Research interestsالاهتمامات البحثية
- Edge AI, Visual Intelligence and Analytics, Adversarial machine learning, AI for Cybersecurity, Intelligent transportation systems, UAV-based Inspection and Monitoring, Internet of ThingsEdge AI، والذكاء البصري والتحليلات (Visual Intelligence and Analytics)، Adversarial machine learning، والذكاء الاصطناعي للأمن السيبراني (AI for Cybersecurity)، Intelligent transportation systems، والفحص والمراقبة باستخدام UAV، Internet of Things
Reading SERV as a syllabusقراءة SERV على أنها منهج دراسي
Look at the interests list again and notice that every item is an instance of one question: can a model run near the sensor, inside a budget of memory, compute, energy and latency, and still be trusted? Edge AI and IoT name the setting. UAV inspection and transportation systems name the platforms. Adversarial machine learning and AI for cybersecurity name the threats. MIT 6.5940, whose course description slide 11's takeaways echo almost word for word, opens with the same framing, that deep networks "demand extraordinary levels of computation, hindering its deployment on everyday devices" (Han, MIT 6.5940).
انظر إلى قائمة الاهتمامات البحثية مرة أخرى، ولاحظ أن كل بند فيها حالة من سؤال واحد: هل يمكن لنموذج أن يعمل قرب الحساس، ضمن ميزانية من الذاكرة والحوسبة والطاقة وزمن الاستجابة، ويبقى مع ذلك جديرًا بالثقة؟ Edge AI وIoT تسمّيان البيئة. فحص الطائرات المسيّرة UAV وأنظمة النقل تسمّي المنصات. تعلّم الآلة العدائي (adversarial machine learning) والذكاء الاصطناعي للأمن السيبراني يسمّيان التهديدات. ومقرر MIT 6.5940، الذي تردّد خلاصاتُ الشريحة 11 وصفَه تقريبًا كلمة بكلمة، يبدأ بالإطار نفسه: أن الشبكات العميقة "تتطلب مستويات استثنائية من الحوسبة، مما يعيق نشرها على الأجهزة اليومية" (Han, MIT 6.5940).
| Letterالحرف | Wordالكلمة | Course themeموضوع المقرر | Where you meet it in this partأين تقابله في هذا الجزء |
|---|---|---|---|
| SS | Secureآمن (Secure) | Adversarial machine learning and intrusion detectionتعلّم الآلة العدائي (adversarial machine learning) وكشف التسلل | PNet-IDS on slide 6PNet-IDS في الشريحة 6 |
| EE | Efficientفعّال (Efficient) | Compression, pruning, quantization, nano detectorsالضغط، وpruning، وquantization، والكواشف النانوية | EcoWeedNet on slide 4, PNet-IDS on slide 6EcoWeedNet في الشريحة 4، وPNet-IDS في الشريحة 6 |
| RR | Robustمتين (Robust) | Behaviour under rain, noise, blur and domain shiftالسلوك تحت المطر والضوضاء والتشويش الحركي وdomain shift، أي انزياح المجال | YOLO-RAW on slide 5YOLO-RAW في الشريحة 5 |
| VV | Visionرؤية (Vision) | Cameras, thermal imagers and LiDAR as the inputالكاميرات والمصوّرات الحرارية وLiDAR بوصفها المدخلات | Every figure from slide 3 to slide 8كل شكل من الشريحة 3 إلى الشريحة 8 |
Efficient is the theme that gets the most lecture time, because it is where the arithmetic lives: how many parameters, how many operations, how many milliseconds. Robust is what happens to that efficient model when rain, noise or a new camera changes the input distribution. Secure is the adversarial case, where the change in the input is chosen on purpose: Goodfellow, Shlens and Szegedy defined adversarial examples as inputs formed by applying "small but intentionally worst-case perturbations", and traced the vulnerability to the models' linear behaviour (Goodfellow et al., 2015). A model that is only efficient can be fooled; a model that is only robust may not fit on the drone.
الكفاءة Efficient هي الموضوع الذي يأخذ أكبر وقت من المحاضرات، لأنها حيث يعيش الحساب: كم معاملًا، وكم عملية، وكم ميلي ثانية. المتانة Robust هي ما يحدث لذلك النموذج الفعّال حين يغيّر المطر أو الضوضاء أو كاميرا جديدة توزيعَ المدخلات. والأمان Secure هو الحالة العدائية، حيث يُختار التغيير في المدخل عن قصد: عرّف Goodfellow وShlens وSzegedy الأمثلة العدائية (adversarial examples) بأنها مدخلات تتكوّن بتطبيق "اضطرابات صغيرة لكنها مقصودة وتمثّل أسوأ حالة"، وأرجعوا هذه الهشاشة إلى السلوك الخطي للنماذج (Goodfellow et al., 2015). النموذج الفعّال فقط يمكن خداعه، والنموذج المتين فقط قد لا يتّسع على الطائرة المسيّرة.
Recall
What do the letters of SERV stand for, and which course theme does each map to?علامَ تدل حروف SERV، وبأي موضوع من المقرر يرتبط كل حرف؟
Quick checkاختبار سريع
What does the SERV in SERV Lab stand for?علامَ يدل SERV في اسم SERV Lab؟
Slide 3 is a wall of figures with no captions, so start by describing what is visibly there. A small unmanned helicopter sits on gravel with its camera payload circled (panel A). Beside it is a rugged field case holding a ground control station (panel B). A snowy corridor with a railway line running through it has been rebuilt in 3D (panel C). Two road vehicles carry roof rigs with four labelled sensors: Visual Camera, Thermal Camera, GPS receiver and LiDAR. Three top-down strips of the same track corridor follow, two with the rails traced in blue and encroaching vegetation segmented in red, one with the vegetation segmented in purple. A photogrammetric point cloud of the corridor appears once in true colour and once coloured by elevation. Finally a ROS-style dashboard shows six panes: an IR camera looking left and right, RGB cameras looking right, forward and left, and a LiDAR output.
الشريحة 3 جدار من الأشكال بلا تعليقات، لذا ابدأ بوصف ما هو ظاهر فيها. مروحية صغيرة بدون طيار تقف على الحصى وحمولتها من الكاميرات محاطة بدائرة (اللوحة A). بجانبها حقيبة ميدانية متينة تضم محطة تحكم أرضية (اللوحة B). وممر مغطّى بالثلج يمر عبره خط سكة حديدية أُعيد بناؤه ثلاثي الأبعاد ( اللوحة C). مركبتان على الطريق تحمل كلٌّ منهما منصة على السقف بأربعة حساسات معنونة: Visual Camera وThermal Camera وGPS receiver وLiDAR. تتبعها ثلاث شرائط علوية لممر السكة نفسه، اثنان منها رُسمت فيهما القضبان بالأزرق وقُسّم فيهما الغطاء النباتي المتعدّي بالأحمر، وواحد قُسّم فيه الغطاء النباتي بالبنفسجي. وتظهر سحابة نقاط فوتوغرامترية (photogrammetric point cloud) للممر مرة بألوانها الحقيقية ومرة ملوّنة بحسب الارتفاع. وأخيرًا لوحة تحكم على طراز ROS تعرض ست نوافذ: كاميرا أشعة تحت حمراء IR تنظر يسارًا ويمينًا، وكاميرات RGB تنظر يمينًا وأمامًا ويسارًا، ومخرجات LiDAR.
Read together, this appears to be a rail corridor inspection platform: a Multi-sensor platform mounted on a UAV and on vehicles, mapping the track and the vegetation around it. The slide attributes no paper and no result, so treat everything beyond the visible labels as a description of the problem class. The instructor did co-author a review of exactly this field, a literature survey of automated machine vision inspection systems in railways, prepared at the National Research Council of Canada for Transport Canada (Siddiqui, Mammeri and Liu, 2021), which is the closest citable link for the theme.
إذا قُرئت هذه الأشكال معًا، فهي تبدو منصة لفحص ممرات السكك الحديدية: منصة متعددة الحساسات Multi-sensor platform مثبّتة على طائرة مسيّرة UAV وعلى مركبات، ترسم خريطة للسكة والغطاء النباتي حولها. لا تنسب الشريحة أي ورقة أو نتيجة، فتعامل مع كل ما يتجاوز العناوين الظاهرة على أنه وصف لصنف المشكلة. وقد شارك الأستاذ فعلًا في تأليف مراجعة لهذا المجال تحديدًا، وهي مسح أدبي لأنظمة الفحص الآلي بالرؤية الحاسوبية في السكك الحديدية، أُعدّ في المجلس الوطني للبحوث في كندا لصالح هيئة النقل الكندية Transport Canada (Siddiqui, Mammeri and Liu, 2021)، وهي أقرب رابط يمكن الاستشهاد به لهذا الموضوع.
Four sensors, four different questionsأربعة حساسات، أربعة أسئلة مختلفة
Each sensor on the roof rig answers a question the others cannot. A visual camera sees colour and texture, which is what separates green vegetation from grey ballast in the orthomosaic strips. A Thermal camera images emitted infrared instead of reflected light, so it sees temperature: a hot bearing or a person on the track at night shows up with no visible illumination at all. LiDAR is, in NOAA's definition, a remote sensing method that uses light in the form of a pulsed laser to measure ranges, and those ranges become the 3D Point cloud in which clearance and elevation can be measured. GPS contributes no picture of the scene, only where and when each frame was taken, which is what lets overlapping aerial photos be stitched into a georeferenced strip and the segmentation overlays registered onto it.
كل حساس على منصة السقف يجيب عن سؤال لا يستطيع غيره الإجابة عنه. الكاميرا المرئية ترى اللون والملمس، وهذا ما يفصل الغطاء النباتي الأخضر عن حصى السكة الرمادي في شرائط orthomosaic. أما Thermal camera فتصوّر الأشعة تحت الحمراء المنبعثة بدلًا من الضوء المنعكس، فهي ترى درجة الحرارة: محمل عجلة ساخن أو شخص على السكة ليلًا يظهر من دون أي إضاءة مرئية على الإطلاق. وLiDAR، بحسب تعريف NOAA، طريقة استشعار عن بعد تستخدم الضوء على شكل ليزر نبضي لقياس المسافات، وتتحول تلك المسافات إلى point cloud ثلاثية الأبعاد يمكن قياس الخلوص والارتفاع فيها. لا يقدّم GPS أي صورة للمشهد، بل فقط أين ومتى التُقطت كل لقطة، وهذا ما يسمح بخياطة الصور الجوية المتداخلة في شريط مرجعي جغرافيًا (georeferenced) وتسجيل طبقات التقسيم فوقه.
| Sensorالحساس | Measuresما يقيسه | Good atيتقن | Weak atيضعف في | Data rate pressureضغط معدل البيانات |
|---|---|---|---|---|
| Visual (RGB) cameraالكاميرا المرئية (RGB) | Reflected visible lightالضوء المرئي المنعكس | Colour and texture: vegetation against rail, paint, signsاللون والملمس: الغطاء النباتي مقابل السكة، والطلاء، واللافتات | Darkness, rain, glareالظلام، والمطر، والوهج | Highest: full-colour frames at video rateالأعلى: إطارات كاملة الألوان بمعدل الفيديو |
| Thermal (IR) cameraالكاميرا الحرارية (IR) | Emitted infrared, so temperatureالأشعة تحت الحمراء المنبعثة، أي درجة الحرارة | Hot bearings, people and animals at nightالمحامل الساخنة، والأشخاص والحيوانات ليلًا | No colour, lower resolutionلا ألوان، ودقة أقل | Moderate: fewer pixels per frameمتوسط: بكسلات أقل في كل إطار |
| LiDARLiDAR | Laser pulse time of flight, so rangeزمن طيران نبضة الليزر، أي المسافة | Geometry, clearance, elevation, 3D point cloudsالهندسة، والخلوص، والارتفاع، وسحب النقاط ثلاثية الأبعاد (3D point clouds) | Sparse at long range, cost, weightمتفرّق على المسافات البعيدة، والتكلفة، والوزن | High: millions of points per secondمرتفع: ملايين النقاط في الثانية |
| GPS receiverمستقبل GPS | Position and timeالموقع والزمن | Georeferencing every frame and pointالإسناد الجغرافي لكل إطار ولكل نقطة | Nothing about the scene itselfلا شيء عن المشهد نفسه | Negligibleضئيل |
Why the payload cannot carry muchلماذا لا تستطيع الحمولة أن تحمل الكثير
The reason this slide belongs in an embedded machine learning course is the platform, not the sensors. A UAV lifts a fixed mass, and every gram of camera, LiDAR or computer is a gram less battery. Its flight time is set by that battery, and the compute it can run is set by what the battery can feed without shortening the flight. A car rig has more of all three, but still nothing like a data center. So there are exactly two ways to turn the sensor streams into an inspection result: shrink the model until it runs on board, which is the E of SERV, or ship the raw data somewhere that can process it.
سبب وجود هذه الشريحة في مقرر عن تعلّم الآلة المدمج هو المنصة، لا الحساسات. الطائرة المسيّرة ترفع كتلة ثابتة، وكل غرام من الكاميرا أو LiDAR أو الحاسوب هو غرام أقل من البطارية. زمن طيرانها تحدده تلك البطارية، والحوسبة التي يمكنها تشغيلها تحددها قدرة البطارية على تغذيتها من دون تقصير زمن الطيران. منصة السيارة لديها قدر أكبر من الثلاثة، لكنها لا تزال بعيدة جدًا عن مركز بيانات. لذلك هناك طريقتان فقط لتحويل تدفقات الحساسات إلى نتيجة فحص: تصغير النموذج حتى يعمل على متن المنصة، وهذا هو حرف E في SERV، أو إرسال البيانات الخام إلى مكان يستطيع معالجتها.
Shipping the raw data does not scale. Satyanarayanan's edge computing argument gives the numbers: if 12,000 users each stream 1080p video, the ingress link into the cloud needs about 100 Gbit/s, and a million users would need 8.5 Tbit/s. The cumulative demand is "considerably lower if the raw data is analyzed on cloudlets" near the sensors and only the extracted information travels onward (Satyanarayanan, 2017). Five cameras on one vehicle are a very small version of the same problem.
إرسال البيانات الخام لا يتوسّع. حجة Satyanarayanan عن الحوسبة الطرفية تعطي الأرقام: إذا بثّ 12,000 مستخدم كلٌّ منهم فيديو بدقة 1080p، فإن الوصلة الداخلة إلى السحابة تحتاج إلى نحو 100 Gbit/s، ومليون مستخدم يحتاجون إلى 8.5 Tbit/s. ويكون الطلب التراكمي "أقل بكثير إذا حُلّلت البيانات الخام على cloudlets" قرب الحساسات ولم تنتقل إلا المعلومات المستخرجة (Satyanarayanan, 2017). خمس كاميرات على مركبة واحدة نسخة صغيرة جدًا من المشكلة نفسها.
Worked exampleمثال محلول
How much video does a five-camera rig produce?كم من الفيديو تنتج منصة بخمس كاميرات؟
Assume a bit rate per cameraافترض معدل بتات لكل كاميرا
Take five 1080p cameras at an assumed 8 Mbit/s each after compression. This is an illustrative figure, not one from the slide.خذ خمس كاميرات بدقة 1080p بمعدل مفترض قدره 8 Mbit/s لكل منها بعد الضغط. هذا رقم توضيحي، وليس من الشريحة.Total streamالتدفق الكلي
5 × 8 = 40 Mbit/s leaving the rig continuously.5 × 8 = 40 Mbit/s تخرج من المنصة باستمرار.One hour of drivingساعة واحدة من القيادة
40 × 3600 = 144,000 Mbit, which is 18 GB per hour.40 × 3600 = 144,000 Mbit، أي 18 GB في الساعة.Upload over a rural linkالرفع عبر وصلة ريفية
At a 5 Mbit/s cellular uplink, 144,000 / 5 = 28,800 s, that is 8 hours to upload one hour of driving.بوصلة رفع خلوية بسرعة 5 Mbit/s، يكون 144,000 / 5 = 28,800 s، أي 8 ساعات لرفع ساعة واحدة من القيادة.Resultالنتيجة
The rig cannot upload what it records. It must detect on board and upload detections, which is why the model on the chip has to fit the platform's budget.لا تستطيع المنصة رفع ما تسجّله. يجب أن تكشف على متنها وترفع نتائج الكشف فقط، ولهذا يجب أن يتّسع النموذج الموجود على الشريحة ضمن ميزانية المنصة.
Recall
Name the four sensors labelled on the slide 3 vehicle rigs and one thing each measures.سمِّ الحساسات الأربعة المعنونة على منصات المركبات في الشريحة 3، وشيئًا واحدًا يقيسه كلٌّ منها.
A farm robot drives between rows of cotton seedlings and must find the weeds without stopping. That is an Object detection task, and the model that does it rides on the robot: no cloud, no rack, just whatever compute the vehicle's battery can feed. Slide 4 shows the instructor's answer, EcoWeedNet, described on the slide as lightweight, computationally and energy efficient, and aimed at sustainable, low-carbon, consumer-electronics-based Precision agriculture.
روبوت زراعي يسير بين صفوف شتلات القطن ويجب أن يجد الأعشاب الضارة دون أن يتوقف. هذه مهمة Object detection، والنموذج الذي ينفّذها يركب على الروبوت: لا سحابة، ولا خوادم، فقط أي قدرة حوسبة تستطيع بطارية المركبة تغذيتها. تعرض الشريحة 4 إجابة الأستاذ، EcoWeedNet، الموصوف على الشريحة بأنه خفيف، وفعّال حسابيًا وفي استهلاك الطاقة، وموجّه إلى Precision agriculture مستدامة ومنخفضة الكربون وقائمة على الإلكترونيات الاستهلاكية.
Drives the field and carries the camera.
يتحرك في الحقل ويحمل الكاميرا.
Frames taken in the field, in sun and shadow.
إطارات ملتقطة في الحقل، في الشمس والظل.
A small network that runs within the robot's budget.
شبكة صغيرة تعمل ضمن ميزانية الروبوت.
Boxes the robot can act on.
صناديق يستطيع الروبوت أن يتصرف بناءً عليها.
Efficient: what a nano detector isالكفاءة: ما هو الكاشف النانوي
The comparison on slide 4 is against YOLO11n and YOLO12n. In the YOLO family the suffix is a size class: n (nano) is the smallest, then s, m, l and x. The classes share one architecture and differ in width and depth, so the table below is the cleanest picture of what "lightweight" costs and buys. The figures are Ultralytics' own, on COCO validation at 640 px.
المقارنة في الشريحة 4 هي مع YOLO11n وYOLO12n. في عائلة YOLO تدل اللاحقة على فئة الحجم: n (نانو) هي الأصغر، ثم s وm وl وx. تشترك الفئات في بنية واحدة وتختلف في العرض والعمق، لذا فالجدول أدناه أوضح صورة لما يكلّفه وما يشتريه وصف "خفيف". الأرقام من Ultralytics نفسها، على مجموعة التحقق من COCO بدقة 640 px.
| Modelالنموذج | Parametersالمعاملات | FLOPsFLOPs | mAP50-95mAP50-95 | CPU ONNX latencyزمن الاستجابة على CPU عبر ONNX | T4 TensorRT latencyزمن الاستجابة على T4 عبر TensorRT |
|---|---|---|---|---|---|
| YOLO11nYOLO11n | 2.6M2.6M | 6.5B6.5B | 39.539.5 | 56.1 ms56.1 ms | 1.5 ms1.5 ms |
| YOLO12nYOLO12n | 2.6M2.6M | 7.5B7.5B | 40.640.6 | not listedغير مذكور | 1.64 ms1.64 ms |
| YOLO11mYOLO11m | 20.1M20.1M | 68.1B68.1B | 51.551.5 | 183.2 ms183.2 ms | 4.7 ms4.7 ms |
| YOLO11xYOLO11x | 56.9M56.9M | 195.3B195.3B | 54.754.7 | 462.8 ms462.8 ms | 11.3 ms11.3 ms |
Worked exampleمثال محلول
Nano versus mediumالنانوي مقابل المتوسط
Parametersالمعاملات
20.1 / 2.6 ≈ 7.7x fewer parameters in YOLO11n than YOLO11m.عدد parameters في YOLO11n أقل بـ 20.1 / 2.6 ≈ 7.7x مرة منه في YOLO11m.Computeالحوسبة
68.1 / 6.5 ≈ 10.5x fewer floating point operations per image.عمليات الفاصلة العائمة floating point operations لكل صورة أقل بـ 68.1 / 6.5 ≈ 10.5x مرة.Latencyزمن الاستجابة
CPU latency 183.2 / 56.1 ≈ 3.3x lower. The ratio is smaller than the FLOP ratio because small models leave part of the hardware idle.latency على CPU أقل بـ 183.2 / 56.1 ≈ 3.3x مرة. هذه النسبة أصغر من نسبة FLOPs لأن النماذج الصغيرة تترك جزءًا من العتاد خاملًا.Priceالثمن
51.5 − 39.5 = 12.0 mAP50-95 points lower.أقل بـ 51.5 − 39.5 = 12.0 نقطة في mAP50-95.Resultالنتيجة
A nano model trades a tenth of the compute for twelve points of accuracy. On a robot that must run at frame rate on a battery, that is usually the right trade, and it is the trade EcoWeedNet is designed to improve on.النموذج النانوي يقايض عُشر الحوسبة باثنتي عشرة نقطة من الدقة. على روبوت يجب أن يعمل بمعدل الإطارات على بطارية، هذه عادةً المقايضة الصحيحة، وهي المقايضة التي صُمّم EcoWeedNet ليحسّنها.
The EcoWeedNet paper reports 95.2% mAP@0.5 on the CottonWeedDet12 dataset with about 4.21% of YOLOv4's parameters and 6.59% of its GFLOPs, using two parameter-free attention modules (Khater et al., 2025). Whether a Lightweight model is good enough is always this pair of numbers: an accuracy metric next to a cost metric, never one alone.
تذكر ورقة EcoWeedNet دقة 95.2% في mAP@0.5 على مجموعة بيانات CottonWeedDet12 بنحو 4.21% من معاملات YOLOv4 و6.59% من GFLOPs الخاصة به، باستخدام وحدتي انتباه (attention modules) خاليتين من المعاملات (Khater et al., 2025). الحكم على ما إذا كان Lightweight model جيدًا بما يكفي هو دائمًا هذا الزوج من الأرقام: مقياس دقة بجانب مقياس تكلفة، وليس أحدهما وحده أبدًا.
What a GradCAM++ heatmap does and does not proveما تثبته خريطة حرارة GradCAM++ وما لا تثبته
The slide's Figure 5 lays GradCAM++ heatmaps from YOLO11n, YOLO12n and EcoWeedNet side by side on seedling images, and its caption says EcoWeedNet showed better emphasis and focus on weed-relevant regions. GradCAM++ computes a weighted combination of the positive partial derivatives of the last convolutional layer's feature maps with respect to a class score (Chattopadhyay et al., 2018). In plain terms it answers "which pixels pushed this score up". It does not answer "is this score right". A model can attend to the weed and still misclassify it, or attend to the soil and get lucky. The caption's claim is a qualitative observation about attention; the 95.2% is the quantitative claim about correctness, and they are different kinds of evidence.
يضع الشكل 5 في الشريحة خرائط حرارة GradCAM++ من YOLO11n وYOLO12n وEcoWeedNet جنبًا إلى جنب على صور الشتلات، ويقول تعليقه إن EcoWeedNet أظهر تركيزًا وإبرازًا أفضل للمناطق المتعلقة بالأعشاب الضارة. يحسب GradCAM++ تركيبة موزونة من المشتقات الجزئية الموجبة لخرائط الميزات (feature maps) في آخر طبقة التفافية بالنسبة إلى درجة فئة معينة (Chattopadhyay et al., 2018). بعبارة بسيطة، هو يجيب عن سؤال "أي البكسلات رفعت هذه الدرجة"، ولا يجيب عن سؤال "هل هذه الدرجة صحيحة". قد ينتبه النموذج إلى العشبة ومع ذلك يخطئ في تصنيفها، أو ينتبه إلى التربة ويصيب بالحظ. ادعاء التعليق ملاحظة نوعية عن الانتباه، أما 95.2% فهو الادعاء الكمّي عن الصواب، وهما نوعان مختلفان من الأدلة.
Robust: the same detector in the rainالمتانة: الكاشف نفسه تحت المطر
Slide 5 moves from a farm to a rainy sky. The task is to tell a UAV from a bird in weather that smears both into grey blobs. The baseline is YOLOv5-m, the medium class of an earlier family (21.2M parameters, 49.0B FLOPs in the Ultralytics YOLOv5 table). The instructor's model is YOLO-RAW, published in IEEE Transactions on Intelligent Transportation Systems and evaluated on three adverse test sets, rainy, additive Gaussian noise and motion blurred (Munir et al., 2025). The slide never expands RAW, and neither does the paper's title or abstract, so this course does not expand it either.
تنتقل الشريحة 5 من مزرعة إلى سماء ممطرة. المهمة هي تمييز طائرة مسيّرة UAV من طائر في طقس يلطّخ كليهما إلى كتل رمادية. خط الأساس هو YOLOv5-m، الفئة المتوسطة من عائلة أقدم (21.2M معامل و49.0B من FLOPs في جدول Ultralytics YOLOv5). ونموذج الأستاذ هو YOLO-RAW، المنشور في IEEE Transactions on Intelligent Transportation Systems، والمُقيَّم على ثلاث مجموعات اختبار صعبة: ممطرة، وبضوضاء غاوسية مضافة (additive Gaussian noise)، وبتشويش حركي (Munir et al., 2025). لا تفكّ الشريحة اختصار RAW، ولا يفكّه عنوان الورقة ولا ملخصها، لذا لا يفكّه هذا المقرر أيضًا.
| Sceneالمشهد | Objectالجسم | YOLOv5-mYOLOv5-m | YOLO-RAWYOLO-RAW |
|---|---|---|---|
| Rain skyسماء ممطرة | Gull 1 (top left)النورس 1 (أعلى اليسار) | no boxلا صندوق | Bird 0.50Bird 0.50 |
| Rain skyسماء ممطرة | Gull 2 (centre)النورس 2 (المنتصف) | UAV 0.29 (false positive)UAV 0.29 (إيجابية كاذبة) | Bird 0.63Bird 0.63 |
| Rain skyسماء ممطرة | Gull 3النورس 3 | no boxلا صندوق | Bird 0.54Bird 0.54 |
| Rain skyسماء ممطرة | Gull 4النورس 4 | no boxلا صندوق | Bird 0.73Bird 0.73 |
| Rain skyسماء ممطرة | Gull 5 (bottom)النورس 5 (الأسفل) | Bird 0.35Bird 0.35 | Bird 0.37 (approximate)Bird 0.37 (تقريبي) |
| Rain fieldحقل ممطر | Real droneطائرة مسيّرة حقيقية | UAV 0.90UAV 0.90 | UAV 0.93UAV 0.93 |
Read the second row first. YOLOv5-m looks at the centre gull and reports UAV 0.29: a False positive, and one that a drone-detection system would act on. Its only correct box is Bird 0.35. YOLO-RAW boxes all five birds with confidence scores from about 0.37 to 0.73 and reports no drone in the sky. In the bottom row, where a real drone flies over a field, both models find it, 0.90 against 0.93. The gain is not on the easy target; it is on the ambiguous ones.
اقرأ الصف الثاني أولًا. ينظر YOLOv5-m إلى النورس في المنتصف ويُبلغ عن UAV 0.29: وهذه False positive، أي إيجابية كاذبة، ومن النوع الذي سيتصرف بناءً عليه نظام كشف الطائرات المسيّرة. صندوقه الصحيح الوحيد هو Bird 0.35. أما YOLO-RAW فيحيط الطيور الخمسة كلها بصناديق بدرجات ثقة confidence scores تتراوح من نحو 0.37 إلى 0.73، ولا يُبلغ عن أي طائرة مسيّرة في السماء. وفي الصف الأخير، حيث تحلّق طائرة مسيّرة حقيقية فوق حقل، يجدها النموذجان كلاهما، 0.90 مقابل 0.93. المكسب ليس على الهدف السهل، بل على الأهداف الملتبسة.
A detector reports every box above a confidence threshold. Ultralytics' default is 0.25, and its documentation says raising it "can help reduce false positives" (Ultralytics predict mode). So a natural question is whether the baseline's mistake could be fixed by tuning the threshold instead of changing the model. Drag the slider and watch what each setting costs.
يُبلغ الكاشف عن كل صندوق فوق confidence threshold، أي عتبة الثقة. القيمة الافتراضية في Ultralytics هي 0.25، وتقول وثائقها إن رفعها "قد يساعد في تقليل الإيجابيات الكاذبة" (Ultralytics predict mode). لذا فالسؤال الطبيعي هو: هل يمكن إصلاح خطأ خط الأساس بضبط العتبة بدلًا من تغيير النموذج؟ اسحب المنزلق وراقب ما يكلّفه كل إعداد.
| Model | Shown | TP | FP | FN | Precision | Recall |
|---|---|---|---|---|---|---|
| YOLOv5-m | 2 | 1 | 1 | 4 | 0.50 | 0.20 |
| YOLO-RAW | 5 | 5 | 0 | 0 | 1.00 | 1.00 |
At the default 0.25 YOLOv5-m reports a false UAV at 0.29 and one bird; YOLO-RAW reports all five birds and no false positives.عند القيمة الافتراضية 0.25 يبلّغ YOLOv5-m عن طائرة مسيّرة (UAV) خاطئة بثقة 0.29 وعن طائر واحد، بينما يبلّغ YOLO-RAW عن الطيور الخمسة كلها دون أي إيجابيات كاذبة.
Boxes and confidences are the ones printed on slide 5; the fifth YOLO-RAW label is partly occluded and marked ~. Teal boxes match the true class, light boxes do not. Ground truth is 5 birds.الصناديق ودرجات الثقة هي المطبوعة على الشريحة 5، والتسمية الخامسة عند YOLO-RAW محجوبة جزئيًا ولذلك عُلّمت بالرمز ~. الصناديق الخضراء المزرقة تطابق الفئة الحقيقية، والصناديق الفاتحة لا تطابقها. الحقيقة الأرضية (ground truth) هي 5 طيور.
At 0.30 the false UAV disappears and YOLOv5-m loses nothing else, but it still sees one bird in five. At 0.60 YOLOv5-m already reports nothing and YOLO-RAW has lost three of its five correct birds. The threshold only slices whatever confidence mass the model produced. YOLO-RAW is better because it moved that mass onto the right classes in the first place, not because it was thresholded differently.
عند 0.30 تختفي الطائرة المسيّرة الوهمية ولا يخسر YOLOv5-m شيئًا آخر، لكنه لا يزال لا يرى إلا طائرًا واحدًا من خمسة. وعند 0.60 لا يُبلغ YOLOv5-m عن أي شيء أصلًا، ويكون YOLO-RAW قد خسر ثلاثة من طيوره الخمسة الصحيحة. العتبة تقطع فقط كتلة الثقة التي أنتجها النموذج، أيًّا كانت. YOLO-RAW أفضل لأنه نقل تلك الكتلة إلى الفئات الصحيحة من البداية، لا لأنه طُبّقت عليه عتبة مختلفة.
Recall
In the slide 5 rain scene, which model produced a false positive, what was it, and at what confidence?في مشهد المطر في الشريحة 5، أي نموذج أنتج إيجابية كاذبة، وما هي، وبأي درجة ثقة؟
Recall
What does a GradCAM++ heatmap show and what does it not show?ماذا تُظهر خريطة حرارة GradCAM++ وماذا لا تُظهر؟
Recall
Roughly how many times fewer parameters and FLOPs does YOLO11n have than YOLO11m, and at what mAP cost?كم مرة تقريبًا يقلّ عدد المعاملات وFLOPs في YOLO11n عنه في YOLO11m، وبأي تكلفة في mAP؟
Quick checkاختبار سريع
Why would a farm robot's designer pick a nano YOLO variant over a medium one?لماذا يختار مصمم روبوت زراعي نسخة YOLO النانوية بدلًا من النسخة المتوسطة؟
Quick checkاختبار سريع
In the slide 5 rain scene, which model labelled a gull as a UAV?في مشهد المطر في الشريحة 5، أي نموذج سمّى نورسًا طائرة مسيّرة UAV؟
Quick checkاختبار سريع
What does a GradCAM++ heatmap over a seedling image show?ماذا تُظهر خريطة حرارة GradCAM++ فوق صورة شتلة؟
A home or factory gateway forwards packets from hundreds of Internet of Things devices, and it has a fraction of a phone's compute. Somewhere in that box a decision has to be made, per packet or per flow, about whether the traffic is an attack. That is an Intrusion detection system, and slide 6 is the first page of the instructor's PNet-IDS paper, a lightweight and generalizable Convolutional neural network for intrusion detection in the Internet of Things.
بوابة منزلية أو في مصنع تمرّر الحزم من مئات أجهزة Internet of Things، ولديها جزء صغير من قدرة الهاتف الحسابية. في مكان ما داخل ذلك الصندوق يجب اتخاذ قرار، لكل حزمة أو لكل تدفق (flow)، بشأن ما إذا كانت حركة البيانات هجومًا. هذا هو Intrusion detection system، أي نظام كشف التسلل، والشريحة 6 هي الصفحة الأولى من ورقة الأستاذ PNet-IDS، وهي شبكة CNN خفيفة وقابلة للتعميم لكشف التسلل في إنترنت الأشياء.
The paper as printed on slide 6الورقة كما طُبعت في الشريحة 6
- Titleالعنوان
- PNet-IDS: A Lightweight and Generalizable Convolutional Neural Network for Intrusion Detection in Internet of ThingsPNet-IDS: A Lightweight and Generalizable Convolutional Neural Network for Intrusion Detection in Internet of Things
- Authorsالمؤلفون
- Auwal Sani Iliyasu, Abdul Jabbar Siddiqui (Member, IEEE), Houbing Song (Fellow, IEEE), Fahad Jibrin AbduAuwal Sani Iliyasu، وAbdul Jabbar Siddiqui (عضو IEEE)، وHoubing Song (زميل IEEE Fellow)، وFahad Jibrin Abdu
- Venueجهة النشر
- IEEE Access, open access research articleIEEE Access، مقالة بحثية مفتوحة الوصول
- Timelineالجدول الزمني
- Received 6 May 2025, accepted 22 May 2025, published 2 June 2025, current version 19 June 2025استُلمت في 6 May 2025، وقُبلت في 22 May 2025، ونُشرت في 2 June 2025، والنسخة الحالية بتاريخ 19 June 2025
- DOI
- 10.1109/ACCESS.2025.357570510.1109/ACCESS.2025.3575705
- Fundingالتمويل
- KFUPM Deanship of Research and the IRC for Intelligent Secure Systems, grant INSS2309عمادة البحث العلمي في KFUPM ومركز البحث المتعدد التخصصات للأنظمة الذكية الآمنة (IRC for Intelligent Secure Systems)، المنحة INSS2309
Why an intrusion detector must be lightweightلماذا يجب أن يكون كاشف التسلل خفيفًا
The abstract states the problem in one sentence: deep learning detectors perform well, but their "high computational and storage requirements make these impractical for most IoT devices" (Iliyasu et al., 2025). NIST's guide to intrusion detection and prevention lists four classes of system, and the relevant one here is network-based: a sensor that watches traffic on a segment and analyses it for suspicious activity (NIST SP 800-94). On an IoT gateway that sensor is the gateway itself, so the model competes for the same small CPU that forwards the packets, and it has to keep up with the link, which network engineers call running at line rate.
يذكر الملخص المشكلة في جملة واحدة: كواشف التعلّم العميق تؤدي جيدًا، لكن "متطلباتها العالية من الحوسبة والتخزين تجعلها غير عملية لمعظم أجهزة IoT" (Iliyasu et al., 2025). يسرد دليل NIST لكشف التسلل ومنعه أربعة أصناف من الأنظمة، والصنف المعني هنا هو القائم على الشبكة (network-based): حساس يراقب حركة البيانات على مقطع من الشبكة ويحللها بحثًا عن نشاط مريب (NIST SP 800-94). على بوابة IoT يكون ذلك الحساس هو البوابة نفسها، فيتنافس النموذج على المعالج الصغير نفسه الذي يمرّر الحزم، ويجب أن يواكب سرعة الوصلة، وهو ما يسميه مهندسو الشبكات العمل بـ line rate.
Worked exampleمثال محلول
Line-rate arithmetic on a gateway (illustrative numbers)حساب line rate على بوابة (أرقام توضيحية)
Packets per secondالحزم في الثانية
A 100 Mbit/s link carrying 500-byte packets delivers packets per second. A flow-level IDS aggregates packets before scoring, so this per-packet figure is the upper bound on inspection cost.وصلة بسرعة 100 Mbit/s تحمل حزمًا بحجم 500 بايت توصل حزمة في الثانية. نظام IDS على مستوى التدفق يجمّع الحزم قبل تقييمها، لذا فهذا الرقم لكل حزمة هو الحد الأعلى لتكلفة الفحص.Time budget per packetالميزانية الزمنية لكل حزمة
1 / 25,000 = 40 µs. Any per-packet decision slower than that falls behind the link.1 / 25,000 = 40 µs. أي قرار لكل حزمة أبطأ من ذلك يتخلّف عن الوصلة.A heavy modelنموذج ثقيل
If one decision needs 10 MFLOPs and the gateway CPU sustains 1 GFLOP/s, one decision takes 10 ms, about 250x too slow.إذا احتاج القرار الواحد إلى 10 MFLOPs وكان معالج البوابة يحافظ على 1 GFLOP/s، فإن القرار الواحد يستغرق 10 ms، أي أبطأ من اللازم بنحو 250x.A light modelنموذج خفيف
At 0.02 MFLOPs per decision the same CPU answers in 20 µs, inside the budget.بـ 0.02 MFLOPs لكل قرار، يجيب المعالج نفسه في 20 µs، أي داخل الميزانية.Resultالنتيجة
The deadline is set by the link, not by the designer. Reducing FLOPs is what moves a detector from impractical to deployable, which is why the paper counts FLOPs, parameters and model size as first-class results.المهلة تحددها الوصلة، لا المصمم. تقليل FLOPs هو ما ينقل الكاشف من غير عملي إلى قابل للنشر، ولهذا تعدّ الورقة FLOPs وعدد parameters وحجم النموذج نتائج من الدرجة الأولى.
That is the Efficient leg. The Robust leg is the word generalizable in the title. An IDS trained on one dataset meets, in deployment, traffic and attacks it never saw, a distribution shift. PNet-IDS addresses this with a knowledge distillation framework, in which a small student network is trained to reproduce a larger teacher, and reports that robustness against distribution shifts in network traffic is enhanced as a result. The benchmarks are BoT-IoT and CIC-IDS2017, and the claimed wins are reduced parameter count, reduced FLOPs and reduced model size while maintaining high accuracy and precision (Iliyasu et al., 2025).
هذه رِجل الكفاءة Efficient. أما رِجل المتانة Robust فهي كلمة generalizable في العنوان. نظام IDS المدرَّب على مجموعة بيانات واحدة يواجه عند النشر حركة بيانات وهجمات لم يرها قط، أي distribution shift، انزياح التوزيع. يعالج PNet-IDS ذلك بإطار knowledge distillation، حيث تُدرَّب شبكة طالبة صغيرة على محاكاة شبكة معلّمة أكبر، ويذكر أن المتانة أمام انزياحات التوزيع في حركة الشبكة تتحسن نتيجة لذلك. معايير القياس هي BoT-IoT وCIC-IDS2017، والمكاسب المُدّعاة هي تقليل عدد المعاملات وتقليل FLOPs وتقليل حجم النموذج مع الحفاظ على دقة accuracy وprecision عاليتين (Iliyasu et al., 2025).
Recall
Give two reasons an IoT intrusion detector must be lightweight, and say what generalizable means in PNet-IDS.اذكر سببين يوجبان أن يكون كاشف التسلل في IoT خفيفًا، وقل ما معنى generalizable في PNet-IDS.
Quick checkاختبار سريع
Why must an IoT intrusion detector such as PNet-IDS be lightweight?لماذا يجب أن يكون كاشف التسلل في IoT مثل PNet-IDS خفيفًا؟
The last two slides are photographs with no captions, and both show a decision that has to be made before the world moves on. Slide 7 pairs a low-speed autonomous shuttle with a pedestrian crossing in front of it and a schematic of a T-intersection where a red arrow, a vehicle turning left, crosses a blue arrow, a pedestrian in the crosswalk. Slide 8 shows grayscale undercarriage images of rail cars: one component circled as defective or missing, and a crack pulled out in a zoom box.
الشريحتان الأخيرتان صورتان فوتوغرافيتان بلا تعليقات، وكلتاهما تُظهر قرارًا يجب اتخاذه قبل أن يتحرك العالم. تجمع الشريحة 7 بين مركبة ذاتية القيادة منخفضة السرعة (shuttle) يعبر أمامها أحد المشاة، ومخطط لتقاطع على شكل T يتقاطع فيه سهم أحمر، وهو مركبة تنعطف يسارًا، مع سهم أزرق، وهو أحد المشاة على ممر العبور. وتعرض الشريحة 8 صورًا رمادية لأسفل عربات قطارات: مكوّن واحد محاط بدائرة على أنه معيب أو مفقود، وشقّ مكبَّر في مربع تكبير.
The left-turn pedestrian conflictتعارض الانعطاف يسارًا مع المشاة
The schematic is the left-turn pedestrian conflict, a named pattern in Intelligent transportation systems safety analysis. A left-turning driver scans for oncoming vehicles, accepts a gap, and turns into a crosswalk where a pedestrian is already crossing. FHWA research on left-turn phasing found that protected phasing reduced vehicle-to-vehicle injury crashes but did not significantly reduce vehicle-to-pedestrian crashes, and that under permissive phasing the turning driver must pick a gap in oncoming traffic and yield to the crosswalk at the same time, which prior studies flag as a strong conflict potential (FHWA, HRT-18-044). For an autonomous shuttle the problem is the same one the human driver has, and the detector that watches the crosswalk must answer before the vehicle enters it.
المخطط هو left-turn pedestrian conflict، أي تعارض الانعطاف يسارًا مع المشاة، وهو نمط معروف بالاسم في تحليل السلامة ضمن Intelligent transportation systems. السائق المنعطف يسارًا يبحث عن المركبات القادمة من الاتجاه المقابل، ويقبل فجوة، ثم ينعطف إلى ممر عبور يكون فيه أحد المشاة يعبر بالفعل. وجدت أبحاث FHWA حول مراحل إشارات الانعطاف يسارًا أن المرحلة المحمية (protected phasing) قلّلت حوادث الإصابات بين المركبات، لكنها لم تقلل بشكل ملحوظ حوادث المركبات مع المشاة، وأنه في المرحلة المسموحة (permissive phasing) يجب على السائق المنعطف أن يختار فجوة في حركة المرور المقابلة وأن يفسح الطريق لممر العبور في الوقت نفسه، وهو ما تعدّه دراسات سابقة احتمال تعارض قويًا (FHWA, HRT-18-044). بالنسبة إلى المركبة الذاتية، المشكلة هي نفسها التي يواجهها السائق البشري، والكاشف الذي يراقب ممر العبور يجب أن يجيب قبل أن تدخله المركبة.
Looking under the trainالنظر أسفل القطار
Slide 8 belongs to Automated visual inspection of rolling stock: cameras placed by the track or under it photograph each wagon as it passes, and a model flags anything that does not look like an intact component. The instructor reviewed exactly this field for Transport Canada while at NRC (Siddiqui, Mammeri and Liu, 2021). The slide itself carries no citation, so the images are described here as an example of the problem class, not attributed to a particular system.
تنتمي الشريحة 8 إلى Automated visual inspection لـ rolling stock، أي عربات القطارات: كاميرات موضوعة بجانب السكة أو تحتها تصوّر كل عربة أثناء مرورها، ونموذج يُعلِّم أي شيء لا يبدو مكوّنًا سليمًا. وقد راجع الأستاذ هذا المجال تحديدًا لصالح Transport Canada أثناء عمله في NRC (Siddiqui, Mammeri and Liu, 2021). الشريحة نفسها لا تحمل أي مرجع، لذا توصف الصور هنا على أنها مثال على صنف المشكلة، لا منسوبة إلى نظام بعينه.
Physics sets the deadlineالفيزياء تحدد المهلة
What unites the shuttle and the wagon is that the time available for Inference is not a design preference. It is set by how fast the scene changes. Satyanarayanan's remark that "the speed of light is an obvious physical limit on latency" (Satyanarayanan, 2017) is the reason a cloud round trip cannot be the answer here: the distance the vehicle covers during the latency of the reply is the safety margin lost.
ما يجمع المركبة الذاتية والعربة هو أن الوقت المتاح لـ Inference ليس تفضيلًا تصميميًا، بل تحدده سرعة تغيّر المشهد. ملاحظة Satyanarayanan بأن "سرعة الضوء حدّ فيزيائي واضح على زمن الاستجابة" (Satyanarayanan, 2017) هي السبب في أن رحلة الذهاب والإياب إلى السحابة لا يمكن أن تكون الحل هنا: المسافة التي تقطعها المركبة خلال latency الرد هي هامش السلامة المفقود.
Worked exampleمثال محلول
Metres lost per millisecond of latencyالأمتار المفقودة لكل ميلي ثانية من التأخير
The shuttleالمركبة الذاتية
At 10 m/s a vehicle covers 1 m every 100 ms. A 200 ms cloud round trip is 2 m of travel before the detector's answer arrives.بسرعة 10 m/s تقطع المركبة 1 m كل 100 ms. رحلة ذهاب وإياب إلى السحابة تستغرق 200 ms تعني 2 m من الحركة قبل أن تصل إجابة الكاشف.The wagonالعربة
A wagon passing a wayside camera at 15 m/s moves 1.5 m every 100 ms. At 30 frames per second the model has about 33 ms per frame before the next one arrives and the wagon has moved another 0.5 m.عربة تمر بكاميرا بجانب السكة بسرعة 15 m/s تتحرك 1.5 m كل 100 ms. وعند 30 إطارًا في الثانية يكون لدى النموذج نحو 33 ms لكل إطار قبل وصول الإطار التالي، وتكون العربة قد تحركت 0.5 m أخرى.Resultالنتيجة
In both cases the budget is tens of milliseconds, and the network alone can spend that. The model runs on an Embedded system next to the camera, which means it must be small enough to fit there.في الحالتين الميزانية عشرات من الميلي ثانية، والشبكة وحدها قد تستهلكها. يعمل النموذج على Embedded system بجوار الكاميرا، مما يعني أنه يجب أن يكون صغيرًا بما يكفي ليتّسع هناك.
| Scenarioالسيناريو | Sensorالحساس | Decisionالقرار | Deadline driverما يحدد المهلة | Cost of a missتكلفة الإخفاق |
|---|---|---|---|---|
| Shuttle at a T-intersectionمركبة ذاتية القيادة (shuttle) عند تقاطع على شكل T | Forward camera on the vehicleكاميرا أمامية على المركبة | Yield, brake or proceed on a left turnإفساح الطريق أو الكبح أو المتابعة عند الانعطاف يسارًا | Vehicle and pedestrian speedسرعة المركبة وسرعة المشاة | A pedestrian is struckصدم أحد المشاة |
| Rolling-stock undercarriageأسفل عربات القطار (rolling stock) | Wayside or under-track cameraكاميرا بجانب السكة أو تحتها | Flag a cracked or missing componentالإبلاغ عن مكوّن متشقق أو مفقود | Train speed past the cameraسرعة القطار أثناء مروره بالكاميرا | A defect leaves the yard undetectedخروج عيب من الساحة دون اكتشافه |
Recall
Why is a cloud round trip unacceptable for the shuttle and the wagon inspection, in one sentence each?لماذا تُعدّ رحلة الذهاب والإياب إلى السحابة غير مقبولة للمركبة الذاتية ولفحص العربة، في جملة واحدة لكل منهما؟
Recapالخلاصة
If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا
- SERV: Secure (adversarial ML, IDS), Efficient (compression, nano models), Robust (rain, noise, blur, shift), Vision.SERV: آمن Secure (تعلّم الآلة العدائي adversarial ML، وأنظمة كشف التسلل IDS)، فعّال Efficient (الضغط، والنماذج النانوية nano)، متين Robust (المطر، والضوضاء، والتشويش الحركي blur، والانزياح shift)، رؤية Vision.
- Inspection rigs carry RGB, thermal, LiDAR and GPS; a UAV's weight, battery and compute cap what the on-board model can be.تحمل منصات الفحص كاميرا RGB وكاميرا حرارية وLiDAR وGPS، ووزن الطائرة المسيّرة وبطاريتها وقدرتها الحسابية هي ما يحدّ النموذج الذي يمكن تشغيله على متنها.
- Analyze near the sensor, ship the extracted information: 12,000 1080p streams already need 100 Gbit/s into a cloud.حلّل البيانات قرب الحساس، وأرسل المعلومات المستخرجة فقط: 12,000 بثّ بدقة 1080p تحتاج وحدها إلى 100 Gbit/s داخلة إلى السحابة.
- A nano YOLO is the smallest scale: YOLO11n has 2.6M parameters and 6.5B FLOPs against 20.1M and 68.1B for YOLO11m, for 12 mAP points.YOLO النانوي هو أصغر حجم: لدى YOLO11n عدد 2.6M من المعاملات و6.5B من FLOPs مقابل 20.1M و68.1B لدى YOLO11m، والثمن 12 نقطة mAP.
- EcoWeedNet: 95.2% mAP@0.5 on CottonWeedDet12 with about 4.21% of YOLOv4's parameters and 6.59% of its GFLOPs.EcoWeedNet: دقة 95.2% mAP@0.5 على CottonWeedDet12 بنحو 4.21% من معاملات YOLOv4 و6.59% من GFLOPs الخاصة به.
- GradCAM++ shows where the class score's evidence sits; it does not certify correctness.يُظهر GradCAM++ أين يقع الدليل الذي رفع درجة الفئة، لكنه لا يشهد بصحة التنبؤ.
- YOLOv5-m produced a false UAV at 0.29 in rain; YOLO-RAW boxed the birds at 0.37 to 0.73. A threshold slices confidence mass; a better model moves it. RAW is not expanded.أنتج YOLOv5-m طائرة مسيّرة UAV وهمية بثقة 0.29 في المطر، بينما أحاط YOLO-RAW الطيور بصناديق بثقة من 0.37 إلى 0.73. العتبة تقطع كتلة الثقة الموجودة، أما النموذج الأفضل فينقلها. اختصار RAW غير مفكوك.
- PNet-IDS cuts FLOPs, parameters and size so an IoT gateway can detect intrusions in real time, and uses knowledge distillation to hold up under traffic distribution shift.يخفّض PNet-IDS عدد FLOPs والمعاملات وحجم النموذج كي تكشف بوابة IoT التسلل في الزمن الحقيقي، ويستخدم تقطير المعرفة knowledge distillation ليصمد أمام انزياح توزيع حركة الشبكة.
- Shuttle intersections and undercarriage inspection are deadline-bound: distance travelled per millisecond of latency decides where inference runs.تقاطعات المركبة الذاتية shuttle وفحص أسفل عربات القطار مقيّدة بمهلة زمنية: المسافة المقطوعة في كل ميلي ثانية من التأخير هي ما يحدد أين يجري الاستدلال.
Sourcesالمصادر
- Abdul Jabbar Siddiqui, faculty profileDocsKFUPM Department of Computer EngineeringPositions and degree year ranges.المناصب وفترات سنوات الشهادات.(opens in a new tab)(يفتح في تبويب جديد)
- Automated machine vision inspection systems in railways: literature reviewDocsNational Research Council Canada for Transport Canada, 2021 (Siddiqui, Mammeri, Liu)Report AST-2021-0055. Cited for the rail inspection theme, not for the slide 3 or slide 8 images.التقرير AST-2021-0055. يُستشهد به لموضوع فحص السكك الحديدية، لا لصور الشريحة 3 أو الشريحة 8.(opens in a new tab)(يفتح في تبويب جديد)
- EcoWeedNet: A Lightweight and Automated Weed Detection Method for Sustainable Next-Generation Agricultural Consumer ElectronicsPaperarXiv, 2025 (Khater, Siddiqui, Hossain, El-Maleh)95.2% mAP@0.5 on CottonWeedDet12 with about 4.21% of YOLOv4's parameters and 6.59% of its GFLOPs.دقة 95.2% في mAP@0.5 على CottonWeedDet12 بنحو 4.21% من معاملات YOLOv4 و6.59% من GFLOPs الخاصة به.(opens in a new tab)(يفتح في تبويب جديد)
- YOLO-RAW: Advancing UAV Detection With Robustness to Adverse Weather ConditionsPaperIEEE Transactions on Intelligent Transportation Systems, vol. 26, no. 6, 2025 (Munir, Siddiqui, Hossain, El-Maleh)Rainy, AWGN and motion blurred test sets. RAW is not expanded in the title or abstract.مجموعات اختبار ممطرة، وبضوضاء AWGN، وبتشويش حركي. اختصار RAW غير مفكوك في العنوان ولا في الملخص.(opens in a new tab)(يفتح في تبويب جديد)
- PNet-IDS: A Lightweight and Generalizable Convolutional Neural Network for Intrusion Detection in Internet of ThingsPaperIEEE Access, 2025 (Iliyasu, Siddiqui, Song, Abdu)FLOPs, parameters and size reduced while accuracy is maintained; knowledge distillation for distribution shift; BoT-IoT and CIC-IDS2017.تقليل FLOPs والمعاملات والحجم مع الحفاظ على الدقة، وتقطير المعرفة knowledge distillation لمواجهة انزياح التوزيع، ومعيارا BoT-IoT وCIC-IDS2017.(opens in a new tab)(يفتح في تبويب جديد)
- Grad-CAM++: Improved Visual Explanations for Deep Convolutional NetworksPaperWACV 2018 (Chattopadhyay, Sarkar, Howlader, Balasubramanian)Weighted combination of positive partial derivatives of last-layer feature maps with respect to a class score.تركيبة موزونة من المشتقات الجزئية الموجبة لخرائط الميزات في الطبقة الأخيرة بالنسبة إلى درجة فئة.(opens in a new tab)(يفتح في تبويب جديد)
- Explaining and Harnessing Adversarial ExamplesPaperICLR 2015 (Goodfellow, Shlens, Szegedy)Adversarial examples as small, intentionally worst-case perturbations.الأمثلة العدائية بوصفها اضطرابات صغيرة ومقصودة تمثّل أسوأ حالة.(opens in a new tab)(يفتح في تبويب جديد)
- MCUNet: Tiny Deep Learning on IoT DevicesPaperNeurIPS 2020 (Lin, Chen, Lin, Cohn, Gan, Han)Microcontroller memory two to three orders of magnitude below a mobile phone.ذاكرة المتحكمات الدقيقة أصغر بمرتبتين إلى ثلاث مراتب عشرية من ذاكرة الهاتف المحمول.(opens in a new tab)(يفتح في تبويب جديد)
- The Emergence of Edge ComputingPaperIEEE Computer, 2017 (M. Satyanarayanan)Ingress bandwidth for 12,000 and one million 1080p streams; the speed of light as a latency limit.عرض النطاق الداخل لـ 12,000 بثّ ولمليون بثّ بدقة 1080p، وسرعة الضوء بوصفها حدًّا على زمن الاستجابة.(opens in a new tab)(يفتح في تبويب جديد)
- YOLO11 model documentationDocsUltralyticsParameters, FLOPs, mAP50-95 and latency for the n, m and x classes on COCO at 640.المعاملات وFLOPs وmAP50-95 وزمن الاستجابة للفئات n وm وx على COCO بدقة 640.(opens in a new tab)(يفتح في تبويب جديد)
- YOLO12 model documentationDocsUltralyticsYOLO12n row: 2.6M parameters, 7.5B FLOPs, 40.6 mAP50-95.صف YOLO12n: عدد 2.6M من المعاملات، و7.5B من FLOPs، و40.6 في mAP50-95.(opens in a new tab)(يفتح في تبويب جديد)
- YOLOv5 repository and model tableDocsUltralyticsYOLOv5m: 21.2M parameters, 49.0B FLOPs.YOLOv5m: عدد 21.2M من المعاملات، و49.0B من FLOPs.(opens in a new tab)(يفتح في تبويب جديد)
- Predict mode: inference argumentsDocsUltralyticsDefault confidence threshold 0.25; raising it can reduce false positives.عتبة الثقة الافتراضية 0.25، ورفعها قد يقلّل الإيجابيات الكاذبة.(opens in a new tab)(يفتح في تبويب جديد)
- 6.5940 TinyML and Efficient Deep Learning Computing, Fall 2024DocsMIT HAN Lab (Song Han)Course framing; slide 11's takeaways closely mirror this description.إطار المقرر، وخلاصات الشريحة 11 تحاكي هذا الوصف عن قرب.(opens in a new tab)(يفتح في تبويب جديد)
- SP 800-94: Guide to Intrusion Detection and Prevention Systems (IDPS)DocsNIST, 2007Four classes of IDPS; network-based systems.أربعة أصناف من أنظمة IDPS، والأنظمة القائمة على الشبكة.(opens in a new tab)(يفتح في تبويب جديد)
- What is lidar?DocsNOAA National Ocean ServiceDefinition of LiDAR as pulsed-laser ranging.تعريف LiDAR بأنه قياس للمسافات بالليزر النبضي.(opens in a new tab)(يفتح في تبويب جديد)
- Safety Evaluation of Protected Left-Turn Phasing and Leading Pedestrian Intervals on Pedestrian SafetyDocsFederal Highway Administration, report HRT-18-044Left-turn phasing reduced vehicle-to-vehicle injury crashes but not vehicle-to-pedestrian crashes.مراحل إشارات الانعطاف يسارًا قلّلت حوادث الإصابات بين المركبات، لكنها لم تقلّل حوادث المركبات مع المشاة.(opens in a new tab)(يفتح في تبويب جديد)
Part 02: Course takeaways and getting startedمخرجات المقرر والبداية
What the course promises you will be able to do, the five pillars of efficient deep learning on constrained devices, and what to do in week one.ما الذي يعدك المقرر بأن تصبح قادرًا عليه، والركائز الخمس للتعلم العميق الكفء على الأجهزة المحدودة، وما الذي تفعله في الأسبوع الأول.
3 concepts3 مفاهيم, ، slides 9-12الشرائح 9-12
Why this part mattersلماذا يهمّ هذا الجزء
This part is the course contract. Every later lecture, from efficiency metrics through pruning, quantization, architecture search and deployment, is one turn of a five-step loop that slide 11 draws as a neural network funnelling down into a small development board.
Your exams and your research project will ask you to do two things with that loop: place a technique in it (is knowledge distillation an accelerate step or a compare step?), and compute whether a given model fits a given device. Both start here. The part also covers what the instructor asks of you in week one, and what the deck deliberately leaves to Blackboard.
هذا الجزء هو عقد المقرر. كل محاضرة لاحقة، من مقاييس الكفاءة مرورًا بالتقليم (pruning) والتكميم (quantization) والبحث عن المعماريات وصولًا إلى النشر، هي دورة واحدة في حلقة من خمس خطوات ترسمها الشريحة 11 على هيئة شبكة عصبية تنساب كالقمع نزولًا إلى لوحة تطوير صغيرة.
ستطلب منك الامتحانات ومشروعك البحثي أمرين مع هذه الحلقة: أن تضع تقنية ما في موضعها منها (هل تقطير المعرفة knowledge distillation خطوة تسريع أم خطوة مقارنة؟)، وأن تحسب هل يتسع نموذج معين في جهاز معين. كلا الأمرين يبدأ من هنا. ويغطي الجزء أيضًا ما يطلبه منك المحاضر في الأسبوع الأول، وما تتركه الشرائح عمدًا لـBlackboard.
By the end you canفي نهاية هذا الجزء ستستطيع
- State the five course takeaways and reorder them as a measure, optimize, compare, explore, deploy loop.تذكر مخرجات المقرر الخمس وتعيد ترتيبها في صورة حلقة: قِس، حسّن، قارن، استكشف، انشر.
- Compute a model's weight size from parameter count and bit width, and judge whether it fits a device tier.تحسب حجم أوزان النموذج من عدد المعاملات وعرض البت، وتحكم هل يتسع في فئة جهاز معينة.
- Explain why accuracy alone cannot select a model for a constrained device.تشرح لماذا لا تكفي الدقة وحدها لاختيار نموذج لجهاز محدود الموارد.
- Distinguish on-device inference from on-device training by their memory needs.تميّز بين الاستدلال على الجهاز والتدريب على الجهاز من حيث احتياجات الذاكرة.
- Set up a week-one plan: survey, prerequisites check, device tier, candidate model, metrics log.تضع خطة الأسبوع الأول: الاستبيان، والتحقق من المتطلبات المسبقة، وفئة الجهاز، والنموذج المرشح، وسجل المقاييس.
On the first evening each student says three things out loud: their name, their educational background (previous studies), and their work background (current or previous work, industry or occupation). Then everyone opens the Pre-course survey at https://forms.cloud.microsoft/r/5ssu8gkcS9, also printed as a QR code on slide 10, and answers questions about background, skills and expectations.
في الأمسية الأولى يذكر كل طالب ثلاثة أشياء بصوت مسموع: اسمه، وخلفيته التعليمية (دراسته السابقة)، وخلفيته العملية (عمله الحالي أو السابق، أو القطاع، أو المهنة). ثم يفتح الجميع pre-course survey (استبيان ما قبل المقرر) على الرابط https://forms.cloud.microsoft/r/5ssu8gkcS9، المطبوع أيضًا كرمز QR في الشريحة 10، ويجيبون عن أسئلة حول الخلفية والمهارات والتوقعات.
It is tempting to file both under administration, but they serve the same purpose as takeaway 1 later in this part: you cannot tune what you have not measured. A graduate course on efficient deep learning draws people from computer engineering, electrical engineering, computer science and industry. Some have trained convolutional networks for years and never flashed a microcontroller; others write firmware for embedded systems daily and have never opened PyTorch. The instructor uses the room's answers to set depth and pacing, so an honest answer about a gap is worth more to you than an impressive one.
من المغري أن تصنّف الأمرين تحت بند الإجراءات الإدارية، لكنهما يخدمان الغرض نفسه الذي يخدمه المُخرج 1 لاحقًا في هذا الجزء: لا يمكنك ضبط ما لم تقِسه. مقرر دراسات عليا في التعلم العميق الكفء يجمع طلابًا من هندسة الحاسب، والهندسة الكهربائية، وعلوم الحاسب، والصناعة. بعضهم درّب شبكات التفاف لسنوات ولم يبرمج microcontroller (متحكمًا دقيقًا) قط، وآخرون يكتبون البرمجيات الثابتة (firmware) لـembedded systems (الأنظمة المدمجة) يوميًا ولم يفتحوا PyTorch قط. يستخدم المحاضر إجابات القاعة لتحديد العمق والإيقاع، لذا فإن إجابة صادقة عن نقص لديك أنفع لك من إجابة مبهرة.
What is worth refreshing before week twoما يستحق المراجعة قبل الأسبوع الثاني
The deck does not list prerequisites, so treat the following as a hedged suggestion drawn from what the course will ask you to do rather than as a slide claim. The topics ahead (compression, pruning, quantization, deployment to boards) match the syllabus of MIT's 6.5940 TinyML and Efficient Deep Learning Computing, which lists an introductory machine learning subject and a computation structures subject as its prerequisites. Translated to tools, four skills will carry most of the weight.
لا تذكر الشرائح أي متطلبات مسبقة، لذا تعامل مع ما يلي كاقتراح حذر مستنتج مما سيطلبه منك المقرر، لا كادعاء ورد في الشرائح. الموضوعات القادمة (الضغط، وpruning(التقليم)، وquantization (التكميم)، وdeployment (النشر) على اللوحات) تطابق الخطة الدراسية لمقرر MIT 6.5940 TinyML and Efficient Deep Learning Computing، الذي يشترط مقررًا تمهيديًا في تعلم الآلة ومقررًا في بنى الحوسبة (computation structures). وإذا ترجمنا ذلك إلى أدوات، فإن أربع مهارات ستحمل معظم العبء.
Skills that will probably matter, and whyمهارات يُرجَّح أن تكون مهمة، ولماذا
- Python
- Every framework, script and notebook in efficient deep learning assumes it. The PyTorch beginner tutorial itself assumes basic familiarity with Python.كل إطار عمل وكل سكربت وكل دفتر notebook في التعلم العميق الكفء يفترض معرفتها. ودرس المبتدئين في PyTorch نفسه يفترض إلمامًا أساسيًا بـPython.
- PyTorch
- The compression and quantization literature (Deep Compression, MCUNet, TinyTL) ships PyTorch code; you will read and modify such code, not write frameworks.أدبيات الضغط والتكميم (Deep Compression وMCUNet وTinyTL) تنشر شيفرتها بـPyTorch؛ وستقرأ مثل هذه الشيفرة وتعدّلها، لا أن تكتب أطر عمل.
- Basic CNNsأساسيات الشبكات الالتفافية (CNNs)
- Convolutions, pooling and fully connected layers are what get pruned and quantized. The free Deep Learning book by Goodfellow, Bengio and Courville covers them.طبقات الالتفاف (convolution) والتجميع (pooling) والطبقات المتصلة كليًا هي ما يُقلَّم ويُكمَّم. ويغطيها كتاب Deep Learning المجاني لـGoodfellow وBengio وCourville.
- C for microcontrollersلغة C للمتحكمات الدقيقة
- LiteRT for Microcontrollers is written in C++ 17 for 32-bit platforms with no operating system, so deploying to a board means touching C or C++ code.LiteRT for Microcontrollers مكتوب بـC++ 17 لمنصات 32-bit بلا نظام تشغيل، لذا فالنشر على لوحة يعني التعامل مع شيفرة C أو C++.
None of these needs to be deep on day one. If you can train a small classifier in PyTorch, explain what a convolution computes, and compile and flash a blinking-LED program in C, you can follow the first weeks and fill in the rest as the loop demands it.
لا يلزم أن تتعمق في أي منها من اليوم الأول. إذا كنت تستطيع تدريب مصنّف صغير في PyTorch، وشرح ما يحسبه الالتفاف (convolution)، وترجمة برنامج يُومض LED بلغة C وتحميله على اللوحة، فبإمكانك متابعة الأسابيع الأولى واستكمال الباقي كلما احتاجت إليه الحلقة.
Recall
What three things does the icebreaker ask each student to share?ما الأشياء الثلاثة التي يطلب التعارف من كل طالب أن يذكرها؟
Take a small image classifier with 3 million parameters, trained in PyTorch and saved in 32-bit floating point. Its weights alone occupy 12 MB. A Raspberry Pi Pico has 2 MB of flash and 264 KB of SRAM. The model does not fit, and no amount of accuracy changes that. Everything this course teaches is what you do next.
خذ مصنّف صور صغيرًا فيه 3 million parameters (معامل)، دُرّب في PyTorch وحُفظ بصيغة الفاصلة العائمة 32-bit. أوزانه وحدها تشغل 12 MB. ولوحة Raspberry Pi Pico فيها 2 MB من flash (ذاكرة الفلاش) و264 KB من SRAM. النموذج لا يتسع، ولن تغيّر أي دقة هذه الحقيقة. كل ما يعلّمه هذا المقرر هو ما تفعله بعد ذلك.
Slide 11 states the promise as five takeaways. You will know the key Efficiency metrics for deep learning computing. You will understand how to speed up Inference and Training of neural networks on resource-constrained platforms. You will analyse the tradeoffs between different optimization techniques. You will be aware of recent research trends and industry practice. And you will get hands-on experience compressing and implementing deep learning models on resource-constrained devices. The infographic relabels the same five as Measure efficiency, Accelerate, Analyse trade-offs, Track the frontier, and Build and deploy, with a five-word footer: Measure, Optimize, Compare, Explore, Deploy.
تعرض الشريحة 11 وعد المقرر في خمس مخرجات. ستعرف أهم efficiency metrics (مقاييس الكفاءة) في حوسبة التعلم العميق. وستفهم كيف تسرّع inference (الاستدلال) وtraining (التدريب) للشبكات العصبية على منصات resource-constrained (محدودة الموارد). وستحلل tradeoffs (المفاضلات) بين تقنيات التحسين المختلفة. وستكون على اطلاع على اتجاهات البحث الحديثة وممارسات الصناعة. وستكتسب خبرة عملية في compressing (ضغط) نماذج التعلم العميق وتنفيذها على أجهزة محدودة الموارد. ويعيد الرسم التوضيحي تسمية المخرجات الخمس نفسها إلى Measure efficiency وAccelerate وAnalyse trade-offs وTrack the frontier وBuild and deploy، مع تذييل من خمس كلمات: Measure, Optimize, Compare, Explore, Deploy.
Read the five as a loop, not a listاقرأ الخمس حلقةً لا قائمة
The order on the slide is not arbitrary. It is the order in which you actually work. You measure a baseline: size, memory, compute, latency, energy. You apply one optimization, say pruning. You compare the new numbers against the baseline and note what the step cost in accuracy. You look to the research literature and to industry for the next technique. You deploy on the real board to check that the paper numbers survive contact with hardware, because measured latency and energy routinely differ from analytical estimates. Then you measure again, and the loop turns.
الترتيب في الشريحة ليس عشوائيًا، بل هو الترتيب الذي تعمل به فعلًا. تقيس خط الأساس (baseline): الحجم، والذاكرة، والحوسبة، وlatency (زمن الاستجابة)، والطاقة. ثم تطبّق عملية تحسين واحدة، ولتكن pruning (التقليم). ثم تقارن الأرقام الجديدة بخط الأساس وتسجل ما كلّفته هذه الخطوة من الدقة. ثم تبحث في الأدبيات البحثية وفي الصناعة عن التقنية التالية. ثم تُجري deploy (النشر) على اللوحة الحقيقية لتتأكد أن أرقام الورقة البحثية تصمد أمام العتاد الفعلي، لأن زمن الاستجابة والطاقة المقيسين يختلفان عادةً عن التقديرات التحليلية. ثم تقيس من جديد، فتدور الحلقة.
| Pillarالركيزة | Verbالفعل | Question you askالسؤال الذي تطرحه | Deep Compression exampleمثال من Deep Compression |
|---|---|---|---|
| 1 Measure efficiency1 قياس الكفاءة | Measureالقياس | How big, how slow, how hungry is the baseline?ما حجم خط الأساس، وما بطؤه، وما استهلاكه للموارد؟ | AlexNet: 240 MB, 61 M parameters, 32-bit weightsAlexNet: 240 MB، و61 M معامل، وأوزان 32-bit |
| 2 Accelerate2 التسريع | Optimizeالتحسين | Which technique shrinks the cost that hurts most?أي تقنية تقلّص التكلفة الأشد إيلامًا؟ | Prune 9x fewer connections, quantize to 5 bits, Huffman codeتقليم الوصلات إلى أقل بـ9x، والتكميم إلى 5 بتات، وترميز Huffman |
| 3 Analyse trade-offs3 تحليل المفاضلات | Compareالمقارنة | What did each step cost in accuracy or effort?كم كلّفت كل خطوة من الدقة أو الجهد؟ | 35x smaller with no accuracy loss, after retrainingأصغر بـ35x دون خسارة في الدقة، بعد إعادة التدريب |
| 4 Track the frontier4 متابعة أحدث ما وصل إليه البحث | Exploreالاستكشاف | What has research or industry done since?ما الذي أنجزه البحث أو الصناعة منذ ذلك الحين؟ | MCUNet, TinyTL and on-device training under 256 KBMCUNet وTinyTL والتدريب على الجهاز ضمن 256 KB |
| 5 Build and deploy5 البناء والنشر | Deployالنشر | Does it really run on the target hardware?هل يعمل فعلًا على العتاد المستهدف؟ | 3x to 4x layerwise speedup and 3x to 7x energy efficiency measured on hardwareتسريع على مستوى الطبقة من 3x إلى 4x وكفاءة طاقة من 3x إلى 7x مقيسة على العتاد |
Deep Compression is the canonical worked loop. Han, Mao and Dally started from AlexNet at 240 MB and VGG-16 at 552 MB (measure), pruned redundant connections, quantized the survivors from 32 to as few as 5 bits and Huffman coded the result (optimize), reported 35x and 49x reductions with no loss of accuracy (compare), and measured 3x to 4x layerwise speedup and 3x to 7x better energy efficiency on real hardware (deploy). The companion paper on learning both weights and connections had already shown pruning alone cutting AlexNet from 61 M to 6.7 M parameters. Everything after 2016 (MCUNet, TinyTL, on-device training under 256 KB) is the explore step feeding the next turn.
Deep Compression هو المثال النموذجي لحلقة كاملة. بدأ Han وMao وDally من AlexNet بحجم 240 MB وVGG-16 بحجم 552 MB (القياس)، ثم قلّموا الوصلات الزائدة، وكمّموا الوصلات الباقية من 32 بت إلى ما يصل إلى 5 بتات فقط، وطبّقوا ترميز Huffman على الناتج (التحسين)، وأبلغوا عن تقليص بمقدار 35x و49x دون أي خسارة في الدقة (المقارنة)، وقاسوا تسريعًا على مستوى الطبقة من 3x إلى 4x وكفاءة طاقة أفضل من 3x إلى 7x على عتاد حقيقي (النشر). وكانت الورقة المرافقة عن تعلم الأوزان والوصلات معًا قد أظهرت قبل ذلك أن التقليم وحده يخفض AlexNet من 61 M إلى 6.7 M معامل. وكل ما جاء بعد 2016 (MCUNet وTinyTL والتدريب على الجهاز ضمن 256 KB) هو خطوة الاستكشاف التي تغذي الدورة التالية.
A preview of the efficiency metricsلمحة مسبقة عن مقاييس الكفاءة
Slide 11 names the metrics without listing them; the list below previews later lectures and is not slide content. The ordering follows the MIT 6.5940 sequence, which opens with the basics of efficient deep learning before pruning, quantization, neural architecture search, distillation and on-device training. Learn the names now so the loop has something concrete to measure.
تذكر الشريحة 11 المقاييس دون أن تسردها؛ والقائمة أدناه لمحة عن محاضرات لاحقة وليست من محتوى الشرائح. ويتبع الترتيب تسلسل MIT 6.5940، الذي يبدأ بأساسيات التعلم العميق الكفء قبل التقليم، وquantization (التكميم)، وneural architecture search (البحث عن معمارية الشبكة العصبية)، وdistillation (التقطير)، والتدريب على الجهاز. تعلّم الأسماء الآن حتى يكون لدى الحلقة شيء ملموس تقيسه.
| Metricالمقياس | What it countsما الذي يحسبه | Typical unitالوحدة المعتادة |
|---|---|---|
| Parameter countعدد المعاملات | How many learnable weights and biases the model hasكم وزنًا وانحيازًا (bias) قابلًا للتعلم في النموذج | millions (M)ملايين (M) |
| Model sizeحجم النموذج | Bytes needed to store the weights: parameters times bits per weight over 8عدد البايتات اللازمة لتخزين الأوزان: عدد المعاملات مضروبًا في عدد البتات لكل وزن مقسومًا على 8 | MB or KBMB أو KB |
| Peak memoryذروة الذاكرة | The most memory needed at any moment: weights plus the largest activation tensorsأكبر قدر من الذاكرة يُحتاج إليه في أي لحظة: الأوزان مضافًا إليها أكبر موترات التنشيط | MB or KBMB أو KB |
| Computeالحوسبة | Multiply-accumulate operations (MACs) or floating-point operations (FLOPs) per inferenceعدد عمليات الضرب والجمع (MACs) أو عمليات الفاصلة العائمة (FLOPs) لكل استدلال | MMACs or GFLOPsMMACs أو GFLOPs |
| Latencyزمن الاستجابة | Time from one input to its outputالزمن من إدخال واحد حتى مخرجه | msms |
| Throughputالإنتاجية (throughput) | Inferences completed per secondعدد عمليات الاستدلال المكتملة في الثانية | inferences/sاستدلال/ثانية (inferences/s) |
| Energyالطاقة | Joules per inference, or average power while runningالجول لكل استدلال، أو متوسط القدرة أثناء التشغيل | mJ or mWmJ أو mW |
The first two are the easiest to compute by hand, and the calculation is one you will repeat all term. A weight stored in b bits takes b / 8 bytes, so the size of the weights is the parameter count times bits per weight divided by eight.
أول مقياسين هما الأسهل حسابًا باليد، وهذا الحساب ستكرره طوال الفصل. الوزن المخزّن في b بت يشغل b / 8 بايت، لذا فإن حجم الأوزان يساوي عدد المعاملات مضروبًا في عدد البتات لكل وزن مقسومًا على ثمانية.
Worked exampleمثال محلول
A 3 million parameter model at four bit widthsنموذج من 3 ملايين معامل عند أربعة عروض بت
Start from float32ابدأ من float32
3,000,000 × 32 / 8 = 12,000,000 bytes, about 12 MB. This is what PyTorch saves by default.3,000,000 × 32 / 8 = 12,000,000 بايت، أي نحو 12 MB. وهذا ما يحفظه PyTorch افتراضيًا.Halve the bits, halve the bytesنصف البتات يعني نصف البايتات
At 16 bits the same weights take 6 MB; at 8 bits, 3 MB; at 4 bits, 1.5 MB. Nothing else changed: the parameter count is identical.عند 16 بت تشغل الأوزان نفسها 6 MB؛ وعند 8 بتات 3 MB؛ وعند 4 بتات 1.5 MB. لم يتغير شيء آخر: عدد المعاملات هو نفسه تمامًا.Test against two boardsاختبر مقابل لوحتين
The Raspberry Pi Pico has 2 MB of flash, so only the 4-bit version fits. The Arduino Nano 33 BLE Sense Rev2 has 1 MB, so none of the four fit, and quantization alone is not enough.في Raspberry Pi Pico ذاكرة فلاش بحجم 2 MB، لذا لا تتسع إلا نسخة 4-bit. أما Arduino Nano 33 BLE Sense Rev2 ففيها 1 MB، فلا تتسع أي من النسخ الأربع، والتكميم وحده لا يكفي.Resultالنتيجة
Bit width divides size, but the target device decides whether the result is small enough. Below 1 MB this model also needs pruning or a different architecture.bit width (عرض البت) يقسم الحجم، لكن الجهاز المستهدف هو من يقرر هل الناتج صغير بما يكفي. للنزول تحت 1 MB يحتاج هذا النموذج أيضًا إلى التقليم أو إلى معمارية مختلفة.
| Bits per weightعدد البتات لكل وزن | Calculationالحساب | Sizeالحجم | Fits Pico flash (2 MB)?هل يتسع في فلاش Pico (2 MB)؟ | Fits Nano 33 BLE Sense flash (1 MB)?هل يتسع في فلاش Nano 33 BLE Sense (1 MB)؟ |
|---|---|---|---|---|
| 32-bit32-bit | 3,000,000 × 32 / 83,000,000 × 32 / 8 | 12,000,000 B (12 MB)12,000,000 B (12 MB) | Noلا | Noلا |
| 16-bit16-bit | 3,000,000 × 16 / 83,000,000 × 16 / 8 | 6,000,000 B (6 MB)6,000,000 B (6 MB) | Noلا | Noلا |
| 8-bit8-bit | 3,000,000 × 8 / 83,000,000 × 8 / 8 | 3,000,000 B (3 MB)3,000,000 B (3 MB) | Noلا | Noلا |
| 4-bit4-bit | 3,000,000 × 4 / 83,000,000 × 4 / 8 | 1,500,000 B (1.5 MB)1,500,000 B (1.5 MB) | Yesنعم | Noلا |
Try it yourself. The calculator applies the formula for any parameter count and bit width and checks the result against generic device tiers. The device figures are datasheet capacities for one example board per tier (Arduino, Raspberry Pi and NVIDIA product pages), not what is free once the runtime and your code are loaded.
جرّب بنفسك. تطبّق الحاسبة المعادلة على أي عدد معاملات وأي عرض بت، وتختبر الناتج مقابل فئات أجهزة عامة. أرقام الأجهزة هي السعات المذكورة في أوراق البيانات للوحة مثال واحدة لكل فئة (صفحات منتجات Arduino وRaspberry Pi وNVIDIA)، وليست ما يتبقى حرًا بعد تحميل بيئة التشغيل وشيفرتك.
Microcontroller, example board: Arduino Nano 33 BLE Sense Rev2 (nRF52840)Microcontroller، لوحة على سبيل المثال: Arduino Nano 33 BLE Sense Rev2 (nRF52840)
Activations, the runtime and your application code also need memory. These figures are datasheet capacities, not what is free. Model sizes use MB as 10^6 bytes; the microcontroller banks use the datasheet binary figures (1 MiB flash, 256 KiB SRAM), which are slightly larger.التنشيطات (activations) وبيئة التشغيل (runtime) وشيفرة تطبيقك تحتاج إلى ذاكرة أيضًا. هذه الأرقام هي السعات المذكورة في ورقة البيانات (datasheet)، لا الذاكرة المتاحة فعلًا. أحجام النماذج تعتبر MB مساوية لـ 10^6 بايت، أما بنوك ذاكرة المتحكم الدقيق فتستخدم الأرقام الثنائية من ورقة البيانات (1 MiB للذاكرة الوميضية flash، و256 KiB لذاكرة SRAM)، وهي أكبر بقليل.
Three misconceptions the loop correctsثلاثة مفاهيم خاطئة تصححها الحلقة
Quick checkاختبار سريع
You compare pruning and quantization on the same network and report size, latency and accuracy for each. Which takeaway is this?قارنت التقليم والتكميم على الشبكة نفسها وأبلغت عن الحجم وزمن الاستجابة والدقة لكل منهما. أي مُخرج من مخرجات المقرر هذا؟
Quick checkاختبار سريع
A network has 12 million parameters stored as 8-bit integers. What is its weight size?شبكة فيها 12 مليون معامل مخزنة كأعداد صحيحة 8-bit. ما حجم أوزانها؟
Quick checkاختبار سريع
Why can accuracy alone not choose a model for a microcontroller?لماذا لا تكفي الدقة وحدها لاختيار نموذج لمتحكم دقيق؟
Quick checkاختبار سريع
Which memory cost appears in on-device training but not in on-device inference?أي تكلفة ذاكرة تظهر في التدريب على الجهاز ولا تظهر في الاستدلال على الجهاز؟
Recall
Name the five course takeaways in the order of the loop, then say what comes after the fifth.اذكر مخرجات المقرر الخمس بترتيب الحلقة، ثم قل ما الذي يأتي بعد الخامسة.
Recall
A 3 M parameter model with 8-bit weights: how many bytes, and does it fit 1 MB of flash?نموذج من 3 M معامل بأوزان 8-bit: كم بايتًا يشغل، وهل يتسع في 1 MB من ذاكرة الفلاش؟
Recall
Why is on-device training harder than on-device inference?لماذا يكون التدريب على الجهاز أصعب من الاستدلال على الجهاز؟
Slide 12 contains three words: "View on Blackboard". That is the whole syllabus section of the deck. It does not give grading weights, exam dates, project deliverables, a textbook, an office location or office hours. Anything you read elsewhere claiming to know those for this course is not coming from these slides.
تحتوي الشريحة 12 على ثلاث كلمات فقط: "View on Blackboard". وهذا هو قسم الخطة الدراسية كله في الشرائح. فهي لا تذكر أوزان التقييم، ولا مواعيد الامتحانات، ولا مخرجات المشروع، ولا كتابًا مقررًا، ولا موقع المكتب، ولا الساعات المكتبية. وأي مصدر آخر تقرؤه يدّعي معرفة هذه التفاصيل لهذا المقرر لا يستقيها من هذه الشرائح.
What is known so far (meeting details from the course registry, not this deck)ما هو معروف حتى الآن (تفاصيل المحاضرات من سجل المقرر، لا من هذه الشرائح)
- Meetingsالمحاضرات
- Monday and Wednesday, 20:10 to 21:25الاثنين والأربعاء، من 20:10 إلى 21:25
- Roomالقاعة
- Building 59, Room 2004المبنى 59، القاعة 2004
- Syllabus, grading, deliverablesالخطة الدراسية، والتقييم، والمخرجات المطلوبة
- On Blackboard, not in this deckعلى Blackboard، لا في هذه الشرائح
- Textbook, office, office hoursالكتاب المقرر، والمكتب، والساعات المكتبية
- Not stated in this deck; check Blackboardغير مذكورة في هذه الشرائح؛ راجع Blackboard
Plan the project before the syllabus tells you toخطّط للمشروع قبل أن تطلب منك الخطة الدراسية ذلك
Takeaway 5 promises hands-on experience compressing and implementing models on constrained devices, and the MIT counterpart of this course ends in an open-ended design project. Read that as a strong hint that a hardware Deployment is coming, whatever Blackboard eventually calls it. The students who struggle with such projects are rarely short of techniques; they are short of a baseline to compare against and a board that arrives on time. Both are fixed in week one.
يَعِد المُخرج 5 بخبرة عملية في ضغط النماذج وتنفيذها على أجهزة محدودة الموارد، والمقرر المقابل لهذا المقرر في MIT ينتهي بمشروع تصميم مفتوح. اقرأ ذلك تلميحًا قويًا إلى أن deployment (نشرًا) على عتاد حقيقي قادم، أيًا كان الاسم الذي سيطلقه عليه Blackboard لاحقًا. الطلاب الذين يتعثرون في مثل هذه المشاريع نادرًا ما تنقصهم التقنيات؛ بل ينقصهم خط أساس يقارنون به، ولوحة تصل في الوقت المناسب. وكلاهما يُحسم في الأسبوع الأول.
- Pick a device tier first. The memory budget of the tier decides which models are even candidates, so the device is an input to model selection, not an output of it.اختر فئة الجهاز أولًا. ميزانية الذاكرة في الفئة هي التي تحدد أي النماذج يصلح أصلًا أن يكون مرشحًا، لذا فالجهاز مُدخل لاختيار النموذج، لا ناتج عنه.
- Pick a candidate model that already fits, or is within one or two optimizations of fitting, and record its parameter count and float32 size with the formula from the previous concept.اختر نموذجًا مرشحًا يتسع بالفعل، أو يبعد عملية تحسين أو اثنتين عن أن يتسع، وسجّل parameter count (عدد معاملاته) وحجمه بصيغة float32 باستخدام المعادلة من المفهوم السابق.
- Start a metrics log before the first optimization. A baseline recorded after you have started changing things is not a baseline.ابدأ سجل مقاييس قبل أول عملية تحسين. خط الأساس الذي يُسجَّل بعد أن تبدأ في تغيير الأشياء ليس خط أساس.
| Tierالفئة | Example boardلوحة مثال | Memoryالذاكرة | What it is typically asked to runما يُطلب منها تشغيله عادةً |
|---|---|---|---|
| Microcontrollerمتحكم دقيق | Arduino Nano 33 BLE Sense Rev2 (nRF52840)Arduino Nano 33 BLE Sense Rev2 (nRF52840) | 1 MB flash, 256 KB SRAM1 MB ذاكرة فلاش، و256 KB من SRAM | Keyword spotting, gesture and anomaly detection, tiny image classifiersاكتشاف الكلمات المفتاحية، واكتشاف الإيماءات والحالات الشاذة، ومصنّفات صور صغيرة جدًا |
| Microcontrollerمتحكم دقيق | Raspberry Pi Pico and Pico 2Raspberry Pi Pico and Pico 2 | 2 MB flash and 264 KB SRAM; Pico 2 has 4 MB and 520 KB2 MB ذاكرة فلاش و264 KB من SRAM؛ وفي Pico 2 يبلغان 4 MB و520 KB | Same class, a little more headroomالفئة نفسها، مع هامش أوسع قليلًا |
| Single-board computerحاسوب أحادي اللوحة | Raspberry Pi 4 Model BRaspberry Pi 4 Model B | 1 to 8 GB LPDDR4 RAMمن 1 إلى 8 GB من ذاكرة LPDDR4 RAM | Quantized MobileNet-class vision, small detectors, a Linux runtimeرؤية حاسوبية من فئة MobileNet بعد التكميم، وكواشف صغيرة، وبيئة تشغيل Linux |
| GPU moduleوحدة GPU | Jetson Orin Nano Super Developer KitJetson Orin Nano Super Developer Kit | 8 GB LPDDR5 at 102 GB/s, 67 INT8 TOPS8 GB من LPDDR5 بسرعة 102 GB/s، و67 INT8 TOPS | Real-time detection, small transformers, on-device fine-tuningاكتشاف في الزمن الحقيقي، ونماذج transformer صغيرة، وضبط دقيق (fine-tuning) على الجهاز |
The last column is a guide, not a datasheet claim. MCUNet reached over 70% ImageNet top-1 accuracy on a commercial microcontroller, so the microcontroller tier is more capable than its numbers suggest, but only after the whole loop has been applied to a purpose-built architecture. A model chosen for a GPU module and then squeezed onto a microcontroller is the hardest path in the course.
العمود الأخير إرشادي، وليس ادعاءً من ورقة بيانات. فقد بلغ MCUNet دقة top-1 تفوق 70% على ImageNet باستخدام microcontroller (متحكم دقيق) تجاري، لذا ففئة المتحكمات الدقيقة أقدر مما توحي به أرقامها، لكن فقط بعد تطبيق الحلقة كاملة على معمارية مصممة لهذا الغرض. أما النموذج الذي يُختار لوحدة GPU ثم يُعصر ليتسع في متحكم دقيق فهو أصعب مسار في المقرر.
| Whenمتى | What to recordما الذي تسجله |
|---|---|
| Week 1الأسبوع 1 | Target device tier and its flash, SRAM or RAM budget from the datasheetفئة الجهاز المستهدف وميزانية ذاكرة الفلاش أو SRAM أو RAM فيه من ورقة البيانات |
| Week 1الأسبوع 1 | Candidate model, its parameter count and float32 weight sizeالنموذج المرشح، وعدد معاملاته، وحجم أوزانه بصيغة float32 |
| Week 1الأسبوع 1 | Baseline accuracy on a held-out set you will not change laterدقة خط الأساس على مجموعة بيانات محجوزة (held-out) لن تغيّرها لاحقًا |
| First run on hardwareأول تشغيل على العتاد | Latency per inference and peak memory as the runtime reports themlatency (زمن الاستجابة) لكل استدلال وذروة الذاكرة كما تبلغ عنهما بيئة التشغيل |
| Every optimizationكل عملية تحسين | The same four numbers again, next to the baseline, plus what it costالأرقام الأربعة نفسها مجددًا، بجوار خط الأساس، مع ما كلّفته الخطوة |
Keep the log as a plain table with one row per experiment and the same columns every time: accuracy, parameter count, size, peak memory, latency, energy if you can measure it, and a one-line note of what changed. This is the compare step made permanent, and it is the table an examiner or a reviewer will want to see.
احتفظ بالسجل جدولًا بسيطًا فيه صف واحد لكل تجربة والأعمدة نفسها في كل مرة: الدقة، وعدد المعاملات، والحجم، وذروة الذاكرة، وزمن الاستجابة، والطاقة إن استطعت قياسها، وملاحظة من سطر واحد عما تغيّر. هذه هي خطوة المقارنة وقد صارت دائمة، وهو الجدول الذي سيرغب الممتحن أو المراجع في رؤيته.
Quick checkاختبار سريع
Where is the COE 592 grading scheme published, according to the deck?أين يُنشر نظام التقييم في COE 592 بحسب الشرائح؟
Recall
Why does the deck not tell you the grading scheme, and what should you do about it?لماذا لا تخبرك الشرائح بنظام التقييم، وماذا يجب أن تفعل حيال ذلك؟
Recall
What three numbers should be in your metrics log before you run the first optimization?ما الأرقام الثلاثة التي يجب أن تكون في سجل مقاييسك قبل أن تُجري أول عملية تحسين؟
Recapالخلاصة
If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا
- Introduce yourself with name, education and work background, and fill in the pre-course survey so the course can be calibrated to the room.عرّف بنفسك باسمك وخلفيتك التعليمية وخلفيتك العملية، واملأ استبيان ما قبل المقرر حتى يُضبط المقرر على مستوى القاعة.
- Five takeaways: measure efficiency, accelerate, analyse trade-offs, track the frontier, build and deploy. Read them as a loop, not a list.المخرجات الخمس: قياس الكفاءة، والتسريع، وتحليل المفاضلات، ومتابعة أحدث ما وصل إليه البحث، والبناء والنشر. اقرأها حلقةً لا قائمة.
- Weight size in bytes equals parameters times bits per weight divided by 8: 3 M parameters is 12 MB at 32-bit and 1.5 MB at 4-bit.حجم الأوزان بالبايت يساوي عدد المعاملات مضروبًا في عدد البتات لكل وزن مقسومًا على 8: نموذج من 3 M معامل حجمه 12 MB عند 32-bit و1.5 MB عند 4-bit.
- Size, peak memory, compute, latency, throughput and energy are separate metrics and can disagree.الحجم، وذروة الذاكرة، والحوسبة، وزمن الاستجابة، والإنتاجية، والطاقة مقاييس منفصلة وقد تتعارض فيما بينها.
- Compression trades accuracy and effort; Deep Compression's 35x came with retraining, not for free.الضغط يقايض على الدقة والجهد؛ وتقليص Deep Compression بمقدار 35x جاء مع إعادة التدريب، لا مجانًا.
- Training on device must hold activations and gradients, far more than inference, and LiteRT for Microcontrollers does not support it.التدريب على الجهاز يتطلب الاحتفاظ بالتنشيطات والتدرجات، وهذا أكثر بكثير من الاستدلال، وLiteRT for Microcontrollers لا يدعمه.
- The syllabus, grading and deliverables are on Blackboard, not in this deck. Class: Mon and Wed 20:10 to 21:25, Building 59, Room 2004.الخطة الدراسية والتقييم والمخرجات المطلوبة موجودة على Blackboard، لا في هذه الشرائح. المحاضرات: الاثنين والأربعاء من 20:10 إلى 21:25، المبنى 59، القاعة 2004.
- Pick a device tier and a candidate model in week one, and start a metrics log before the first optimization.اختر فئة جهاز ونموذجًا مرشحًا في الأسبوع الأول، وابدأ سجل مقاييس قبل أول عملية تحسين.
Sourcesالمصادر
- 6.5940 TinyML and Efficient Deep Learning ComputingDocsMIT Subject ListingCatalogue description, prerequisites and the open-ended design projectوصف المقرر في الدليل، والمتطلبات المسبقة، ومشروع التصميم المفتوح(opens in a new tab)(يفتح في تبويب جديد)
- MIT 6.5940 TinyML and Efficient Deep Learning Computing, Fall 2024DocsMIT HAN Lab (Song Han)Lecture sequence; efficientml.ai redirects to the current offering at hanlab.mit.edu/course, which links past offeringsتسلسل المحاضرات؛ يحوّل efficientml.ai إلى النسخة الحالية على hanlab.mit.edu/course، التي تضم روابط النسخ السابقة(opens in a new tab)(يفتح في تبويب جديد)
- Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman CodingPaperHan, Mao and Dally, ICLR 201635x and 49x size reduction, 3x to 4x speedup, 3x to 7x energy efficiencyتقليص الحجم بمقدار 35x و49x، وتسريع من 3x إلى 4x، وكفاءة طاقة من 3x إلى 7x(opens in a new tab)(يفتح في تبويب جديد)
- Learning both Weights and Connections for Efficient Neural NetworksPaperHan, Pool, Tran and Dally, NIPS 2015AlexNet 61 M to 6.7 M parameters by pruningخفض AlexNet من 61 M إلى 6.7 M معامل بالتقليم(opens in a new tab)(يفتح في تبويب جديد)
- MCUNet: Tiny Deep Learning on IoT DevicesPaperLin et al., NeurIPS 2020Microcontroller memory two to three orders of magnitude below phones; over 70% ImageNet top-1 on an MCUذاكرة المتحكم الدقيق أصغر من ذاكرة الهواتف بمرتبتين إلى ثلاث مراتب عشرية؛ ودقة top-1 تفوق 70% على ImageNet على متحكم دقيق(opens in a new tab)(يفتح في تبويب جديد)
- TinyTL: Reduce Memory, Not Parameters for Efficient On-Device LearningPaperCai et al., NeurIPS 2020Activations, not parameters, are the training memory bottleneckالتنشيطات، لا المعاملات، هي عنق الزجاجة في ذاكرة التدريب(opens in a new tab)(يفتح في تبويب جديد)
- On-Device Training Under 256KB MemoryPaperLin et al., NeurIPS 2022Training under 256 KB SRAM and 1 MB flashالتدريب ضمن 256 KB من SRAM و1 MB من ذاكرة الفلاش(opens in a new tab)(يفتح في تبويب جديد)
- LiteRT for MicrocontrollersDocsGoogle for DevelopersC++ 17, 32-bit platforms, 16 KB core runtime, no on-device trainingC++ 17، ومنصات 32-bit، وبيئة تشغيل أساسية بحجم 16 KB، ولا تدريب على الجهاز(opens in a new tab)(يفتح في تبويب جديد)
- Learn the BasicsDocsPyTorchAssumes basic familiarity with Python and deep learning conceptsيفترض إلمامًا أساسيًا بـPython وبمفاهيم التعلم العميق(opens in a new tab)(يفتح في تبويب جديد)
- Deep LearningBookGoodfellow, Bengio and Courville, MIT Press 2016Free online; convolutional networks refresherمتاح مجانًا على الإنترنت؛ مراجعة للشبكات الالتفافية(opens in a new tab)(يفتح في تبويب جديد)
- TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power MicrocontrollersBookWarden and Situnayake, O'Reilly 2019Practical microcontroller deploymentالنشر العملي على المتحكمات الدقيقة(opens in a new tab)(يفتح في تبويب جديد)
- Arduino Nano 33 BLE Sense Rev2DocsArduinonRF52840, 1 MB flash, 256 KB SRAMnRF52840، و1 MB ذاكرة فلاش، و256 KB من SRAM(opens in a new tab)(يفتح في تبويب جديد)
- Raspberry Pi Pico seriesDocsRaspberry PiPico: 2 MB flash, 264 KB SRAM; Pico 2: 4 MB flash, 520 KB SRAMPico: ذاكرة فلاش 2 MB و264 KB من SRAM؛ Pico 2: ذاكرة فلاش 4 MB و520 KB من SRAM(opens in a new tab)(يفتح في تبويب جديد)
- Raspberry Pi 4 Model B specificationsDocsRaspberry Pi1 to 8 GB LPDDR4من 1 إلى 8 GB من LPDDR4(opens in a new tab)(يفتح في تبويب جديد)
- Jetson Orin Nano Super Developer KitDocsNVIDIA8 GB LPDDR5, 102 GB/s, 67 INT8 TOPS8 GB من LPDDR5، و102 GB/s، و67 INT8 TOPS(opens in a new tab)(يفتح في تبويب جديد)