Skip to content

Commit

Permalink
fix bug when users do not install mmdet (open-mmlab#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerlin authored Dec 19, 2020
1 parent 4df447b commit da2ddf1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mmaction/models/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion mmaction/models/heads/roi_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion mmaction/models/roi_extractors/single_straight3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da2ddf1

Please sign in to comment.