User Tools

Site Tools


amc:ss2025:group-e:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
amc:ss2025:group-e:start [2025/07/29 16:55] – [Introduction] 34602_students.hsrwamc:ss2025:group-e:start [2025/07/29 17:23] (current) 35983_students.hsrw
Line 4: Line 4:
 ''by Jonathan Stuermlinger (34602)''\\ ''by Jonathan Stuermlinger (34602)''\\
  
-For our AMC project, we developed a basic traffic monitoring system using a Raspberry Pi 5, designed to detect and count vehicles as they pass through a designated section of road captured by a camera. The collected data is uploaded to a web-based dashboard, which could provide a foundation for traffic flow analysis and supporting studies on air pollution, noise levels, and overall urban livability. Such information can also play a valuable role in infrastructure planning and broader environmental monitoring initiatives.+For our AMC project, we developed a basic traffic monitoring system using a Raspberry Pi 5, designed to detect and count vehicles as they pass through a designated section of road captured by a Pi camera. The collected data is uploaded to a web-based dashboard, which could provide a foundation for traffic flow analysis and supporting studies on air pollution, noise levels, and overall urban livability. Such information can also play a valuable role in infrastructure planning and broader environmental monitoring initiatives.
 ===== Material & Methods ===== ===== Material & Methods =====
 +''by Nicole Alvarado (35983) & Ben Koellner (34603)''\\
 ==== Hardware Components ==== ==== Hardware Components ====
 The project was developed using the following hardware components: The project was developed using the following hardware components:
Line 88: Line 89:
 ==== Files Setup and Execution === ==== Files Setup and Execution ===
 Provided below is a downloadable ZIP containing the pre-trained COCO object detection model used in this setup. It also includes a list of all detectable object classes that the COCO library has been trained to recognize. All project files, including the object detection, dashboard scripts and vehicle log, were placed into the previously downloaded archives (Object_Detection_Files) and transferred to the Raspberry Pi Desktop using a USB stick. Provided below is a downloadable ZIP containing the pre-trained COCO object detection model used in this setup. It also includes a list of all detectable object classes that the COCO library has been trained to recognize. All project files, including the object detection, dashboard scripts and vehicle log, were placed into the previously downloaded archives (Object_Detection_Files) and transferred to the Raspberry Pi Desktop using a USB stick.
 +
 {{ :amc:ss2025:group-e:object_detection_files.zip |}} {{ :amc:ss2025:group-e:object_detection_files.zip |}}
 +
 To execute the object detection script, enter the following command in the terminal. To execute the object detection script, enter the following command in the terminal.
 <code C++> <code C++>
Line 101: Line 104:
 </code> </code>
 ===== Results ===== ===== Results =====
 +''by Nicole Alvarado (35983)''\\
 +
 ==== Code ==== ==== Code ====
-Three Python scripts were developed as part of the system's functionality+Three files were developed as part of the system's functionality: two Python scripts and one CSV file for data logging:
   - Object Detection   - Object Detection
   - Vehicle Log   - Vehicle Log
Line 120: Line 125:
 # === Load class names === # === Load class names ===
 classNames = [] classNames = []
-classFile = "/home/aless/Desktop/Object_Detection_Files/coco.names"+classFile = "/home/pi/Desktop/Object_Detection_Files/coco.names"
 with open(classFile, "rt") as f: with open(classFile, "rt") as f:
     classNames = f.read().rstrip("\n").split("\n")     classNames = f.read().rstrip("\n").split("\n")
  
 # === Load model config and weights === # === Load model config and weights ===
-configPath = "/home/aless/Desktop/Object_Detection_Files/ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt" +configPath = "/home/pi/Desktop/Object_Detection_Files/ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt" 
-weightsPath = "/home/aless/Desktop/Object_Detection_Files/frozen_inference_graph.pb"+weightsPath = "/home/pi/Desktop/Object_Detection_Files/frozen_inference_graph.pb"
  
 assert os.path.exists(classFile), f"Missing file: {classFile}" assert os.path.exists(classFile), f"Missing file: {classFile}"
Line 456: Line 461:
  
 ===== Discussion & Conclusion ===== ===== Discussion & Conclusion =====
-While our traffic monitoring system functions reliably in its current form, there were several lessons learned throughout the projectInitially, our goal was to develop the system using the Raspberry Pi 5 in combination with an AI Hat (an additional Raspberry Pi module designed to enhance computing performance) and the YOLO algorithm for advanced object detection. However, due to repeated compatibility and setup issues, we were unable to make the AI Hat fully operational and instead opted for an alternative approach based on OpenCV and COCO (Common Objects in Context) libraries.  +''by Jonathan Stuermlinger (34602) & Ben Koellner (34603)''\\ 
-An important takeaway from this experience is that a more successful integration of the AI Hat and YOLO framework would likely have required reaching out for external support early on, especially to better understand the specific requirements and limitations of the Raspberry Pi 5 and the AI HatDespite these challenges, the alternative solution we implemented proved to be solid and functional approach for basic vehicle detection and counting.+ 
 +While our traffic monitoring system functions reliably in its current form, several lessons emerged during developmentThe initial plan was to use the Raspberry Pi 5 with the AI Hat (an additional module designed to accelerate on-device AI processing) and YOLO framework for advanced object detection. Due to repeated compatibility and setup issues, we switched to an alternative solution based on OpenCV and COCO (Common Objects in Context) libraries. In hindsight, earlier external support could have improved our understanding of the AI Hat’s requirements and potentially enabled its useNevertheless, the implemented solution provided functional and low-cost approach for basic vehicle detection and counting.
  
 However, the system is not without limitations. For example, detecting larger vehicles such as buses proved inconsistent, especially depending on the camera angle and environmental conditions. In our case, the monitoring frame was set up between trees, which occasionally interfered with object detection. However, the system is not without limitations. For example, detecting larger vehicles such as buses proved inconsistent, especially depending on the camera angle and environmental conditions. In our case, the monitoring frame was set up between trees, which occasionally interfered with object detection.
Line 467: Line 473:
 Despite these challenges, the project demonstrates that a low-cost and accessible traffic monitoring solution is possible without specialized AI hardware. With further development, such a system could be adapted for real-world use cases in traffic analysis, planning, or environmental studies. Despite these challenges, the project demonstrates that a low-cost and accessible traffic monitoring solution is possible without specialized AI hardware. With further development, such a system could be adapted for real-world use cases in traffic analysis, planning, or environmental studies.
 ===== Video ===== ===== Video =====
-===== References ===== +{{ :amc:ss2025:group-e:carpi_video.mp4 |}}
--insert info+
  
 +===== References =====
 +COCO - Common Objects in Context. (n.d). https://cocodataset.org/#home
  
  
amc/ss2025/group-e/start.1753800939.txt.gz · Last modified: 2025/07/29 16:55 by 34602_students.hsrw