135 lines
4.8 KiB
Markdown
135 lines
4.8 KiB
Markdown
# YOLO
|
||
### 若電腦沒有顯卡,則可以先用colab的方式進行一個簡單demo
|
||
### 建議都試看看如何使用Yolo,可以套用到很多場景
|
||
#### 若對AI有興趣的,可以去了解CNN、RNN、GAN、DON、DRL、LLM
|
||
|
||
##
|
||
# Yolo V5
|
||
### 可先透過YOLO的github進行查詢,確認所需的環境需求
|
||
### V5 [連接](https://github.com/ultralytics/yolov5)
|
||
由文件中可知所需環境:
|
||
* Python 3.8以上
|
||
* Pytorch 1.8以上
|
||
|
||

|
||
|
||
### 下載V5檔案 [連接](https://github.com/ultralytics/yolov5)
|
||
1. 按下Code
|
||
2. 按下Download ZIP
|
||
3. 解壓縮剛剛下載的檔案
|
||
|
||

|
||
|
||
### 環境安裝
|
||
* 為了同一使用規範,這邊一律採用WinPython的方式進行
|
||
* 可透過提供的環境繼續使用,若要自行架設,繼續往下觀看
|
||
* Winpython[連接](http://leovip125.ddns.net:500/sharing/hS347f5na)
|
||
* 選擇所需要的即可,之後安裝V5是採用3.8,V8採用3.10
|
||
|
||

|
||
|
||
安裝好WinPython後,打開小黑框
|
||

|
||
|
||
### 於指令中輸入 pip list
|
||
|
||

|
||
|
||
### 尋找torch
|
||
若torch版本號後沒有cu的之類的 直接卸載
|
||
`pip uninstall torch`
|
||
接著按Y 確認刪除
|
||
|
||
`pip uninstall torchaudio`
|
||
接著按Y 確認刪除
|
||
|
||
`pip uninstall torchvision`
|
||
接著按Y 確認刪除
|
||
|
||

|
||
|
||
### 上Pytorch的官網,找尋歷史安裝包[link](https://pytorch.org/get-started/previous-versions/):
|
||
|
||

|
||
|
||
於指令中輸入
|
||
`pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html`
|
||
|
||

|
||
|
||
於指令中輸入 pip list 確認
|
||
|
||

|
||
|
||
### 遇到問題
|
||
若出現:
|
||
|
||

|
||
|
||
輸入 `pip install opencv-python`
|
||
|
||
若出現:
|
||
|
||

|
||
|
||
輸入 `pip install ultralytics`
|
||
|
||
### 測試環境
|
||
1. 根據我給的teching_test的資料夾
|
||
2. 使用指令到達此資料夾 cd D:\…….\teaching_test
|
||
|
||

|
||
|
||
3. 輸入
|
||
`python test_yolo.py `
|
||
4. 若能成功運行,並顯示以下畫面,則此環境就能使用了
|
||
|
||

|
||
|
||
|
||
##
|
||
# Yolo V8
|
||
### 可先透過YOLO的github進行查詢,確認所需的環境需求
|
||
### V8 [連接](https://github.com/ultralytics/ultralytics)
|
||
由文件中可知所需環境:
|
||
* Python 3.8以上
|
||
* Pytorch 1.8以上
|
||
|
||

|
||
|
||
### 環境安裝
|
||
### 上Pytorch的官網,找尋歷史安裝包[link](https://pytorch.org/get-started/previous-versions/):
|
||
|
||

|
||
|
||
###
|
||
安裝方式與V5差不多,最終確認
|
||
|
||

|
||
|
||
|
||
### 測試環境
|
||
1. 根據我給的teching_test的資料夾
|
||
2. 使用指令到達此資料夾 cd D:\…….\teaching_test
|
||
|
||

|
||
|
||
3. 輸入
|
||
`python test_yolo.py `
|
||
|
||

|
||
|
||
4. 若能成功運行,並顯示以下畫面,則此環境就能使用了
|
||
|
||

|
||
|
||
## 若安裝許久都無法順利運行,或許是環境有未下載到的,可以直接安裝我提供的環境進行測試。目前實測2-3台,都沒有太多問題。
|
||
網址 -[leovip125.ddns.net:500]( http://leovip125.ddns.net:500/)
|
||
|
||
帳號 : VIP125
|
||
密碼 : Aa125125
|
||
|
||

|
||
|
||
|