<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mehdi Jebbour on Medium]]></title>
        <description><![CDATA[Stories by Mehdi Jebbour on Medium]]></description>
        <link>https://medium.com/@mehdijebbour?source=rss-a31d19475613------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v1u4HCrJi8lCsFI9C49wag.jpeg</url>
            <title>Stories by Mehdi Jebbour on Medium</title>
            <link>https://medium.com/@mehdijebbour?source=rss-a31d19475613------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 03:52:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mehdijebbour/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploring Mobile App Security: Part 1 Unmasking the Culprit Behind Insecure Data Storage ️‍♂️]]></title>
            <link>https://medium.com/@mehdijebbour/exploring-mobile-app-security-part-1-unmasking-the-culprit-behind-insecure-data-storage-%EF%B8%8F-%EF%B8%8F-ce00f2338093?source=rss-a31d19475613------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce00f2338093</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Mehdi Jebbour]]></dc:creator>
            <pubDate>Wed, 03 May 2023 15:22:09 GMT</pubDate>
            <atom:updated>2023-05-03T15:51:01.468Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ykMFA_u3-fgG_J0v5JEAQ.png" /></figure><p>Join us on a thrilling adventure to expose the dangers of insecure data storage and learn how to demonstrate this vulnerability using Flutter and Android Debug Bridge (ADB)!</p><h3>Introduction</h3><p>Hello, fellow app developers! 🎩 In the realm of mobile applications, safeguarding user data from potential security threats is of utmost importance. One of the most common risks we must face is insecure data storage. In this article, we’ll explore the pitfalls of insecure data storage and uncover how to demonstrate this vulnerability using Flutter and Android Debug Bridge (ADB).</p><h3><em>Table Of Contents :</em></h3><blockquote><em>Introduction</em></blockquote><blockquote><em>Insecure Data Storage: The Hidden Threat 🦹‍♂️</em></blockquote><blockquote><em>Demonstrating the Vulnerability: Unmasking the Culprit with ADB 🕵️‍♂️</em></blockquote><blockquote><em>Conclusion</em></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FBpGWitbFZflfSUYuZ9%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FBpGWitbFZflfSUYuZ9%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMXo0bTV5a285Znp6Zjg1OGJwanAwMTF0dDdtYnoyOGUxbGpyY2d4ciZlcD12MV9naWZzX2dpZklkJmN0PWc%2FBpGWitbFZflfSUYuZ9%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="363" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f3adc02048a2e7c8a20f23b21df942f/href">https://medium.com/media/3f3adc02048a2e7c8a20f23b21df942f/href</a></iframe><h3>1. Insecure Data Storage: The Hidden Threat 🦹‍♂️</h3><p>In mobile app development, we often store data on our users’ devices. This data could range from user preferences to personal information or even application state. There are many ways to store this data, but beware! Not all of them are as secure as they seem.</p><p><strong>SharedPreferences</strong> is a simple yet popular key-value storage system used in Android applications. It provides an easy way to store small pieces of data persistently, without the need for a full-fledged database. SharedPreferences stores data in XML files within the app’s private directory on the device’s file system.</p><p>While SharedPreferences is convenient and easy to use, it is not suitable for storing sensitive data. The reason behind this is that the data stored using SharedPreferences is neither encrypted nor protected by any security measures. If a malicious actor gains access to the device’s file system, they can easily read or modify the contents of the SharedPreferences XML file, putting the stored data at risk.</p><p><strong>Flutter Secure Storage: The Shield Against Insecurity 🛡️</strong></p><p>On the other hand, Flutter Secure Storage provides a more secure alternative for data storage. This package provides a secure storage facility that wraps around the platform-specific secure storage APIs. On Android, it uses Android’s KeyStore system, while on iOS, it uses Keychain services.</p><p>Flutter Secure Storage encrypts the data before storing it, and the encryption key is securely managed and protected by the operating system. This means that even if a malicious actor gains access to the device’s file system, they will not be able to decipher the stored data without the encryption key.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FUqnC7f2MkN1IpHssWz%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FUqnC7f2MkN1IpHssWz%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FUqnC7f2MkN1IpHssWz%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="243" frameborder="0" scrolling="no"><a href="https://medium.com/media/d21d51732c66194ebbbc09da446d1089/href">https://medium.com/media/d21d51732c66194ebbbc09da446d1089/href</a></iframe><h3>2. Demonstrating the Vulnerability: Unmasking the Culprit with ADB 🕵️‍♂️</h3><h4>2.1. The App: Your Trusty Companion 🦸‍📱</h4><p>Before we dive in, you’ll need to get our custom-built app up and running. It’s a pretty neat tool we’ve designed to highlight the issues with insecure data storage. Here’s your game plan to get started:</p><ol><li>Hit up the <a href="https://github.com/ElMehdijebbour/Mobile-App-Security-Playground/releases/download/v0.1/app-debug.apk">[App Download Link]</a> to download our “Mobile App Security Playground” app.</li><li>Next, install the app on your Android device.</li><li>Once that’s done, fire up the app and take a little tour. You’ll notice options for storing sensitive data with SharedPreferences and Flutter Secure Storage.</li></ol><p>With this app in your toolkit, you’ll be all set to see firsthand how insecure data storage works, and more importantly, how to avoid it. Let’s get cracking!</p><h4>2.2. The App in Action: Exploring Insecure Data Storage 📱</h4><p>Now that you have our “Mobile App Security Playground” app installed on your device, let’s put it to the test and witness the perils of insecure data storage in action!</p><p>Follow these steps to use the app and explore the difference between SharedPreferences and Flutter Secure Storage:</p><ol><li>Launch the app: Open the “Mobile App Security Playground” app on your device.</li><li>Save data using SharedPreferences: On the app’s main screen, you’ll find a section for Insecure Data Storage enter it.</li><li>Enter some sensitive data in the provided text field and tap the “Save” button to store the data using SharedPreferences.</li><li>Save data using Flutter Secure Storage: Scroll down to the Flutter Secure Storage section. Enter sensitive data in the text field and tap the “Save” button to store the data securely using Flutter Secure Storage.</li><li>Verify data storage: To confirm that the data has been saved, close and reopen the app. You’ll see the data you entered in the respective sections for SharedPreferences and Flutter Secure Storage.</li></ol><p>By following these steps, you’ll experience firsthand the process of storing data using both SharedPreferences and Flutter Secure Storage, setting the stage for the ADB demonstration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cSqTvnCyEZIxH2ADD194Sg.png" /></figure><h4>2.3. SharedPreferences Under the Microscope: Using ADB to Highlight Insecure Data StorageBefore</h4><blockquote><strong>Before we proceed, it’s important to note that the following demonstration is for educational purposes only. This exercise is intended to help developers understand the risks associated with insecure data storage and is not meant for malicious activities.</strong></blockquote><blockquote>In this article, we’ll be dealing with a debug version of an Android app, which allows us to access its private folders without the need for rooting the device.</blockquote><p><strong>Step 1: Enable USB Debugging on Your Android Device</strong></p><p>To use ADB with a device connected via USB, you need to enable the USB Debugging option in the device system settings, under Developer options.</p><p>On Android 4.2 and higher, Developer options are hidden by default. To make it available, go to Settings &gt; About phone and tap Build number seven times. Return to the previous screen to find Developer options.</p><p><strong>Step 2: Connect Your Device to Your Computer</strong></p><p>Connect your Android device to your computer using a USB cable. You might get a prompt on your device about allowing USB debugging. Make sure to check “Always allow from this computer” and tap OK.</p><p><strong>Step 3: Verify Your Device Connection</strong></p><p>Open a terminal or command prompt on your computer and type adb devices. You should see your device listed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0eLjXG9FWpz1c-hEzdDnw.png" /></figure><p><strong>Step 4: Start an ADB Shell Session</strong></p><p>Enter the following command to start an interactive shell on your device:</p><pre>adb shell</pre><p><strong>Step 5 : Navigate to SharedPreferences Directory</strong></p><p>SharedPreferences stores data in XML files within your app’s private directory on the device file system. Since we’re dealing with a debuggable app, we can access this directory with the following commands:</p><pre>run-as com.example.mobile_app_security_playground<br>cd shared_prefs/</pre><p><strong>Step 6 : Pull the SharedPreferences File</strong></p><p>Pull the SharedPreferences file from your device to your local machine using the following command:</p><pre>adb shell &quot;run-as com.example.mobile_app_security_playground cat /data/data/com.example.mobile_app_security_playground/shared_prefs/FlutterSharedPreferences.xml&quot; &gt; local.xml</pre><p><strong>Step 7 : Edit the SharedPreferences File</strong></p><p>Edit local.xml on your computer with your preferred text editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*jZVcaggWGJABj5o02_s5gg.png" /></figure><p>I used gedit to edit the xml file and changed the previously saved data to : “this data has been altered” .</p><p><strong>Step 8: Push the Modified SharedPreferences File Back to Your Device</strong></p><p>Push the modified SharedPreferences file back to your device using the following commands:</p><pre>adb shell &quot;run-as com.example.mobile_app_security_playground sh -c &#39;cat &gt; /data/data/com.example.mobile_app_security_playground/shared_prefs/FlutterSharedPreferences.xml&#39;&quot; &lt; local.xml</pre><p><strong>Step 9 : Reopen the app again to see the changes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aivkdsv4--UuiESwzF5u3g.jpeg" /></figure><p>The data was successfully altered! as the screenshot shows !</p><h3><strong>3. Conclusion</strong></h3><p>In this article, we’ve explored the dangers of insecure data storage in mobile app development, specifically when using SharedPreferences. We demonstrated the vulnerability by accessing and altering the stored data using Android Debug Bridge (ADB) and our custom-built “Mobile App Security Playground” app.</p><p>It’s crucial for app developers to understand the potential risks associated with insecure data storage and choose secure alternatives like Flutter Secure Storage when handling sensitive user data. By learning about these risks and implementing secure data storage practices, you can ensure your users’ data remains protected and build trust in your applications. <strong>Remember, the demonstration provided in this article is for educational purposes only and should not be used for malicious activities.</strong></p><p>Thank youfor reading this article.</p><p>If I got something wrong? Let me know in the comments. I would love to improve.</p><p>Clap 👏 If this article helps you.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fg697zr42aee76RqD89%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fcbs-young-sheldon-youngsheldon-iain-armitage-g697zr42aee76RqD89&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExeWtuNmdoc2h0ZTg5cHRueHczdTlidHB4aDd3aXprZHQwNWoxdXcyeSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fg697zr42aee76RqD89%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/5af8ecd5a86fc3e3e91feb8a9c14c333/href">https://medium.com/media/5af8ecd5a86fc3e3e91feb8a9c14c333/href</a></iframe><p>As we conclude our discussion on insecure data storage, we turn our attention to another significant aspect of mobile app security — “Broken Authentication”. This is a common and serious issue that developers must understand and address.</p><p>In our upcoming article, we’ll delve into the complexities of broken authentication, shedding light on its mechanisms and providing insights into how you can safeguard your apps against such vulnerabilities.</p><p>Make sure to stay tuned!</p><p>Read my other articles :</p><p><a href="https://medium.com/@mehdijebbour/object-detection-how-to-train-a-custom-model-with-yolo-v5-a450a22a4c6d">Object Detection : How To Train a Custom Model With Yolo-V5</a></p><p>Feel free to connect with me:</p><p>Linkdin : <a href="https://www.linkedin.com/in/el-mehdi-jebbour/">https://www.linkedin.com/in/el-mehdi-jebbour/</a></p><p>Github : <a href="https://github.com/ElMehdijebbour">https://github.com/ElMehdijebbour</a></p><p>App repository : <a href="https://github.com/ElMehdijebbour/Mobile-App-Security-Playground">https://github.com/ElMehdijebbour/Mobile-App-Security-Playground</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce00f2338093" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Object Detection : How To Train a Custom Model With Yolo-V5]]></title>
            <link>https://medium.com/@mehdijebbour/object-detection-how-to-train-a-custom-model-with-yolo-v5-a450a22a4c6d?source=rss-a31d19475613------2</link>
            <guid isPermaLink="false">https://medium.com/p/a450a22a4c6d</guid>
            <category><![CDATA[google-colab]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[yolov5]]></category>
            <category><![CDATA[strawberry]]></category>
            <category><![CDATA[object-detection]]></category>
            <dc:creator><![CDATA[Mehdi Jebbour]]></dc:creator>
            <pubDate>Fri, 29 Oct 2021 11:38:09 GMT</pubDate>
            <atom:updated>2021-10-31T15:09:37.940Z</atom:updated>
            <content:encoded><![CDATA[<h3>Object Detection: How To Train a Custom Model With Yolo-V5</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pM-yHatUulquBu8KnyYoKA.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FhhRcDQGfAZzpo1UVYQ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FhhRcDQGfAZzpo1UVYQ&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FhhRcDQGfAZzpo1UVYQ%2Fgiphy.gif%3Fcid%3D790b76111493c6539c171d31468660d9f4c42e0e6330d406%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b0178f251ef86d25d3f296b5418935e/href">https://medium.com/media/3b0178f251ef86d25d3f296b5418935e/href</a></iframe><p><strong>Hello Everyone.</strong></p><p><strong>In this article, we are going to use Yolo-V5 and OIDV4 tool kit to train a custom object detection model for strawberry detection.</strong></p><h3>Object Detection :</h3><p>Object detection is a computer vision technique for identifying and locating objects. within an image or video. Specifically, object detection generates bounding boxes around objects, which enable us to determine where said objects are in a given scene.</p><p>We may confuse image recognition and object detection, but image recognition only detects the class of the given image, whereas object detection draws bounding boxes around the detected object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*xqcQCMCwGI0lyPryrp3MLw.png" /></figure><h3>Prerequisites:</h3><p>A fundamental understanding of deep learning computer vision, Python, and how to work in a Google Colab environment.</p><h3>Google Colab:</h3><p>Collaboratory, or ’Colab’ for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary Python code through the browser and is especially well suited to machine learning, data analysis, and education. More technically, Colab is a hosted Jupyter notebook service that requires no setup to use, while providing free access to computing resources including GPUs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*9gjKPb7BhB87KY-7fBxrAg.png" /></figure><h3>OID Toolkit:</h3><p>A tool to export images and their labels from google’s large images data set (Open Images V6)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UQunBOkUKPs9pNt2wohUcg.png" /></figure><h3>How do you train a custom Yolo V5 model?</h3><p>To train a custom Yolo V5 model, these are the steps to follow:</p><ol><li>Prepare the dataset</li><li>Environment Setup: Install YOLOv5 dependencies</li><li>Setup the data and the directories</li><li>Set up the configuration YAML files.</li><li>Train the model</li></ol><h3>Preparing the dataset</h3><ol><li>Fork or Clone the Repository for the OIDv4 Toolkit, and install dependencies</li></ol><p><a href="https://github.com/theAIGuysCode/OIDv4_ToolKit.git">GitHub - theAIGuysCode/OIDv4_ToolKit: Download and visualize single or multiple classes from the huge Open Images v4 dataset</a></p><pre>!git clone <a href="https://github.com/theAIGuysCode/OI|Dv4_ToolKit.git">https://github.com/theAIGuysCode/OIDv4_ToolKit.git</a><br>!pip3 install -r /content/OIDv4_ToolKit/requirements.txt</pre><p>2. Download training data for the strawberry dataset.</p><pre>!python /content/OIDv4_ToolKit/main.py downloader — classes ‘Strawberry’ — type_csv train — limit 100</pre><p>3. For validation, the dataset can be downloaded by entering the command.</p><pre>!python /content/OIDv4_ToolKit/main.py downloader --classes &#39;Strawberry&#39;  --type_csv validation --limit 20</pre><h3>Environment Setup</h3><p>To train a Yolo V5 model, a few things need to be downloaded from the internet. In google Colab, the easiest is to download and set up your environment using terminal commands directly from your notebook, as follows</p><pre>!git clone https://github.com/ultralytics/yolov5  # clone repo</pre><pre>%pip install -qr requirements.txt  # install dependencies</pre><h3>Directory structure</h3><p>Now that we prepared the dataset, time to organize</p><p>Let’s create a folder called traindata at the same level as the yolov5 folder.</p><p>In this data folder let’s create a folder for images and a folder for labels.</p><p>Inside each of them, we make a folder for train data and a folder for validation data.</p><blockquote>If files are not placed in the right directory, you are likely to encounter errors later on.</blockquote><p>Now that our directory is ready we start copying our dataset to its place</p><p><strong>First, we need to make some changes for yolov5</strong></p><p>The Label Image Architecture has to be slightly tweaked for the inputs for the YOLOv5.</p><ol><li>In the file classes.txtEnter only the names of the labels which we have downloaded in a separate line. In our single Strawberry Object Detector, we can do that by overriding the existing file and rewriting the name of our class to it.</li></ol><pre>%cd /content/</pre><pre>%rm /content/OIDv4_ToolKit/classes.txt</pre><pre>!echo “strawberry” &gt; /content/OIDv4_ToolKit/classes.txt</pre><pre>!python /content/OIDv4_ToolKit/convert_annotations.py</pre><p>2. We convert the annotations we have to yolov5 annotations using the command</p><pre>!python /content/OIDv4_ToolKit/convert_annotations.py</pre><p>Then we start copying using basic shell commands</p><pre>!cp /content/OID/Dataset/train/Strawberry/*.jpg /content/train_d|ata/images/train/</pre><pre>!cp /content/OID/Dataset/train/Strawberry/*.txt /content/train_data/labels/train/</pre><pre>!cp /content/OID/Dataset/validation/Strawberry/*.jpg /content/train_data/images/val/</pre><pre>!cp /content/OID/Dataset/validation/Strawberry/*.txt /content/train_data/labels/val/</pre><h3>Setup the YAML file for training</h3><p>We specify:</p><ol><li>Our training and validation dataset directory location.</li><li>The number of classes we want to detect.</li><li>The name of our class</li></ol><p>For our case the YAML file should look like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*IGlxFXCKorGR8mkWwczz6g.png" /></figure><h3>Training the model</h3><p>For this step, we need to use a GPU (They have a large number of cores, which allows for better computation of multiple parallel processes)</p><p>Google provides the use of free GPU for your Colab notebooks.</p><p>So we start by activating it on our notebook settings :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/0*WYujC-YCqtnBIvPq.png" /></figure><p>Now that we completed all the steps we can start training our model</p><p>There are multiple hyperparameters that we can specify for this training process which are:</p><p>The <strong>batch</strong> size is a gradient descent hyperparameter that controls the number of training samples that must be processed before the model’s internal parameters are updated.</p><p>The number of<strong> epochs</strong> is a gradient descent hyperparameter that controls the number of complete passes through the training dataset.</p><p><strong>data</strong> for setting the path to our YAML file</p><p><strong>weights</strong> load the pre-trained weights. Transfer learning will improve your performance greatly and will save you a lot of training time in our case we will use yolov5s weights</p><p>We’ll train this model with 16 batches and 100 epochs.</p><p>For more information and tips to get the best training results please refer to this amazing article :</p><p><a href="https://github-wiki-see.page/m/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results">Tips for Best Training Results - ultralytics/yolov5 Wiki</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*pP5lW5ekCLx2qbZm3Muiug.png" /></figure><h3>Evaluate the model</h3><pre># Start tensorboard<br># logs are saved in the folder &quot;runs&quot;<br>%load_ext tensorboard<br>%tensorboard --logdir /content/yolov5/runs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mztrcyqfo_DjxlBTQPaaXQ.png" /></figure><h3>Testing our model</h3><p>To run the model on a specific image</p><pre># use the best weights!<br># Final weights will be by-default stored at /content/yolov5/runs/train/exp2/weights/</pre><pre>%cd /content/yolov5/<br>!python d|etect.py — weights runs/train/exp2/weights/best.pt — img 640 — conf 0.25 — source ../14.jpg<br>#we can run it also on videos, it will process frame per frame</pre><p><strong>Results:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F8hgpzLNccYja6xEOwi%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F8hgpzLNccYja6xEOwi%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F8hgpzLNccYja6xEOwi%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/d605ad2b6c07b380ba30391d2ee4420a/href">https://medium.com/media/d605ad2b6c07b380ba30391d2ee4420a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*0_SbynHXGt93HgqAtWPGdQ.png" /></figure><h3>Conclusion:</h3><p>I hope you found this tutorial useful and you were able to train your model successfully.</p><p>Thank you for reading my article.</p><p>And thanks for the amazing articles and references out there, who I forgot to mention, as well as those I did mention.</p><p>If you have any questions, suggestions, or criticisms, please contact me via <a href="http://mehdi.jebb@gmail.com/">email</a>. Feel free to reach out to me.</p><h3>References:</h3><p>Official Repo: <a href="https://github.com/ultralytics/yolov5">https://github.com/ultralytics/yolov5</a></p><p><a href="https://medium.com/analytics-vidhya/training-a-custom-object-detection-model-with-yolo-v5-aa9974c07088">https://medium.com/analytics-vidhya/training-a-custom-object-detection-model-with-yolo-v5-aa9974c07088</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a450a22a4c6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>