Skip to content

Commit 34efe84

Browse files
authored
[MOT] remove cython_bbox (#3064)
* remove cython_bbox, test=document_fix * add cython_bbox install log, test=document_fix
1 parent f29d636 commit 34efe84

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ppdet/modeling/mot/matching/jde_matching.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
from scipy.spatial.distance import cdist
2222
from ..motion import kalman_filter
2323

24+
from ppdet.utils.logger import setup_logger
25+
logger = setup_logger(__name__)
26+
2427
__all__ = [
2528
'merge_matches',
2629
'linear_assignment',
@@ -70,7 +73,13 @@ def cython_bbox_ious(atlbrs, btlbrs):
7073
ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float)
7174
if ious.size == 0:
7275
return ious
73-
import cython_bbox
76+
try:
77+
import cython_bbox
78+
except Exception as e:
79+
logger.error('cython_bbox not found, please install cython_bbox.'
80+
'for example: `pip install cython_bbox`.')
81+
raise e
82+
7483
ious = cython_bbox.bbox_overlaps(
7584
np.ascontiguousarray(
7685
atlbrs, dtype=np.float),

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ pycocotools
1212
setuptools>=42.0.0
1313
lap
1414
sklearn
15-
cython_bbox
1615
motmetrics
17-
openpyxl
16+
openpyxl

0 commit comments

Comments
 (0)