Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Add warnings of uninstalling mmdet and supplementary documents #624

Merged
merged 3 commits into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
class_in_mmdet = ['FastRCNN', 'MaxIoUAssignerAVA', 'RandomSampler']
if obj_type in class_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