diff --git a/mmaction/models/builder.py b/mmaction/models/builder.py index df95a94d40..f7316bd69a 100644 --- a/mmaction/models/builder.py +++ b/mmaction/models/builder.py @@ -13,7 +13,7 @@ # Define an empty registry and building func, so that can import DETECTORS = Registry('detector') - def bulid_detector(cfg, train_cfg, test_cfg): + def build_detector(cfg, train_cfg, test_cfg): pass diff --git a/mmaction/models/heads/roi_head.py b/mmaction/models/heads/roi_head.py index f94aa85a6a..45a36df528 100644 --- a/mmaction/models/heads/roi_head.py +++ b/mmaction/models/heads/roi_head.py @@ -85,5 +85,5 @@ def simple_test_bboxes(self, return det_bboxes, det_labels else: # Just define an empty class, so that __init__ can import it. - class AVARoIHead(StandardRoIHead): + class AVARoIHead: pass diff --git a/mmaction/models/roi_extractors/single_straight3d.py b/mmaction/models/roi_extractors/single_straight3d.py index 09d40b1dcf..aafceeaf1d 100644 --- a/mmaction/models/roi_extractors/single_straight3d.py +++ b/mmaction/models/roi_extractors/single_straight3d.py @@ -2,7 +2,11 @@ import torch import torch.nn as nn -from mmcv.ops import RoIAlign, RoIPool + +try: + from mmcv.ops import RoIAlign, RoIPool +except (ImportError, ModuleNotFoundError): + warnings.warn('Please install mmcv-full to use RoIAlign and RoIPool') try: import mmdet # noqa