parent
f87c05308b
commit
b732fae265
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://gitlab.com/pycqa/flake8.git
|
- repo: https://gitlab.com/pycqa/flake8.git
|
||||||
rev: 3.8.3
|
rev: 5.0.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
|
@ -8,11 +8,11 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
- repo: https://github.com/pre-commit/mirrors-yapf
|
- repo: https://github.com/pre-commit/mirrors-yapf
|
||||||
rev: v0.30.0
|
rev: v0.32.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: yapf
|
- id: yapf
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.1.0
|
rev: v4.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
|
@ -34,7 +34,7 @@ repos:
|
||||||
- mdformat_frontmatter
|
- mdformat_frontmatter
|
||||||
- linkify-it-py
|
- linkify-it-py
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: v2.1.0
|
rev: v2.2.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
- repo: https://github.com/myint/docformatter
|
- repo: https://github.com/myint/docformatter
|
||||||
|
@ -53,7 +53,7 @@ repos:
|
||||||
files: ^configs/.*\.md$
|
files: ^configs/.*\.md$
|
||||||
require_serial: true
|
require_serial: true
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.32.1
|
rev: v3.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: ["--py36-plus"]
|
args: ["--py36-plus"]
|
||||||
|
|
|
@ -43,7 +43,7 @@ We recommend that users follow our best practices to install MMSegmentation. How
|
||||||
```shell
|
```shell
|
||||||
pip install -U openmim
|
pip install -U openmim
|
||||||
mim install 'mmcv>=2.0.0rc1'
|
mim install 'mmcv>=2.0.0rc1'
|
||||||
mim install mmmenigne
|
mim install mmenigne
|
||||||
```
|
```
|
||||||
|
|
||||||
**Step 1.** Install MMSegmentation.
|
**Step 1.** Install MMSegmentation.
|
||||||
|
|
|
@ -95,7 +95,7 @@ wget https://user-images.githubusercontent.com/24582831/189833109-eddad58f-f777-
|
||||||
wget https://user-images.githubusercontent.com/24582831/189833143-15f60f8a-4d1e-4cbb-a6e7-5e2233869fac.png --output-document aachen_000000_000019_gtFine_labelTrainIds.png
|
wget https://user-images.githubusercontent.com/24582831/189833143-15f60f8a-4d1e-4cbb-a6e7-5e2233869fac.png --output-document aachen_000000_000019_gtFine_labelTrainIds.png
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can find their local path and use the scrips below to visualize:
|
Then you can find their local path and use the scripts below to visualize:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import mmcv
|
import mmcv
|
||||||
|
|
|
@ -335,7 +335,7 @@ class VisionTransformer(BaseModule):
|
||||||
constant_init(m, val=1.0, bias=0.)
|
constant_init(m, val=1.0, bias=0.)
|
||||||
|
|
||||||
def _pos_embeding(self, patched_img, hw_shape, pos_embed):
|
def _pos_embeding(self, patched_img, hw_shape, pos_embed):
|
||||||
"""Positiong embeding method.
|
"""Positioning embeding method.
|
||||||
|
|
||||||
Resize the pos_embed, if the input image size doesn't match
|
Resize the pos_embed, if the input image size doesn't match
|
||||||
the training size.
|
the training size.
|
||||||
|
|
|
@ -78,7 +78,7 @@ def sigmoid_focal_loss(pred,
|
||||||
valid_mask=None,
|
valid_mask=None,
|
||||||
reduction='mean',
|
reduction='mean',
|
||||||
avg_factor=None):
|
avg_factor=None):
|
||||||
r"""A warpper of cuda version `Focal Loss
|
r"""A wrapper of cuda version `Focal Loss
|
||||||
<https://arxiv.org/abs/1708.02002>`_.
|
<https://arxiv.org/abs/1708.02002>`_.
|
||||||
Args:
|
Args:
|
||||||
pred (torch.Tensor): The prediction with shape (N, C), C is the number
|
pred (torch.Tensor): The prediction with shape (N, C), C is the number
|
||||||
|
|
Loading…
Reference in New Issue