diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo00.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo00.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo00.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo00.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo01.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo01.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo01.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo01.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo02.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo02.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo02.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo02.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo03.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo03.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo03.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo03.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo04.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo04.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo04.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo04.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo05.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo05.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo05.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo05.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo06.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo06.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo06.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo06.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo07.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo07.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo07.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo07.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo08.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo08.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo08.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo08.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo09.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo09.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo09.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo09.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo10.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo10.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo10.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo10.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo11.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo11.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo11.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo11.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo12.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo12.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo12.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo12.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo13.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo13.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo13.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo13.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo14.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo14.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo14.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo14.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo15.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo15.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo15.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo15.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo16.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo16.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo16.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo16.png diff --git a/.gitbook/assets/fomo-ad-product-inspection-spresense/Photo17.png b/.gitbook/assets/fomo-ad-product-inspection-spresense/photo17.png similarity index 100% rename from .gitbook/assets/fomo-ad-product-inspection-spresense/Photo17.png rename to .gitbook/assets/fomo-ad-product-inspection-spresense/photo17.png diff --git a/image-projects/fomo-ad-product-inspection-spresense.md b/image-projects/fomo-ad-product-inspection-spresense.md index 86f11a8..46fd3d9 100644 --- a/image-projects/fomo-ad-product-inspection-spresense.md +++ b/image-projects/fomo-ad-product-inspection-spresense.md @@ -11,7 +11,7 @@ Public Project Link: [https://studio.edgeimpulse.com/public/391673/live](https:/ GitHub Repo: [https://github.com/Jallson/FOMO_AD-with-Sony-Spresense/](https://github.com/Jallson/FOMO_AD-with-Sony-Spresense/) -![Anomaly_detected!](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo00.png) +![Anomaly_detected!](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo00.png) ## Problem Statement @@ -21,7 +21,7 @@ Detecting anomalies in a product necessitates a complex system, often involving By using Edge Impulse's Visual Anomaly Detection (FOMO-AD), it's possible to train machine learning models using images using only "ideal" or "normal" products. If an anomaly is detected, its location can be identified, allowing for immediate determination of the damaged or missing part. The compact size of this ML model enables deployment on microcontrollers such as the Arduino Nicla Vision or Sony Spresense (as used here). Low latency, cost efficiency, accuracy, and ease of deployment are the reasons we chose FOMO-AD for this project. -![Schematic_diagram](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo01.png) +![Schematic_diagram](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo01.png) ## How it Works @@ -29,7 +29,7 @@ This project uses Edge Impulse's FOMO-AD (Faster Objects, More Objects - Anomaly Hardware: Sony Spresense with camera and 1602 LCD display. -![Components](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo02.png) +![Components](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo02.png) ## Hardware Components @@ -54,7 +54,7 @@ Hardware: Sony Spresense with camera and 1602 LCD display. We will first determine the object that will serve as the standard for an ideal (normal) product. This involves taking photos at a consistent distance, with similar angles and lighting. This can be done using a tripod and a smartphone camera or by creating a stand with a mounted Sony Spresense and its camera. There will be two types of objects photographed: those used for Training data with a single classification of "no anomaly", and others photographed under conditions that would be considered "anomaly", such as a removed button or a covered LED. These "incorrect" images will later be included in the Test Data section, mixed with some "no anomaly" images. -![Objects](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo03.png) +![Objects](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo03.png) ### 2. Data Acquisition @@ -64,9 +64,9 @@ In **Dashboard > Project Info**, choose **One label per data item** and Sony Spr Whichever method you use, make sure to label each normal product photo as "no anomaly" for the **Train** Data category, as shown in the photo below. Ensure that the Train Data contains only "no anomaly" photos, while the Test Data contains some "no anomaly" photos as well as "anomaly" photos. -![Collect_data](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo04.png) +![Collect_data](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo04.png) -![Upload_data](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo05.png) +![Upload_data](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo05.png) ### 3. Build Model using FOMO-AD @@ -76,27 +76,27 @@ Next, go to the **Image** parameter section, select **Grayscale** for the color If everything is functioning correctly, once complete proceed to the **Live Classification** with a connected camera or test the model by going to the **Model Testing** section and clicking **Classify all**. After these steps, you can adjust the confidence thresholds to set the minimum score required before tagging as an anomaly and clcik **Classify all** again. If your model's test result is above 80%, you can proceed to the next step: _Deployment_. -![Learning_blocks](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo06.png) +![Learning_blocks](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo06.png) -![Save_parameters](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo07.png) +![Save_parameters](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo07.png) -![Generate_features](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo08.png) +![Generate_features](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo08.png) -![Settings](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo09.png) +![Settings](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo09.png) -![Live_classification](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo10.png) +![Live_classification](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo10.png) -![Set_thresholds](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo11.png) +![Set_thresholds](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo11.png) -![Test_results](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo12.png) +![Test_results](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo12.png) ### 4. Deploy Model for Sony Spresense (or Arduino) Click on the **Deployment** tab then search for _Arduino Library_ then select **Quantized (int8)** and click **Build**. This will build an Arduino library for running inferencing targeting Arduino compatible devices, such as the Sony Spresense we're using. After the .ZIP library downloads, open the Arduino IDE, click on **Sketch > Include Library > Add ZIP Library**, then follow the next step. -![Arduino_library_deployment](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo13.png) +![Arduino_library_deployment](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo13.png) -![Instructions in Arduino download](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo14.png) +![Instructions in Arduino download](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo14.png) ### 5. Build the Program (Arduino code) @@ -104,9 +104,9 @@ Before we start with the program, we need to install the Spresense Library using To connect the Spresense to Arduino IDE, choose **Tools > Board: "Spresense"**, then set the **Debug, Core, Memory, Upload Speed, Programmer** values setup as shown in the image below. With the Spresense connected, then we can open the program example in **File > Examples > Visual_Anomaly_Detection_FOMO_AD > Sony Spresense Camera**. Upload this code to your Spresense and now you can test the model with the physical Spresense hardware and camera setup, and one of the "normal" products. Click on **Serial Monitor** icon and check the output results. -![Tools_setup](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo15.png) +![Tools_setup](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo15.png) -![Serial_monitor_output](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo16.png) +![Serial_monitor_output](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo16.png) With the results being displayed on the Serial Monitor accurately, we can now modify this sample program to include more functionality. However, to display the output without a computer, we need to install a 1602 LCD as the display (follow the instructions in the diagram above). Find the specific library for your LCD and include it in your program. @@ -114,7 +114,7 @@ If we observe the output on the Serial Monitor, the detected anomalies at coordi For more detail, you can check or download and modify my code in this GitHub repository, [https://github.com/Jallson/FOMO_AD-with-Sony-Spresense](https://github.com/Jallson/FOMO_AD-with-Sony-Spresense) -![Program_snippet](../.gitbook/assets/fomo-ad-product-inspection-spresense/Photo17.png) +![Program_snippet](../.gitbook/assets/fomo-ad-product-inspection-spresense/photo17.png) Now it's time to upload and run the program without using a computer. Set up the hardware as shown in the diagram above, connect the battery or power bank, and test your Product Inspection with the Visual Anomaly Detection program.