<?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 Gökhan Duman on Medium]]></title>
        <description><![CDATA[Stories by Gökhan Duman on Medium]]></description>
        <link>https://medium.com/@gkhndmn4?source=rss-3b1a32745a3e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pEbxsjOkPa8Fk6tAZisG6g.png</url>
            <title>Stories by Gökhan Duman on Medium</title>
            <link>https://medium.com/@gkhndmn4?source=rss-3b1a32745a3e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:17:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gkhndmn4/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[YOLOv10 —Performance With OpenVINO]]></title>
            <link>https://medium.com/@gkhndmn4/yolov10-performance-with-openvino-e798eed252f8?source=rss-3b1a32745a3e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e798eed252f8</guid>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[yolov10]]></category>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[ultralytics]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Gökhan Duman]]></dc:creator>
            <pubDate>Tue, 28 May 2024 09:49:32 GMT</pubDate>
            <atom:updated>2024-05-28T09:57:17.659Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8WTyb_3AqGdEt74AOdGZFQ.png" /></figure><p>Developments in the field of artificial intelligence do not stop! With the recently released V10 version of YOLO, great strides have been made in the field of object detection. So how is it different from the others?</p><h4>DIFFERENCES AND INNOVATIONS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L1e4EOLIwKalyFi9Mgtubw.png" /></figure><h4>1- Lightweight Classification Head:</h4><p>The lightweight classification head uses depth-wise separable convolutions to reduce the computational load of the classification head.</p><ul><li><strong>Depth-Wise Separable Convolutions: </strong>Traditional convolution processes process all channels simultaneously at each layer, which incurs high computational cost. Depth-wise separable convolutions divide this process into two separate steps: depth-wise convolution and point-to-point convolution.</li><li><strong>1- Depth-wise Convolution: </strong>Each filter convolves only one channel of the input volume.</li><li><strong>2- Pointwise Convolution: </strong>Combines the output of the depth-wise convolution in channel size using 1x1 convolution.</li><li>This method significantly reduces the computational cost and the number of parameters, thus creating faster and lighter models.</li></ul><h4>2- Spatial-Channel Decoupled Downsampling:</h4><p>Spatial-channel decomposed down sampling minimizes information loss and computational cost by decoupling spatial attenuation and channel modulation.</p><ul><li><strong>Spatial Reduction: </strong>An operation used to reduce the spatial dimensions (width and height) of an image or feature map. For example, it can be done using pooling or strided convolutions.</li><li><strong>Channel Modulation: </strong>Used to change the channel size (depth) of the feature map. Usually 1x1 convolutions or other channel reduction techniques are used.</li><li>Decoupling: In traditional methods, spatial and channel operations are done together, which can lead to information loss. The decomposed method optimizes each step by performing these operations separately, thus reducing information loss and computational cost.</li></ul><h4>3- Rank-Guided Block Design:</h4><p>Sequence-guided block design adapts the block design based on intrinsic stage redundancy, thus ensuring optimal parameter utilization.</p><ul><li><strong>Intrinsic Stage Redundancy:</strong>There can be redundancy or repeated information in different layers or blocks of the model. This means some layers or blocks carry less information compared to others.</li><li><strong>Rank-Guided: </strong>It ranks and evaluates the amount of information each block or layer carries. Blocks that carry less information are optimized in terms of computation and parameters.</li><li><strong>Block Design: </strong>Based on this ranking, the design and parameter allocation of each block are optimized. This enhances the overall performance of the model while minimizing unnecessary computations and parameter usage.</li></ul><p>These three efficiency enhancements ensure that object detection and classification models operate faster and more efficiently. The lightweight classification head reduces computational load, the spatial-channel decoupled downsampling minimizes information loss, and the rank-guided block design ensures optimal parameter usage. These innovations improve both the accuracy and operational speed of the models.</p><h4>4- Large-Kernel Convolution:</h4><p>Large-core convolution is a convolution process designed to cover a larger area than a typical convolution layer.<br>In traditional convolution layers, the filter size (or kernel size) is usually small, such as 3x3 or 5x5. These filters are typically used to learn features from a small portion of a given feature map.<br>Large kernel convolution can be particularly useful for identifying features over large areas, such as distant objects. Also, in general, it allows for more comprehensive feature extraction, taking into account a broader context.</p><h4>5- <strong>Partial Self-Attention (PSA)</strong>:</h4><p>Self-attention mechanisms are a mechanism for enriching the representation of each pixel in a feature map by taking into account its relationships with other pixels. Classical self-attention mechanisms consider full connectivity between all pixels, which can increase the computational cost. Partial self-attention focuses only on the relationships between close pixels, instead of this full connectivity. This can be sufficient to capture important relationships in the feature map, with a smaller computational cost. Partial self-attention can help the model generalize better, while introducing minimal overhead to improve the global representation. In particular, it may be more effective for capturing relationships over long distances.</p><p>These mechanisms are innovative techniques used to improve the performance of convolutional networks (CNNs) and self-attention mechanisms. Large-core convolution helps to extract more comprehensive features by considering a broader context, while partial self-attention focuses on capturing important relationships at minimal additional cost to improve global representation.</p><p>After all these innovations, let’s take a look at how the models compare:</p><h4>MODEL COMPARISONS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*xsPiHsO3jkeWI5gWs6lV5A.png" /></figure><p>In addition to the traditional Nano, Small, Medium, Large and Extra-Large models, a new model called “Balanced” has been introduced. This model aims to provide higher accuracy with increased width, while at the same time rigorously addressing performance. This approach aims to provide a balance that suits the various needs of users.</p><p>The main objective of the “Balanced” model is to strike a balance between width and accuracy. Breadth allows the model to be fed with more data and more complex structures, resulting in deeper understanding and more accurate predictions. However, this increase in breadth can negatively impact performance. Therefore, the “Balanced” model aims to optimize performance while increasing breadth. This improves the user experience in terms of speed and efficiency, while maintaining the depth and complexity needed to achieve higher accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Od8FSMOWbDmSaeohZS59xg.png" /></figure><p>Compared to other models, we see higher accuracy and performance despite the lower number of parameters.</p><p>How do we use YOLOv10 with OpenVINO, whose use depends on the Ultralytics API?</p><h4>YOLOv10 with OpenVINO:</h4><p>First of all, we need to make the necessary installations:</p><pre>pip install git+https://github.com/THU-MIG/yolov10.git<br>pip install openvino openvino-dev</pre><p>With these commands, the installation of the necessary libraries is complete.</p><p>Now we need to convert the YOLO model in PyTorch format to OpenVINO IR format. But for this, the usual Ultralytics export command shows certain errors. This is due to layer differences. So how do we do this conversion?</p><p>If you try to convert using the standard export command, you will get such an error when converting to IR format after ONNX:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Cuo-5NFG4ei4RfSi9EknA.png" /></figure><p>So how do we solve this? First of all, for Ubuntu, we need to update PATH after installing the above libraries. This completely varies from computer to computer. So if the user has already added this path</p><blockquote>/home/root/.local/bin</blockquote><p>to PATH, will not have any problems. But for those who have not, the following warning will appear.</p><blockquote><em>WARNING: The scripts ultralytics and yolo are installed in ‘/home/root/.local/bin’ which is not on PATH.</em></blockquote><p>This will cause the process to fail. For this, the PATH settings must be adjusted first.</p><p>This can be solved simply with the following command.</p><pre>export PATH=$PATH:/home/root/.local/bin</pre><p>But if we want it to be persistent, we can do it with .bashrc</p><pre>nano ~/.bashrc</pre><p>In the bottom line of the file to be opened with this command:</p><pre>export PATH=$PATH:/home/root/.local/bin</pre><p>With the addition of this line, our PATH will now become permanent. Finally, we update our bash file with the source command.</p><pre>source ~/.bashrc</pre><p>Now we can do our conversions.</p><p><a href="https://github.com/THU-MIG/yolov10/releases/tag/v1.1">Release Update checkpoints with other attributes. · THU-MIG/yolov10</a></p><p>First you need to download the model you want to use from this address and put it in the folder where the python code will run.</p><pre>import types<br>from ultralytics.utils import ops<br>from ultralytics import YOLOv10<br>import torch<br><br>def v10_det_head_forward(self, x):<br>    one2one = self.forward_feat([xi.detach() for xi in x], self.one2one_cv2, self.one2one_cv3)<br>    if not self.export:<br>        one2many = super().forward(x)<br><br>    if not self.training:<br>        one2one = self.inference(one2one)<br>        if not self.export:<br>            return {&quot;one2many&quot;: one2many, &quot;one2one&quot;: one2one}<br>        else:<br>            assert self.max_det != -1<br>            boxes, scores, labels = ops.v10postprocess(one2one.permute(0, 2, 1), self.max_det, self.nc)<br>            return torch.cat(<br>                [boxes, scores.unsqueeze(-1), labels.unsqueeze(-1).to(boxes.dtype)],<br>                dim=-1,<br>            )<br>    else:<br>        return {&quot;one2many&quot;: one2many, &quot;one2one&quot;: one2one}<br>model = YOLOv10(&quot;yolov10n.pt&quot;)<br>model.model.model[-1].forward = types.MethodType(v10_det_head_forward, model.model.model[-1])<br>model.export(format=&quot;openvino&quot;, dynamic=True ,half=True)</pre><p>After this command, our exported model will be created in the same directory and with the name <strong>yolov10n_openvino_model.</strong> Now it’s just a matter of using it!</p><h4>PyTorch vs OpenVINO:</h4><p>Now let’s do my favorite performance comparison!</p><p>On my computer with Intel(R) Core(TM) i7–7560U CPU @ 2.40GHz, I will first use the model in PyTorch format as 640x640 and Half, i.e. fp16</p><pre>from ultralytics import YOLOv10<br>model = YOLOv10(&quot;yolov10n.pt&quot;)<br>model.predict(source=0, imgsz=640, show=True)</pre><p>With this command I first run the model with PyTorch and the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*PoxczyJYQ7-JUBI0lipRRQ.png" /></figure><p>As you can see, the latency ranges from 70 to 100. So how will it be with OpenVINO?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*_he8PDVTxe-FXz_zELnMYQ.png" /></figure><p>The result varies between 40–50 ms. This performance is amazing!</p><p>But the important point is that to use the model with the Ultralytics API, dynamic must be selected as True in the export command. Otherwise there will be wrong inference results.</p><p>Thank you for reading! Good work everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e798eed252f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FastSAM with OpenVINO — HIGH Performance]]></title>
            <link>https://medium.com/@gkhndmn4/fastsam-with-openvino-high-performance-d40549eeeab9?source=rss-3b1a32745a3e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d40549eeeab9</guid>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[cpu]]></category>
            <category><![CDATA[fastsam]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Gökhan Duman]]></dc:creator>
            <pubDate>Tue, 30 Jan 2024 11:16:01 GMT</pubDate>
            <atom:updated>2024-01-30T11:16:01.882Z</atom:updated>
            <content:encoded><![CDATA[<h3>FastSAM with OpenVINO — HIGH Performance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jeas_RXJr9_tNKzfH_ZcLg.png" /></figure><p>First of all, hello everyone! We see day by day that there is no limit to what we can do with OpenVINO technology. In my previous article, we talked about how we can use the YOLO model with OpenVINO 4x faster on a non-CUDA system. Today we will talk about how to use Fast Segment Anything, the accelerated version of Segment Anything (SAM) published by META, with OpenVINO.</p><h3><strong>What is SAM?</strong></h3><blockquote>The Segment Anything Model (SAM) produces high quality object masks from input prompts such as points or boxes, and it can be used to generate masks for all objects in an image. It has been trained on a dataset of 11 million images and 1.1 billion masks, and has strong zero-shot performance on a variety of segmentation tasks.</blockquote><p>META’s statement on its official GitHub account actually explains everything very well. (<a href="https://github.com/facebookresearch/segment-anything">Click here to go</a>). In short, SAM is a model developed to segment everything in the world. Segmenting allows us to get the positions of objects. Using these locations we can detect all objects in the world. This is a topic for another article :)</p><h3><strong>What is FastSAM?</strong></h3><blockquote>The Fast Segment Anything Model(FastSAM) is a CNN Segment Anything Model trained using only 2% of the SA-1B dataset published by SAM authors. FastSAM achieves comparable performance with the SAM method at 50× higher run-time speed.</blockquote><p>The FastSAM trainers stated that they trained this model using only 2% of the SA-1B dataset published by META. This gives us high speed and performance is nothing less than SAM. This gives us high speed and almost the same accuracy as SAM. That’s very impressive.</p><p>Now let’s look at the comparison of FastSAM and SAM on photos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNHBp69BS1924XChDKVGPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ub3MKnMF-w_FNudsMOnWDA.png" /></figure><p>There is almost no difference, as it seems! This is very excellent news for developers.</p><p>Again, we saw a huge model and in our minds, of course, we started to think that this model would require a very powerful graphics card.</p><p>Let’s push the envelope a bit and see how such an impressive model would perform on a non-CUDA computer. This is where OpenVINO comes in, developed to run AI models faster on processors and non-CUDA graphics cards.</p><p>OpenVINO is an artificial intelligence library developed by Intel. Its goal is to run AI models fast on processors and non-CUDA graphics cards.</p><p><strong>Now let’s quickly install OpenVINO.</strong></p><p>First, let’s update the PiP library from which we will download the necessary packages.</p><pre>python -m pip install --upgrade pip</pre><p>So now we are ready to build the necessary libraries.</p><pre>python -m pip install openvino<br>python -m pio install openvino-dev</pre><p>We have installed the necessary libraries, now let’s check.</p><pre>python -c &quot;from openvino.runtime import Core; print(Core().available_devices)&quot;</pre><p>The output of this command shows us the hardware we can use. On my computer, both CPU and GPU are available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZtK6lGXEjIw9bhAXsfIXA.png" /></figure><p>If we see this output, our installations are successful. Also, as you can see in this output, both CPU and GPU options are active on the computer where I am writing this article.</p><p>Now let’s start using FastSAM with OpenVINO.</p><p><strong>FastSAM with OpenVINO</strong></p><p>Here again I have good news! Ultralyics provides us with a ready-made interface to use FastSAM.</p><p>There are two models we can use here. The first one is FastSAM-s and the other one is FastSAM-x. FastSAM-s is less accurate than the other one but it works faster.</p><p>Let’s start using it now.</p><pre>pip install ultralytics</pre><p>We install the ultralytics library using this command.</p><p>First of all, we need to convert our model in PyTorch format to OpenVINO IR format. We can use the following Python script for this.</p><pre>from ultralytics import FastSAM<br>model = FastSAM(&#39;FastSAM-s.pt&#39;)</pre><p>This will save the required model file in the directory.</p><pre>model.export(format=&quot;openvino&quot;, half=True, imgsz=640)</pre><p>In this section we convert the model to OpenVINO IR format. The half parameter here provides fp16 estimation. The imgsz parameter determines the size of the input layer of the model. Remember that the larger the image size, the slower it will run.</p><p>After this process, ultralytics will create the FastSAM model in IR format in the same directory in the ‘FastSAM-s_openvino_model’ folder.</p><pre>openvino_fastsam = FastSAM(&#39;FastSAM-s_openvino_model&#39;)</pre><p>In this section we assign our IR model to our openvino_fastsam variable. Now we can predict using our model.</p><p>First, let’s experiment with a photo.</p><pre>image = &#39;./test_photo.jpg&#39;</pre><p>Let’s look at our example photo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B7BFp_j08RBNMQ_asypsYQ.jpeg" /></figure><p>Now let’s take a first look.</p><pre>results = openvino_fastsam(image, retina_masks=True, imgsz=640, conf=0.4, iou=0.9, save=True)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QbktdyFu45lRGdos4USXeA.jpeg" /></figure><p>Isn’t it too complicated? Now let’s increase the threshold a little bit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PeTsX7XP7DlifZXHCaLDXw.jpeg" /></figure><p>Yes, our results are now better at a threshold of 0.6. Let’s increase the threshold a bit more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wjJC2B7QStFyvhzAJpqr5g.jpeg" /></figure><p>Yes, now we have focused on the more prominent parts at the 0.8 threshold.</p><p>We can also set the show_boxes parameter to false to turn off the display of boxes on the image.</p><p>Now let’s move on to the most exciting part. Performance! Let’s look at our performance by making real-time predictions on camera.</p><p>First, let’s make predictions on PyTorch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UjeTq9dptp5nNQ5n7Lhung.png" /></figure><p>Prediction results with Intel Core i3–1005G1 processor via PyTorch are as above. Now let’s look at the results via OpenVINO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CE-BjLixb356rWposYdEew.png" /></figure><p>Yes, again, as we have seen, it works 4x faster.</p><p>OpenVINO is one of the best in artificial intelligence! This allows us to successfully use our AI models in embedded systems. In the future, with CLIP developed by OpenAI, we can also detect what objects are in the segmented location in the photo. In this way, we can detect everything in the world! Stay tuned to be informed about my new articles! Thank you for your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d40549eeeab9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[YOLO - CPU Performance Enhancement]]></title>
            <link>https://medium.com/@gkhndmn4/yolo-cpu-performance-enhancement-3685b7fa84a5?source=rss-3b1a32745a3e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3685b7fa84a5</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[cpu]]></category>
            <category><![CDATA[yolo]]></category>
            <dc:creator><![CDATA[Gökhan Duman]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 13:49:19 GMT</pubDate>
            <atom:updated>2024-01-16T13:57:54.544Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*usY-PBj5vKE89Hh62BpcOQ.jpeg" /></figure><p>YOLO is one of the most popular object detection models in recent times. So what is Yolo? Yolo is an object detection artificial intelligence model that can detect objects in a single pass, as the name suggests, rather than other object detection models.</p><p>Another advantage of YOLO which is very easy to train, is its community support. It also has many pre-trained models.</p><p>When you think of artificial intelligence models, the first thing that comes to mind is a graphics card. But can’t we use these models directly on a processor without a graphics card? Of course it can be used. This is where the OpenVino platform developed by Intel comes into play.</p><p>OpenVino was developed to effectively use AI models on the CPU and its performance is very impressive.</p><p>And where can this be useful? Depending on the point of view, this process can generally be used effectively on embedded systems like Raspberry Pi series. It can also be used for non-CUDA graphics cards (Intel Graphics, etc.).</p><p>So how do we use it?</p><p><strong>OpenVino Setup on Windows for Python</strong></p><p>On Windows, we will install it by typing the following commands in the terminal:</p><p>First we update our pip version.</p><pre>python -m pip install --upgrade pip</pre><p>Then we install OpenVino via pip</p><pre>python -m pip install openvino<br>python -m pio install openvino-dev</pre><p>You can then run this command to check the installation.</p><pre>python -c &quot;from openvino.runtime import Core; print(Core().available_devices)&quot;</pre><p>The output of this command shows us the hardware we can use. On my computer, both CPU and GPU are available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*A_9KwPIlNDbl5La0mn1G2A.png" /><figcaption>Devices that can be used</figcaption></figure><p>Now let’s see how we can use OpenVino together with YOLO</p><p><strong>YOLO with OpenVino</strong></p><p>We can use a YOLO model that we have trained ourselves first, or we can use models that have been pre-trained both by the community and by YOLO Teams.</p><p>In this article, I will use the Yolov8 Nano model trained by YOLO.</p><p>First of all, to use Yolov8 we need to install it via pip. For this we use the following command.</p><pre>pip install ultralytics</pre><p>Now, the model needs to be downloaded and assigned to a variable. We can do this as follows.</p><pre>from ultralytics import YOLO<br>model = YOLO(&quot;yolov8n.pt&quot;)</pre><p>The result of this python script will download our model and assign it to the model variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdftvdwy5dbVvkbNM_XJVg.png" /></figure><p>Model successfully downloaded and assigned to variable. Now we need to convert this model to OpenVino IR format. For this we will use YOLO’s export tool.</p><pre>model.export(format=&quot;openvino&quot;, imgsz=640)</pre><p>This will simply convert our model to OpenVino IR format. <br>Parameters<br>* format: To convert to OpenVino format.<br>* imgsz To determine the input size of the model.<br>is being used.</p><p>For more efficient performance, we can estimate fp16 using the Half parameter.</p><p>If your hardware supports it, it also has the ability to make int8 type predictions for ultrafast. But this requires a calibration phase.</p><p>But there is nothing to fear! Ultralytics does it for us!</p><p>for fp16 data type model:</p><pre>model.export(format=&quot;openvino&quot;, imgsz=640, half=True)</pre><p>The output of this command will be our fp16 prediction model.</p><p>for int8 data type model:</p><pre>model.export(format=&quot;openvino&quot;, imgsz=640, int8=True, data=&quot;coco128.yaml&quot;)</pre><p>We used the data parameter in this command because we needed to specify the data we will use for calibration.</p><p>After calibrating Yolov8n model for int8 using Coco, the model will be able to successfully predict in int8 data format.</p><p>After these commands, ultralytics will download the libraries required for us and give us the IR type of the YoloV8n model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*2wxy_dP12YqcA2rw9BX3cg.png" /></figure><p>This output shows that our model has been successfully built.</p><p>Now it’s just a matter of using the model!</p><p><strong>Using the Model</strong></p><p>Now we assign our new model to the variable.</p><pre>openvino_model = YOLO(&quot;yolov8n_openvino_model/&quot;, task=&quot;detect&quot;)</pre><p>After this command, Ultralytics sets our model to be used in OpenVino. Now we can predict!</p><pre>openvino_model.predict(source=0, show=True, imgsz=640)</pre><p>Parameters here:<br>* source: This is the location where we will get the image for the prediction. With 0 we can predict the camera, with video we can predict the video, with photo we can predict the photo!<br>* show: To show us the result after the prediction.<br>* imgsz: The input size that the model will use when predicting (the size we set when exporting).</p><p>We can also adjust things like the threshold.</p><p>Now it’s the most exciting place! Model performance!</p><p>The model, which makes predictions with the fp32 data format using OpenVino, performs on the Intel-i3–1005G1 CPU:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*8A04MjEMRk14RVNYguiwVQ.png" /></figure><p>What if we did it directly through PyTorch?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*hsmneP4wkSa76eNulSb4JQ.png" /></figure><p>Isn’t that amazing? This way we can achieve efficient performance on the CPU.</p><p><strong>Conclusion</strong></p><p>OpenVino improves performance by about 4 times on non-CUDA systems. In this way, you can run your artificial intelligence projects on embedded systems and non-CUDA systems with peace of mind.</p><p>Don’t forget to follow me. In the future, I will try different artificial intelligence models on different platforms and share my results with you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3685b7fa84a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>