Skip to content

Commit

Permalink
[Improvement] Add warnings of uninstalling mmdet and supplementary do…
Browse files Browse the repository at this point in the history
…cuments (#624)

* update

* remove mmdet bound

* fix bugs
  • Loading branch information
congee524 authored Feb 22, 2021
1 parent c329052 commit 80a9ae1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ The master branch works with **PyTorch 1.3+**.

- For temporal action localization, we implement BSN, BMN, SSN.

- For spatial temporal detection, we implement SlowOnly, SlowFast.

- **Well tested and documented**

We provide detailed documentation and API reference, as well as unittests.
Expand Down
8 changes: 7 additions & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pip install mmcv-full

**Important:** You need to run `pip uninstall mmcv` first if you have mmcv installed. If mmcv and mmcv-full are both installed, there will be `ModuleNotFoundError`.

d. Clone the MMAction2 repository
d. Clone the MMAction2 repository.

```shell
git clone https://github.com/open-mmlab/mmaction2.git
Expand All @@ -133,6 +133,12 @@ If you build MMAction2 on macOS, replace the last command with
CC=clang CXX=clang++ CFLAGS='-stdlib=libc++' pip install -e .
```

f. Install mmdetection for spatial temporal detection tasks.

This part is **optional** if you're not going to do spatial temporal detection.

See [here](https://github.com/open-mmlab/mmdetection#installation) to install mmdetection.

Note:

1. The git commit id will be written to the version number with step d, e.g. 0.6.0+2e7045c. The version will also be saved in trained models.
Expand Down
4 changes: 4 additions & 0 deletions mmaction/models/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def build_model(cfg, train_cfg=None, test_cfg=None):
return build_recognizer(cfg, train_cfg, test_cfg)
if obj_type in DETECTORS:
return build_detector(cfg, train_cfg, test_cfg)
model_in_mmdet = ['FastRCNN']
if obj_type in model_in_mmdet:
raise ImportError(
'Please install mmdet for spatial temporal detection tasks.')
raise ValueError(f'{obj_type} is not registered in '
'LOCALIZERS, RECOGNIZERS or DETECTORS')

Expand Down

0 comments on commit 80a9ae1

Please sign in to comment.