Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yaoyuping
nnDetection
Commits
27bc75b1
Commit
27bc75b1
authored
May 13, 2021
by
mibaumgartner
Browse files
rename utils to ops
parent
4655684b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
13 additions
and
13 deletions
+13
-13
nndet/conf/train/smoke.yaml
nndet/conf/train/smoke.yaml
+2
-2
nndet/core/boxes/__init__.py
nndet/core/boxes/__init__.py
+2
-2
nndet/core/boxes/matcher.py
nndet/core/boxes/matcher.py
+1
-1
nndet/core/boxes/nms.py
nndet/core/boxes/nms.py
+1
-1
nndet/core/boxes/ops.py
nndet/core/boxes/ops.py
+0
-0
nndet/core/boxes/ops_np.py
nndet/core/boxes/ops_np.py
+3
-3
nndet/inference/restore.py
nndet/inference/restore.py
+1
-1
nndet/io/datamodule/bg_loader.py
nndet/io/datamodule/bg_loader.py
+1
-1
nndet/losses/regression.py
nndet/losses/regression.py
+1
-1
nndet/ptmodule/retinaunet/base.py
nndet/ptmodule/retinaunet/base.py
+1
-1
No files found.
nndet/conf/train/smoke.yaml
View file @
27bc75b1
...
...
@@ -2,8 +2,8 @@
defaults
:
-
augmentation
:
base_more
module
:
"
RetinaUNet
C010"
predictor
:
"
BoxPredictorSelective
"
module
:
RetinaUNet
V001
predictor
:
BoxPredictorSelective
plan
:
D3V001_3d
planners
:
...
...
nndet/core/boxes/__init__.py
View file @
27bc75b1
...
...
@@ -16,6 +16,6 @@ from nndet.core.boxes.matcher import MatcherType, Matcher, IoUMatcher, ATSSMatch
from
nndet.core.boxes.nms
import
nms
,
batched_nms
from
nndet.core.boxes.sampler
import
AbstractSampler
,
NegativeSampler
,
HardNegativeSampler
,
\
BalancedHardNegativeSampler
,
HardNegativeSamplerFgAll
,
HardNegativeSamplerBatched
from
nndet.core.boxes.
util
s
import
box_area
,
box_iou
,
remove_small_boxes
,
box_center
,
permute_boxes
,
\
from
nndet.core.boxes.
op
s
import
box_area
,
box_iou
,
remove_small_boxes
,
box_center
,
permute_boxes
,
\
expand_to_boxes
,
box_size
,
generalized_box_iou
,
box_center_dist
,
center_in_boxes
from
nndet.core.boxes.
util
s_np
import
box_iou_np
,
box_size_np
,
box_area_np
from
nndet.core.boxes.
op
s_np
import
box_iou_np
,
box_size_np
,
box_area_np
nndet/core/boxes/matcher.py
View file @
27bc75b1
...
...
@@ -5,7 +5,7 @@ import torch
from
torch
import
Tensor
from
loguru
import
logger
from
nndet.core.boxes.
util
s
import
box_iou
,
box_center_dist
,
center_in_boxes
from
nndet.core.boxes.
op
s
import
box_iou
,
box_center_dist
,
center_in_boxes
INF
=
100
# not really inv but here it is sufficient
...
...
nndet/core/boxes/nms.py
View file @
27bc75b1
...
...
@@ -20,7 +20,7 @@ from torch.cuda.amp import autocast
from
torchvision.ops.boxes
import
nms
as
nms_2d
from
nndet._C
import
nms
as
nms_gpu
from
nndet.core.boxes.
util
s
import
box_iou
from
nndet.core.boxes.
op
s
import
box_iou
def
nms_cpu
(
boxes
,
scores
,
thresh
):
...
...
nndet/core/boxes/
util
s.py
→
nndet/core/boxes/
op
s.py
View file @
27bc75b1
File moved
nndet/core/boxes/
util
s_np.py
→
nndet/core/boxes/
op
s_np.py
View file @
27bc75b1
...
...
@@ -21,7 +21,7 @@ from numpy import ndarray
def
box_area_np
(
boxes
:
ndarray
)
->
ndarray
:
"""
See Also:
:func:`nndet.core.boxes.
util
s.box_area`
:func:`nndet.core.boxes.
op
s.box_area`
"""
if
boxes
.
shape
[
-
1
]
==
4
:
return
box_area_2d_np
(
boxes
)
...
...
@@ -32,7 +32,7 @@ def box_area_np(boxes: ndarray) -> ndarray:
def
box_area_3d_np
(
boxes
:
np
.
ndarray
)
->
np
.
ndarray
:
"""
See Also:
`nndet.core.boxes.
util
s.box_area_3d`
`nndet.core.boxes.
op
s.box_area_3d`
"""
return
(
boxes
[:,
2
]
-
boxes
[:,
0
])
*
(
boxes
[:,
3
]
-
boxes
[:,
1
])
*
(
boxes
[:,
5
]
-
boxes
[:,
4
])
...
...
@@ -40,7 +40,7 @@ def box_area_3d_np(boxes: np.ndarray) -> np.ndarray:
def
box_area_2d_np
(
boxes
:
np
.
ndarray
)
->
np
.
ndarray
:
"""
See Also:
`nndet.core.boxes.
util
s.box_area_2d`
`nndet.core.boxes.
op
s.box_area_2d`
"""
return
(
boxes
[:,
2
]
-
boxes
[:,
0
])
*
(
boxes
[:,
3
]
-
boxes
[:,
1
])
...
...
nndet/inference/restore.py
View file @
27bc75b1
...
...
@@ -19,7 +19,7 @@ from typing import Sequence, Tuple, Union, Optional
import
numpy
as
np
from
loguru
import
logger
from
nndet.core.boxes.
util
s
import
permute_boxes
,
expand_to_boxes
from
nndet.core.boxes.
op
s
import
permute_boxes
,
expand_to_boxes
from
nndet.preprocessing.resampling
import
resample_data_or_seg
,
get_do_separate_z
,
get_lowres_axis
...
...
nndet/io/datamodule/bg_loader.py
View file @
27bc75b1
...
...
@@ -27,7 +27,7 @@ from nndet.io.datamodule import DATALOADER_REGISTRY
from
nndet.io.load
import
load_pickle
from
nndet.inference.patching
import
save_get_crop
from
nndet.utils.info
import
maybe_verbose_iterable
from
nndet.core.boxes.
util
s_np
import
box_size_np
from
nndet.core.boxes.
op
s_np
import
box_size_np
class
FixedSlimDataLoaderBase
(
SlimDataLoaderBase
):
...
...
nndet/losses/regression.py
View file @
27bc75b1
...
...
@@ -5,7 +5,7 @@ import torch
__all__
=
[
"SmoothL1Loss"
,
"smooth_l1_loss"
]
from
nndet.core.boxes.
util
s
import
generalized_box_iou
from
nndet.core.boxes.
op
s
import
generalized_box_iou
from
nndet.losses.base
import
reduction_helper
...
...
nndet/ptmodule/retinaunet/base.py
View file @
27bc75b1
...
...
@@ -37,7 +37,7 @@ from nndet.core.boxes.matcher import IoUMatcher
from
nndet.core.boxes.sampler
import
HardNegativeSamplerBatched
from
nndet.core.boxes.coder
import
CoderType
,
BoxCoderND
from
nndet.core.boxes.anchors
import
get_anchor_generator
from
nndet.core.boxes.
util
s
import
box_iou
from
nndet.core.boxes.
op
s
import
box_iou
from
nndet.ptmodule.base_module
import
LightningBaseModuleSWA
,
LightningBaseModule
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment