diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml
index 13f9787..80ae429 100644
--- a/.github/workflows/ci-testing.yml
+++ b/.github/workflows/ci-testing.yml
@@ -63,9 +63,9 @@ jobs:
python-version: '3.9'
model: yolov5n
- os: ubuntu-latest
- python-version: '3.8' # torch 1.7.0 requires python >=3.6, <=3.8
+ python-version: '3.8' # torch 1.8.0 requires python >=3.6, <=3.8
model: yolov5n
- torch: '1.7.0' # min torch version CI https://pypi.org/project/torchvision/
+ torch: '1.8.0' # min torch version CI https://pypi.org/project/torchvision/
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
@@ -75,8 +75,8 @@ jobs:
- name: Install requirements
run: |
python -m pip install --upgrade pip wheel
- if [ "${{ matrix.torch }}" == "1.7.0" ]; then
- pip install -r requirements.txt torch==1.7.0 torchvision==0.8.1 --extra-index-url https://download.pytorch.org/whl/cpu
+ if [ "${{ matrix.torch }}" == "1.8.0" ]; then
+ pip install -r requirements.txt torch==1.8.0 torchvision==0.9.0 --extra-index-url https://download.pytorch.org/whl/cpu
else
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
fi
diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml
index 8aca12d..2203b2c 100644
--- a/.github/workflows/greetings.yml
+++ b/.github/workflows/greetings.yml
@@ -31,7 +31,7 @@ jobs:
## Requirements
- [**Python>=3.7.0**](https://www.python.org/) with all [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) installed including [**PyTorch>=1.7**](https://pytorch.org/get-started/locally/). To get started:
+ [**Python>=3.7.0**](https://www.python.org/) with all [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) installed including [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). To get started:
```bash
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
diff --git a/README.md b/README.md
index a27fe24..b9941b7 100644
--- a/README.md
+++ b/README.md
@@ -78,8 +78,8 @@ See the [YOLOv5 Docs](https://docs.ultralytics.com/yolov5) for full documentatio
Install
Clone repo and install [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) in a
-[**Python>=3.7.0**](https://www.python.org/) environment, including
-[**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
+[**Python>=3.8.0**](https://www.python.org/) environment, including
+[**PyTorch>=1.8**](https://pytorch.org/get-started/locally/).
```bash
git clone https://github.com/ultralytics/yolov5 # clone
diff --git a/README.zh-CN.md b/README.zh-CN.md
index fe382af..49503c3 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -72,7 +72,7 @@ pip install ultralytics
安装
-克隆 repo,并要求在 [**Python>=3.7.0**](https://www.python.org/) 环境中安装 [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) ,且要求 [**PyTorch>=1.7**](https://pytorch.org/get-started/locally/) 。
+克隆 repo,并要求在 [**Python>=3.7.0**](https://www.python.org/) 环境中安装 [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) ,且要求 [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/) 。
```bash
git clone https://github.com/ultralytics/yolov5 # clone
diff --git a/models/experimental.py b/models/experimental.py
index d60d180..11f75e2 100644
--- a/models/experimental.py
+++ b/models/experimental.py
@@ -87,11 +87,11 @@ def attempt_load(weights, device=None, inplace=True, fuse=True):
model.append(ckpt.fuse().eval() if fuse and hasattr(ckpt, 'fuse') else ckpt.eval()) # model in eval mode
- # Module compatibility updates
+ # Module updates
for m in model.modules():
t = type(m)
if t in (nn.Hardswish, nn.LeakyReLU, nn.ReLU, nn.ReLU6, nn.SiLU, Detect, Model):
- m.inplace = inplace # torch 1.7.0 compatibility
+ m.inplace = inplace
if t is Detect and not isinstance(m.anchor_grid, list):
delattr(m, 'anchor_grid')
setattr(m, 'anchor_grid', [torch.zeros(1)] * m.nl)
diff --git a/requirements.txt b/requirements.txt
index ee9e7db..33bb7db 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,8 +12,8 @@ PyYAML>=5.3.1
requests>=2.23.0
scipy>=1.4.1
thop>=0.1.1 # FLOPs computation
-torch>=1.7.0 # see https://pytorch.org/get-started/locally (recommended)
-torchvision>=0.8.1
+torch>=1.8.0 # see https://pytorch.org/get-started/locally (recommended)
+torchvision>=0.9.0
tqdm>=4.64.0
ultralytics>=8.0.147
# protobuf<=3.20.1 # https://github.com/ultralytics/yolov5/issues/8012