diff --git a/paddlers/custom_models/__init__.py b/paddlers/custom_models/__init__.py new file mode 100644 index 0000000..ea0abdf --- /dev/null +++ b/paddlers/custom_models/__init__.py @@ -0,0 +1,15 @@ +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +from . import cls, det, seg, gan, cd \ No newline at end of file diff --git a/paddlers/models/cd/__init__.py b/paddlers/custom_models/cd/__init__.py similarity index 100% rename from paddlers/models/cd/__init__.py rename to paddlers/custom_models/cd/__init__.py diff --git a/paddlers/models/cd/models/__init__.py b/paddlers/custom_models/cd/models/__init__.py similarity index 100% rename from paddlers/models/cd/models/__init__.py rename to paddlers/custom_models/cd/models/__init__.py diff --git a/paddlers/models/cd/models/backbones/__init__.py b/paddlers/custom_models/cd/models/backbones/__init__.py similarity index 100% rename from paddlers/models/cd/models/backbones/__init__.py rename to paddlers/custom_models/cd/models/backbones/__init__.py diff --git a/paddlers/models/cd/models/backbones/resnet.py b/paddlers/custom_models/cd/models/backbones/resnet.py similarity index 100% rename from paddlers/models/cd/models/backbones/resnet.py rename to paddlers/custom_models/cd/models/backbones/resnet.py diff --git a/paddlers/models/cd/models/bit.py b/paddlers/custom_models/cd/models/bit.py similarity index 100% rename from paddlers/models/cd/models/bit.py rename to paddlers/custom_models/cd/models/bit.py diff --git a/paddlers/models/cd/models/cdnet.py b/paddlers/custom_models/cd/models/cdnet.py similarity index 100% rename from paddlers/models/cd/models/cdnet.py rename to paddlers/custom_models/cd/models/cdnet.py diff --git a/paddlers/models/cd/models/dsamnet.py b/paddlers/custom_models/cd/models/dsamnet.py similarity index 100% rename from paddlers/models/cd/models/dsamnet.py rename to paddlers/custom_models/cd/models/dsamnet.py diff --git a/paddlers/models/cd/models/dsifn.py b/paddlers/custom_models/cd/models/dsifn.py similarity index 100% rename from paddlers/models/cd/models/dsifn.py rename to paddlers/custom_models/cd/models/dsifn.py diff --git a/paddlers/models/cd/models/layers/__init__.py b/paddlers/custom_models/cd/models/layers/__init__.py similarity index 100% rename from paddlers/models/cd/models/layers/__init__.py rename to paddlers/custom_models/cd/models/layers/__init__.py diff --git a/paddlers/models/cd/models/layers/attention.py b/paddlers/custom_models/cd/models/layers/attention.py similarity index 100% rename from paddlers/models/cd/models/layers/attention.py rename to paddlers/custom_models/cd/models/layers/attention.py diff --git a/paddlers/models/cd/models/layers/blocks.py b/paddlers/custom_models/cd/models/layers/blocks.py similarity index 100% rename from paddlers/models/cd/models/layers/blocks.py rename to paddlers/custom_models/cd/models/layers/blocks.py diff --git a/paddlers/models/cd/models/param_init.py b/paddlers/custom_models/cd/models/param_init.py similarity index 94% rename from paddlers/models/cd/models/param_init.py rename to paddlers/custom_models/cd/models/param_init.py index 5e578f0..59d0071 100644 --- a/paddlers/models/cd/models/param_init.py +++ b/paddlers/custom_models/cd/models/param_init.py @@ -67,7 +67,7 @@ class KaimingInitMixin: Examples: - from paddlers.models.cd.models.param_init import KaimingInitMixin + from paddlers.custom_models.cd.models.param_init import KaimingInitMixin class CustomNet(nn.Layer, KaimingInitMixin): def __init__(self, num_channels, num_classes): diff --git a/paddlers/models/cd/models/snunet.py b/paddlers/custom_models/cd/models/snunet.py similarity index 100% rename from paddlers/models/cd/models/snunet.py rename to paddlers/custom_models/cd/models/snunet.py diff --git a/paddlers/models/cd/models/stanet.py b/paddlers/custom_models/cd/models/stanet.py similarity index 100% rename from paddlers/models/cd/models/stanet.py rename to paddlers/custom_models/cd/models/stanet.py diff --git a/paddlers/models/cd/models/unet_ef.py b/paddlers/custom_models/cd/models/unet_ef.py similarity index 100% rename from paddlers/models/cd/models/unet_ef.py rename to paddlers/custom_models/cd/models/unet_ef.py diff --git a/paddlers/models/cd/models/unet_siamconc.py b/paddlers/custom_models/cd/models/unet_siamconc.py similarity index 100% rename from paddlers/models/cd/models/unet_siamconc.py rename to paddlers/custom_models/cd/models/unet_siamconc.py diff --git a/paddlers/models/cd/models/unet_siamdiff.py b/paddlers/custom_models/cd/models/unet_siamdiff.py similarity index 100% rename from paddlers/models/cd/models/unet_siamdiff.py rename to paddlers/custom_models/cd/models/unet_siamdiff.py diff --git a/paddlers/models/cls/__init__.py b/paddlers/custom_models/cls/__init__.py similarity index 100% rename from paddlers/models/cls/__init__.py rename to paddlers/custom_models/cls/__init__.py diff --git a/paddlers/models/det/__init__.py b/paddlers/custom_models/det/__init__.py similarity index 100% rename from paddlers/models/det/__init__.py rename to paddlers/custom_models/det/__init__.py diff --git a/paddlers/models/gan/__init__.py b/paddlers/custom_models/gan/__init__.py similarity index 100% rename from paddlers/models/gan/__init__.py rename to paddlers/custom_models/gan/__init__.py diff --git a/paddlers/models/seg/__init__.py b/paddlers/custom_models/seg/__init__.py similarity index 100% rename from paddlers/models/seg/__init__.py rename to paddlers/custom_models/seg/__init__.py diff --git a/paddlers/models/seg/models/__init__.py b/paddlers/custom_models/seg/models/__init__.py similarity index 100% rename from paddlers/models/seg/models/__init__.py rename to paddlers/custom_models/seg/models/__init__.py diff --git a/paddlers/models/seg/models/farseg/__init__.py b/paddlers/custom_models/seg/models/farseg/__init__.py similarity index 100% rename from paddlers/models/seg/models/farseg/__init__.py rename to paddlers/custom_models/seg/models/farseg/__init__.py diff --git a/paddlers/models/seg/models/farseg/farseg.py b/paddlers/custom_models/seg/models/farseg/farseg.py similarity index 100% rename from paddlers/models/seg/models/farseg/farseg.py rename to paddlers/custom_models/seg/models/farseg/farseg.py diff --git a/paddlers/models/seg/models/farseg/fpn.py b/paddlers/custom_models/seg/models/farseg/fpn.py similarity index 100% rename from paddlers/models/seg/models/farseg/fpn.py rename to paddlers/custom_models/seg/models/farseg/fpn.py diff --git a/paddlers/models/seg/models/utils/__init__.py b/paddlers/custom_models/seg/models/utils/__init__.py similarity index 100% rename from paddlers/models/seg/models/utils/__init__.py rename to paddlers/custom_models/seg/models/utils/__init__.py diff --git a/paddlers/models/seg/models/utils/layers_lib.py b/paddlers/custom_models/seg/models/utils/layers_lib.py similarity index 100% rename from paddlers/models/seg/models/utils/layers_lib.py rename to paddlers/custom_models/seg/models/utils/layers_lib.py diff --git a/paddlers/models/seg/models/utils/param_init.py b/paddlers/custom_models/seg/models/utils/param_init.py similarity index 100% rename from paddlers/models/seg/models/utils/param_init.py rename to paddlers/custom_models/seg/models/utils/param_init.py diff --git a/paddlers/models/seg/models/utils/torch_nn.py b/paddlers/custom_models/seg/models/utils/torch_nn.py similarity index 100% rename from paddlers/models/seg/models/utils/torch_nn.py rename to paddlers/custom_models/seg/models/utils/torch_nn.py diff --git a/paddlers/models/__init__.py b/paddlers/models/__init__.py index 8295670..9ddd097 100644 --- a/paddlers/models/__init__.py +++ b/paddlers/models/__init__.py @@ -12,5 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -from . import ppcls, ppdet, ppseg, ppgan -from . import cls, det, seg, gan, cd \ No newline at end of file +from . import ppcls, ppdet, ppseg, ppgan \ No newline at end of file diff --git a/paddlers/tasks/changedetector.py b/paddlers/tasks/changedetector.py index d01390c..f4ccdc7 100644 --- a/paddlers/tasks/changedetector.py +++ b/paddlers/tasks/changedetector.py @@ -29,7 +29,7 @@ from .base import BaseModel from .utils import seg_metrics as metrics from paddlers.utils.checkpoint import seg_pretrain_weights_dict from paddlers.transforms import ImgDecoder, Resize -import paddlers.models.cd as cd +import paddlers.custom_models.cd as cd __all__ = ["CDNet", "UNetEarlyFusion", "UNetSiamConc", "UNetSiamDiff", "STANet", "BIT", "SNUNet", "DSIFN", "DSAMNet"] diff --git a/paddlers/tasks/segmenter.py b/paddlers/tasks/segmenter.py index 9f273f6..2c99446 100644 --- a/paddlers/tasks/segmenter.py +++ b/paddlers/tasks/segmenter.py @@ -21,7 +21,7 @@ import paddle import paddle.nn.functional as F from paddle.static import InputSpec import paddlers.models.ppseg as paddleseg -import paddlers.models.seg as seg +import paddlers.custom_models.seg as seg import paddlers from paddlers.transforms import arrange_transforms from paddlers.utils import get_single_card_bs, DisablePrint