Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion monai/apps/auto3dseg/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from monai.apps.auto3dseg.auto_runner import AutoRunner
from monai.apps.auto3dseg.bundle_gen import BundleAlgo, BundleGen
from monai.apps.auto3dseg.data_analyzer import DataAnalyzer
Expand Down
1 change: 0 additions & 1 deletion monai/apps/auto3dseg/ensemble_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import json
import os
from abc import ABC, abstractmethod
Expand Down
1 change: 0 additions & 1 deletion monai/apps/deepedit/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

logger = logging.getLogger(__name__)


distance_transform_cdt, _ = optional_import("scipy.ndimage.morphology", name="distance_transform_cdt")


Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/metrics/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
# The views and conclusions contained in the software and documentation are those
# of the authors and should not be interpreted as representing official policies,
# either expressed or implied, of the FreeBSD Project.

"""
This script is almost same with https://github.com/MIC-DKFZ/nnDetection/blob/main/nndet/evaluator/detection/coco.py
The changes include 1) code reformatting, 2) docstrings.
Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/metrics/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
# The views and conclusions contained in the software and documentation are those
# of the authors and should not be interpreted as representing official policies,
# either expressed or implied, of the FreeBSD Project.

"""
This script is almost same with https://github.com/MIC-DKFZ/nnDetection/blob/main/nndet/evaluator/detection/matching.py
The changes include 1) code reformatting, 2) docstrings,
Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/networks/retinanet_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.

"""
Part of this script is adapted from
https://github.com/pytorch/vision/blob/main/torchvision/models/detection/retinanet.py
Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/networks/retinanet_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.

"""
Part of this script is adapted from
https://github.com/pytorch/vision/blob/main/torchvision/models/detection/retinanet.py
Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/utils/ATSS_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""
The functions in this script are adapted from nnDetection,
https://github.com/MIC-DKFZ/nnDetection/blob/main/nndet/core/boxes/matcher.py
Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/utils/anchor_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.

"""
This script is adapted from
https://github.com/pytorch/vision/blob/release/0.12/torchvision/models/detection/anchor_utils.py
Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/utils/box_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""
This script is modified from torchvision to support N-D images,

Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/utils/box_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.

"""
Part of this script is adapted from
https://github.com/pytorch/vision/blob/main/torchvision/models/detection/retinanet.py
Expand Down
1 change: 0 additions & 1 deletion monai/apps/detection/utils/hard_negative_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
The functions in this script are adapted from nnDetection,
https://github.com/MIC-DKFZ/nnDetection/blob/main/nndet/core/boxes/sampler.py
Expand Down
1 change: 0 additions & 1 deletion monai/apps/mmars/mmars.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Utilities for accessing Nvidia MMARs

Expand Down
1 change: 0 additions & 1 deletion monai/apps/mmars/model_desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Collection of the remote MMAR descriptors
Expand Down
1 change: 0 additions & 1 deletion monai/apps/reconstruction/transforms/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from abc import abstractmethod
from typing import Sequence

Expand Down
1 change: 0 additions & 1 deletion monai/apps/reconstruction/transforms/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import Dict, Hashable, Mapping, Optional, Sequence

import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions monai/apps/tcia/label_desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import Dict

__all__ = ["TCIA_LABEL_DICT"]


TCIA_LABEL_DICT: Dict[str, Dict[str, int]] = {
"C4KC-KiTS": {"Kidney": 0, "Renal Tumor": 1},
"NSCLC-Radiomics": {
Expand Down
1 change: 0 additions & 1 deletion monai/bundle/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from monai.bundle.scripts import ckpt_export, download, init_bundle, run, verify_metadata, verify_net_in_out

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions monai/bundle/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@

__all__ = ["ID_REF_KEY", "ID_SEP_KEY", "EXPR_KEY", "MACRO_KEY"]


ID_REF_KEY = "@" # start of a reference to a ConfigItem
ID_SEP_KEY = "#" # separator for the ID of a ConfigItem
EXPR_KEY = "$" # start of a ConfigExpression
MACRO_KEY = "%" # start of a macro of a config


_conf_values = get_config_values()

DEFAULT_METADATA = {
Expand Down
1 change: 0 additions & 1 deletion monai/config/type_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"SequenceStr",
]


#: KeysCollection
#
# The KeyCollection type is used to for defining variables
Expand Down
2 changes: 0 additions & 2 deletions monai/data/box_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
This utility module mainly supports rectangular bounding boxes with a few
different parameterizations and methods for converting between them. It
Expand Down Expand Up @@ -36,7 +35,6 @@
# We support 2-D or 3-D bounding boxes
SUPPORTED_SPATIAL_DIMS = [2, 3]


# TO_REMOVE = 0.0 if the bottom-right corner pixel/voxel is not included in the boxes,
# i.e., when xmin=1., xmax=2., we have w = 1.
# TO_REMOVE = 1.0 if the bottom-right corner pixel/voxel is included in the boxes,
Expand Down
1 change: 0 additions & 1 deletion monai/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import collections.abc
import math
import pickle
Expand Down
1 change: 0 additions & 1 deletion monai/data/image_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
nib, _ = optional_import("nibabel")
PILImage, _ = optional_import("PIL.Image")


__all__ = [
"ImageWriter",
"ITKWriter",
Expand Down
1 change: 0 additions & 1 deletion monai/data/thread_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from multiprocessing.context import SpawnContext
from queue import Empty, Full, Queue
from threading import Thread
Expand Down
1 change: 0 additions & 1 deletion monai/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
DataFrame, _ = optional_import("pandas", name="DataFrame")
nib, _ = optional_import("nibabel")


__all__ = [
"AFFINE_TOL",
"SUPPORTED_PICKLE_MOD",
Expand Down
1 change: 0 additions & 1 deletion monai/handlers/logfile_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
else:
Engine, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Engine")


__all__ = ["LogfileHandler"]


Expand Down
1 change: 0 additions & 1 deletion monai/handlers/nvtx_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
Engine, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Engine")
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")


__all__ = ["RangeHandler", "RangePushHandler", "RangePopHandler", "MarkHandler"]


Expand Down
1 change: 0 additions & 1 deletion monai/losses/contrastive.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class ContrastiveLoss(_Loss):

"""
Compute the Contrastive loss defined in:

Expand Down
1 change: 0 additions & 1 deletion monai/losses/giou_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class BoxGIoULoss(_Loss):

"""
Compute the generalized intersection over union (GIoU) loss of a pair of boxes.
The two inputs should have the same shape. giou_loss = 1.0 - giou
Expand Down
1 change: 0 additions & 1 deletion monai/losses/ssim_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import torch
import torch.nn.functional as F
from torch import nn
Expand Down
1 change: 0 additions & 1 deletion monai/losses/tversky.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class TverskyLoss(_Loss):

"""
Compute the Tversky loss defined in:

Expand Down
1 change: 0 additions & 1 deletion monai/metrics/froc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import List, Optional, Tuple, Union

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion monai/networks/blocks/backbone_fpn_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""
This script is modified from from torchvision to support N-D images,
by overriding the definition of convolutional layers and pooling layers.
Expand Down
1 change: 0 additions & 1 deletion monai/networks/blocks/dints_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import Tuple, Union

import torch
Expand Down
1 change: 0 additions & 1 deletion monai/networks/blocks/feature_pyramid_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""
This script is modified from from torchvision to support N-D images,
by overriding the definition of convolutional layers and pooling layers.
Expand Down
1 change: 0 additions & 1 deletion monai/networks/blocks/unetr_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import Sequence, Tuple, Union

import torch
Expand Down
2 changes: 0 additions & 2 deletions monai/networks/layers/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Defines factories for creating layers in generic, extensible, and dimensionally independent ways. A separate factory
object is created for each type of layer, and factory functions keyed to names are added to these objects. Whenever
Expand Down Expand Up @@ -70,7 +69,6 @@ def use_factory(fact_args):

InstanceNorm3dNVFuser, has_nvfuser = optional_import("apex.normalization", name="InstanceNorm3dNVFuser")


__all__ = ["LayerFactory", "Dropout", "Norm", "Act", "Conv", "Pool", "Pad", "split_args"]


Expand Down
1 change: 0 additions & 1 deletion monai/networks/nets/dints.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import warnings
from typing import List, Optional, Tuple, Union

Expand Down
1 change: 0 additions & 1 deletion monai/networks/nets/dynunet.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import List, Optional, Sequence, Tuple, Union

import torch
Expand Down
1 change: 0 additions & 1 deletion monai/networks/nets/senet.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"SE_NET_MODELS",
]


SE_NET_MODELS = {
"senet154": "http://data.lip6.fr/cadene/pretrainedmodels/senet154-c7b49a05.pth",
"se_resnet50": "http://data.lip6.fr/cadene/pretrainedmodels/se_resnet50-ce0d4300.pth",
Expand Down
1 change: 0 additions & 1 deletion monai/networks/nets/torchvision_fc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

models, _ = optional_import("torchvision.models")


__all__ = ["TorchVisionFCModel"]


Expand Down
1 change: 0 additions & 1 deletion monai/networks/nets/vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import Sequence, Union

import torch
Expand Down
1 change: 0 additions & 1 deletion monai/networks/nets/vitautoenc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from typing import Sequence, Union

import torch
Expand Down
1 change: 0 additions & 1 deletion monai/transforms/adaptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
How to use the adaptor function
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
1 change: 0 additions & 1 deletion monai/transforms/signal/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
central_frequency, has_central_frequency = optional_import("pywt", name="central_frequency")
cwt, has_cwt = optional_import("pywt", name="cwt")


__all__ = [
"SignalRandDrop",
"SignalRandScale",
Expand Down
1 change: 0 additions & 1 deletion monai/transforms/smooth_field/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Transforms using a smooth spatial field generated by interpolating from smaller randomized fields."""

from typing import Any, Optional, Sequence, Union
Expand Down
Loading