This commit is contained in:
dnrops 2024-05-16 19:42:30 +08:00
parent 68b4a2c4fe
commit 4eb31b4cd2
2 changed files with 35 additions and 35 deletions

View File

@ -176,37 +176,37 @@
<p>http://mirrors.ustc.edu.cn/ubuntu-releases/22.04/ubuntu-22.04.4-desktop-amd64.iso</p>
<h2 id="3-导入utm"><a class="header" href="#3-导入utm">3. 导入UTM</a></h2>
<p>选择模拟CPU<br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/57f4120becea48d9bd8ae5d9eff567fc~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1800&amp;h=1304&amp;s=371002&amp;e=png&amp;b=bfbfc1" alt="image.png" /></p>
<p><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ed4a8bf8336949509dee44c8a8b338e7~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=900&amp;h=1022&amp;s=58543&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/51d0b19444874b1caf93f8f523d002c7~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=900&amp;h=1022&amp;s=56997&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f56d5be5b97c403ebed9b2ae0192cc07~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=900&amp;h=1022&amp;s=87133&amp;e=png&amp;b=fefefe" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/2247fbee515f4162978eab1c3670507b~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=900&amp;h=1022&amp;s=35944&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ca2844cf4d2a440a9a813449c22059c0~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=900&amp;h=1022&amp;s=75098&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6ad12bb6a0e44dbeab73707ff7bb74a8~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=900&amp;h=1022&amp;s=128517&amp;e=png&amp;b=fefefe" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/57f4120becea48d9bd8ae5d9eff567fc~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=1800&amp;h=1304&amp;s=371002&amp;e=png&amp;b=bfbfc1" alt="image.png" /></p>
<p><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/ed4a8bf8336949509dee44c8a8b338e7~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=900&amp;h=1022&amp;s=58543&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/51d0b19444874b1caf93f8f523d002c7~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=900&amp;h=1022&amp;s=56997&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/f56d5be5b97c403ebed9b2ae0192cc07~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=900&amp;h=1022&amp;s=87133&amp;e=png&amp;b=fefefe" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/2247fbee515f4162978eab1c3670507b~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=900&amp;h=1022&amp;s=35944&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/ca2844cf4d2a440a9a813449c22059c0~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=900&amp;h=1022&amp;s=75098&amp;e=png&amp;b=ffffff" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/6ad12bb6a0e44dbeab73707ff7bb74a8~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=900&amp;h=1022&amp;s=128517&amp;e=png&amp;b=fefefe" alt="image.png" /><br />
打开刚创建的虚拟机 等待加载至桌面后选择install Ubuntu<br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3a3f7e0bc05840c09648d11fb32b52b0~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=764161&amp;e=png&amp;b=f7f7f7" alt="image.png" /></p>
<p><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c8b1746354584701a0b1f657782ff0b5~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=764506&amp;e=png&amp;b=f8f8f8" alt="image.png" /></p>
<p><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/e356be6ac1594b4db02b3da64adaeacc~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=704778&amp;e=png&amp;b=f7f7f7" alt="image.png" /></p>
<p><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6e2c9e34d5ef4e33a91b5998128ca552~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=733848&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/56880cc90f8348858cf5d6e484e7b78a~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=722190&amp;e=png&amp;b=cbcaca" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3306314fe6c44c54ae898787ffcee46f~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=904424&amp;e=png&amp;b=f9f9f9" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/508ffc2eb4514c73971dc35806444149~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=748090&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6a996e77ff804b789b60f97135e2044f~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=1408606&amp;e=png&amp;b=470545" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/3a3f7e0bc05840c09648d11fb32b52b0~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=764161&amp;e=png&amp;b=f7f7f7" alt="image.png" /></p>
<p><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/c8b1746354584701a0b1f657782ff0b5~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=764506&amp;e=png&amp;b=f8f8f8" alt="image.png" /></p>
<p><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/e356be6ac1594b4db02b3da64adaeacc~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=704778&amp;e=png&amp;b=f7f7f7" alt="image.png" /></p>
<p><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/6e2c9e34d5ef4e33a91b5998128ca552~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=733848&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/56880cc90f8348858cf5d6e484e7b78a~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=722190&amp;e=png&amp;b=cbcaca" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/3306314fe6c44c54ae898787ffcee46f~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=904424&amp;e=png&amp;b=f9f9f9" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/508ffc2eb4514c73971dc35806444149~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=748090&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/6a996e77ff804b789b60f97135e2044f~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=1408606&amp;e=png&amp;b=470545" alt="image.png" /><br />
安装完成后点击重启<br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8ffc371171804ee9971579a6a491d6a6~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=128471&amp;e=png&amp;b=000000" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/8ffc371171804ee9971579a6a491d6a6~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=128471&amp;e=png&amp;b=000000" alt="image.png" /><br />
按提示删除刚才的iso文件后 输入ENTER键 等待进度条读取加载完成后看到图形界面然后关机<br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c082da23f6fb4384907f010f94be0023~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=673592&amp;e=png&amp;b=c9c9c9" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/c082da23f6fb4384907f010f94be0023~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=673592&amp;e=png&amp;b=c9c9c9" alt="image.png" /><br />
关机完成后 清除iso路径后再打开虚拟机 等待<br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9ebad94aecc4460f9cd7ecac090538b1~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1804&amp;h=1402&amp;s=327096&amp;e=png&amp;b=e7e5eb" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fd20daf1ac2e4637ad3ecdc54290626a~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1600&amp;h=1276&amp;s=108026&amp;e=png&amp;b=000000" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/9ebad94aecc4460f9cd7ecac090538b1~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=1804&amp;h=1402&amp;s=327096&amp;e=png&amp;b=e7e5eb" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/fd20daf1ac2e4637ad3ecdc54290626a~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=1600&amp;h=1276&amp;s=108026&amp;e=png&amp;b=000000" alt="image.png" /><br />
更新的都不更新 一律跳过/下一步<br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/35d2de14162a4311a800df13a6c75fd1~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=552298&amp;e=png&amp;b=f6f6f6" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7c0ed5e831274b7cadf21c2ca7eb6e02~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=545056&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/16fc1f90cca34a3ebac0fa6c33087ae4~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=536383&amp;e=png&amp;b=f8f8f8" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/307ca876ec9d467b8abdebb1f3a8e892~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=527923&amp;e=png&amp;b=f6f6f6" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6317f967873c474d9378a92623d0bc20~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=544895&amp;e=png&amp;b=f6f6f6" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/91030aa08eeb4841b881b666ce85d259~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=529324&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/137b31031e2c45c494380c1c22e9f579~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=2560&amp;h=1676&amp;s=609607&amp;e=png&amp;b=f7f7f7" alt="image.png" /></p>
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/35d2de14162a4311a800df13a6c75fd1~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=552298&amp;e=png&amp;b=f6f6f6" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/7c0ed5e831274b7cadf21c2ca7eb6e02~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=545056&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/16fc1f90cca34a3ebac0fa6c33087ae4~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=536383&amp;e=png&amp;b=f8f8f8" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/307ca876ec9d467b8abdebb1f3a8e892~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=527923&amp;e=png&amp;b=f6f6f6" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/6317f967873c474d9378a92623d0bc20~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=544895&amp;e=png&amp;b=f6f6f6" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/91030aa08eeb4841b881b666ce85d259~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=529324&amp;e=png&amp;b=f7f7f7" alt="image.png" /><br />
<img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/137b31031e2c45c494380c1c22e9f579~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=2560&amp;h=1676&amp;s=609607&amp;e=png&amp;b=f7f7f7" alt="image.png" /></p>
<h2 id="4set-mirror"><a class="header" href="#4set-mirror">4.set mirror</a></h2>
<pre><code>nano /etc/apt/sources.list
@ -288,7 +288,7 @@ alias u22='ssh geekhour@192.168.105.13'
<pre><code>sudo apt install spice-vdagent spice-webdavd
</code></pre>
<p>配置UTM共享选项选择SPICE WebDAV</p>
<p><img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fa390424d6244863972129a462e595de~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1600&amp;h=922&amp;s=272882&amp;e=png&amp;b=fefefe" alt="图片.png" />
<p><img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fa390424d6244863972129a462e595de~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=1600&amp;h=922&amp;s=272882&amp;e=png&amp;b=fefefe" alt="图片.png" />
我们安装davfs2实现挂载</p>
<pre><code class="language-sh"> sudo apt install davfs2
</code></pre>
@ -299,12 +299,12 @@ sudo mount -t davfs http://localhost:9843 ~/macos
<p>实现开机免密自动挂载</p>
<pre><code>sudo vim /etc/davfs2/davfs2.conf
</code></pre>
<p><img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bf1d933d497f4f5f97d09adb15d080b5~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1260&amp;h=1816&amp;s=1106908&amp;e=png&amp;b=ffffff" alt="图片.png" /></p>
<p><img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bf1d933d497f4f5f97d09adb15d080b5~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=1260&amp;h=1816&amp;s=1106908&amp;e=png&amp;b=ffffff" alt="图片.png" /></p>
<pre><code class="language-sh">sudo vim /etc/davfs2/secrets
</code></pre>
<pre><code>http://localhost:9843 1 1
</code></pre>
<p><img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/b77b7670da55429587df34d88d5290a9~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=946&amp;h=376&amp;s=331623&amp;e=png&amp;b=fffefe" alt="图片.png" /></p>
<p><img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/b77b7670da55429587df34d88d5290a9~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=946&amp;h=376&amp;s=331623&amp;e=png&amp;b=fffefe" alt="图片.png" /></p>
<h2 id="7-可选-卸载ubuntu桌面"><a class="header" href="#7-可选-卸载ubuntu桌面">7. (可选) 卸载ubuntu桌面</a></h2>
<pre><code>sudo vim /etc/default/grub
</code></pre>

View File

@ -186,7 +186,7 @@
<p>You can use the YOLOv8 network to solve classification, object detection, and image segmentation problems. All these methods detect objects in images or in videos in different ways, as you can see in the image below:</p>
<div class="table-wrapper"><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>
<tr><td><strong>Classification</strong></td><td><strong>Detection</strong></td><td><strong>Segmentation</strong></td></tr>
<tr><td><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/811f3c49fbcd44a69acdd1bb41bcd38d~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=224&amp;h=284&amp;s=10469&amp;e=jpg&amp;b=739150" alt="" /></td><td><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/78bc6cd26ae74f5cb71fc13cb464f97b~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=224&amp;h=284&amp;s=11716&amp;e=jpg&amp;b=789552" alt="" /></td><td><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/581d2a8547db489abebd8d1253ec95de~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=224&amp;h=284&amp;s=10436&amp;e=jpg&amp;b=946ed7" alt="" /></td></tr>
<tr><td><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/811f3c49fbcd44a69acdd1bb41bcd38d~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=224&amp;h=284&amp;s=10469&amp;e=jpg&amp;b=739150" alt="" /></td><td><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/78bc6cd26ae74f5cb71fc13cb464f97b~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=224&amp;h=284&amp;s=11716&amp;e=jpg&amp;b=789552" alt="" /></td><td><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/581d2a8547db489abebd8d1253ec95de~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=224&amp;h=284&amp;s=10436&amp;e=jpg&amp;b=946ed7" alt="" /></td></tr>
</tbody></table>
</div>
<p>The neural network that created and trained for <strong>image classification</strong> determines a class of object on the image and returns its name and the probability of this prediction. For example, on the left image, it returned that this is a “cat” and that the confidence level of this prediction is 92% (0.92).</p>
@ -227,7 +227,7 @@
<li><a href="https://docs.ultralytics.com/modes/export/">export({format})</a> - used to export this model from default PyTorch format to specified one.</li>
</ul>
<p>All YOLOv8 models for object detection shipped already pretrained on the <a href="https://cocodataset.org/">COCO dataset</a>, which is a huge collection of images of 80 types. So, if you do not have specific needs, then you can just run it as is, without additional training. For example, you can download this image as “cat_dog.jpg”:</p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y1ofWB3n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr8bm7gga15xp9gfz7yz.jpg"><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/4f00654088944cad854b5d4323cff712~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=612&amp;h=415&amp;s=34608&amp;e=jpg&amp;b=637c1e" alt="Image description" /></a></p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y1ofWB3n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr8bm7gga15xp9gfz7yz.jpg"><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/4f00654088944cad854b5d4323cff712~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=612&amp;h=415&amp;s=34608&amp;e=jpg&amp;b=637c1e" alt="Image description" /></a></p>
<p>and run <code>predict</code> to detect all objects on it:</p>
<pre><code>results = model.predict(&quot;cat_dog.jpg&quot;)
</code></pre>
@ -432,7 +432,7 @@ Probability: 0.92
</ol>
<pre><code>{object_class_id} {x_center} {y_center} {width} {height}
</code></pre>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7EeI3gIK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/09nf4zkcet5g05i6po5u.png"><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c1b9d6c7c5284064a67ff6b3b3818ac6~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=400&amp;h=507&amp;s=102903&amp;e=png&amp;b=74924e" alt="Image description" /></a></p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7EeI3gIK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/09nf4zkcet5g05i6po5u.png"><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/c1b9d6c7c5284064a67ff6b3b3818ac6~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=400&amp;h=507&amp;s=102903&amp;e=png&amp;b=74924e" alt="Image description" /></a></p>
<p>Actually, this is the most time-consuming manual work in a machine learning process: to measure bounding boxes for all objects and add them to annotation files. Moreover, coordinates should be <strong>normalized</strong> to fit in a range from 0 to 1. To calculate them, you need to use the following formulas:</p>
<p>x_center = (box_x_left+box_x_width/2)/image_width<br />
y_center = (box_y_top+box_height/2)/image_height<br />
@ -465,7 +465,7 @@ height = 146/415 = 0.351807229</p>
</code></pre>
<p>The first line contains a bounding box for the dog (class id=1), the second line contains a bounding box for the cat (class id=0). Of course, you can have the image with many dogs and many cats at the same time, and you can add bounding boxes for all of them.</p>
<p>After adding and annotating all images, the dataset is ready. You need to create two datasets and place them in different folders. The final folder structure can look like this:</p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lZqfY3F3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7obu30iswcnm9hb8sk93.png"><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1350b02854054a4cba50acc4ca867765~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=140&amp;h=176&amp;s=1593&amp;e=png&amp;b=505050" alt="Image description" /></a></p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lZqfY3F3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7obu30iswcnm9hb8sk93.png"><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/1350b02854054a4cba50acc4ca867765~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=140&amp;h=176&amp;s=1593&amp;e=png&amp;b=505050" alt="Image description" /></a></p>
<p>Here the training dataset located in the “train” folder and the validation dataset located in the “val” folder.</p>
<p>Finally, you need to create a dataset descriptor YAML-file, that points to created datasets and describes the object classes in them. This is a sample of this file for the data, created above:</p>
<pre><code>train: ../train/images
@ -485,7 +485,7 @@ names: ['cat','dog']
<h1 id="how-to-train-the-yolov8-model"><a class="header" href="#how-to-train-the-yolov8-model"><a href="#how-to-train-the-yolov8-model"></a>How to train the YOLOv8 model</a></h1>
<p>After the data is ready, you need to pass it through the model. To make it more interesting, we will not use this small “cats and dogs” dataset. We will use other custom dataset for training. It contains traffic lights and road signs. This is free dataset that I got from the Roboflow Universe: <a href="https://universe.roboflow.com/roboflow-100/road-signs-6ih4y">https://universe.roboflow.com/roboflow-100/road-signs-6ih4y</a>. Press “Download Dataset” and select the “YOLOv8” as a format.</p>
<p>If it will not available on the Roboflow when you read these lines, then you can get it from <a href="https://drive.google.com/file/d/1PNktsghBqIJVgxa-34FqO3yODNJbH3B0/view?usp=sharing">my Google Drive</a>. This dataset can be used to teach the YOLOv8 to detect different objects on the roads, like displayed on the next screenshot.</p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xsA9xwIj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8vmnnu8lcvawt7gxndjy.png"><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/784918db281a438f87ba287786293462~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=640&amp;h=640&amp;s=41345&amp;e=jpg&amp;b=39341c" alt="Image description" /></a></p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xsA9xwIj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8vmnnu8lcvawt7gxndjy.png"><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/784918db281a438f87ba287786293462~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=640&amp;h=640&amp;s=41345&amp;e=jpg&amp;b=39341c" alt="Image description" /></a></p>
<p>You can open the downloaded zip file and ensure that it structured using the rules, described above. You can find the dataset descriptor file <code>data.yaml</code> in the archive as well.</p>
<p>If you downloaded the archive from the Roboflow, it will contain the additional “test” dataset, which is not used by the training process. You can use the images from it for additional testing on your own after training.</p>
<p>Extract the archive to the folder with your Python code and execute the <code>train</code> method to start a training loop:</p>
@ -509,7 +509,7 @@ names: ['cat','dog']
</ul>
<p>The progress and results of each phase for each epoch displayed on the screen. This way you can see how the model learns and improves from epoch to epoch.</p>
<p>When you run the <code>train</code> code, you will see the similar output during the training loop:</p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yAScE4ce--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u893m4q54pr7kkqkgdqr.png"><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fc28b76804d64571a6873d8440bc049d~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=800&amp;h=177&amp;s=20548&amp;e=png&amp;b=fcfcfc" alt="Image description" /></a></p>
<p><a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yAScE4ce--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u893m4q54pr7kkqkgdqr.png"><img src="https://gitcode.net/dnrops/blog_images/-/raw/main/all_imgs/fc28b76804d64571a6873d8440bc049d~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.png#?w=800&amp;h=177&amp;s=20548&amp;e=png&amp;b=fcfcfc" alt="Image description" /></a></p>
<p>For each epoch it shows summary for both training and validation phases: the lines 1 and 2 show results of training phase and the lines 3 and 4 shows results of validation phase for each epoch.</p>
<p>The training phase includes calculation of the amount of error in a loss function, so, the most valuable metrics here are <code>box_loss</code> and <code>cls_loss</code>.</p>
<ul>