Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10214336master
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| import os.path as osp | import os.path as osp | ||||
| import numpy as np | import numpy as np | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .backbones import ViT | from .backbones import ViT | ||||
| from .dense_heads import AnchorNHead, RPNNHead | from .dense_heads import AnchorNHead, RPNNHead | ||||
| from .necks import FPNF | from .necks import FPNF | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .vit import ViT | from .vit import ViT | ||||
| __all__ = ['ViT'] | __all__ = ['ViT'] | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .anchor_head import AnchorNHead | from .anchor_head import AnchorNHead | ||||
| from .rpn_head import RPNNHead | from .rpn_head import RPNNHead | ||||
| @@ -1,5 +1,6 @@ | |||||
| # Copyright (c) OpenMMLab. All rights reserved. | # Copyright (c) OpenMMLab. All rights reserved. | ||||
| # Implementation in this file is modifed from source code avaiable via https://github.com/ViTAE-Transformer/ViTDet | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from mmdet.models.builder import HEADS | from mmdet.models.builder import HEADS | ||||
| from mmdet.models.dense_heads import AnchorHead | from mmdet.models.dense_heads import AnchorHead | ||||
| @@ -1,5 +1,6 @@ | |||||
| # Copyright (c) OpenMMLab. All rights reserved. | # Copyright (c) OpenMMLab. All rights reserved. | ||||
| # Implementation in this file is modifed from source code avaiable via https://github.com/ViTAE-Transformer/ViTDet | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| import copy | import copy | ||||
| import torch | import torch | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .fpn import FPNF | from .fpn import FPNF | ||||
| __all__ = ['FPNF'] | __all__ = ['FPNF'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| # Copyright (c) OpenMMLab. All rights reserved. | # Copyright (c) OpenMMLab. All rights reserved. | ||||
| # Implementation in this file is modifed from source code avaiable via https://github.com/ViTAE-Transformer/ViTDet | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| import torch.nn as nn | import torch.nn as nn | ||||
| import torch.nn.functional as F | import torch.nn.functional as F | ||||
| from mmcv.runner import BaseModule, auto_fp16 | from mmcv.runner import BaseModule, auto_fp16 | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .bbox_heads import (ConvFCBBoxNHead, Shared2FCBBoxNHead, | from .bbox_heads import (ConvFCBBoxNHead, Shared2FCBBoxNHead, | ||||
| Shared4Conv1FCBBoxNHead) | Shared4Conv1FCBBoxNHead) | ||||
| from .mask_heads import FCNMaskNHead | from .mask_heads import FCNMaskNHead | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .convfc_bbox_head import (ConvFCBBoxNHead, Shared2FCBBoxNHead, | from .convfc_bbox_head import (ConvFCBBoxNHead, Shared2FCBBoxNHead, | ||||
| Shared4Conv1FCBBoxNHead) | Shared4Conv1FCBBoxNHead) | ||||
| @@ -1,5 +1,6 @@ | |||||
| # Copyright (c) OpenMMLab. All rights reserved. | # Copyright (c) OpenMMLab. All rights reserved. | ||||
| # Implementation in this file is modifed from source code avaiable via https://github.com/ViTAE-Transformer/ViTDet | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| import torch.nn as nn | import torch.nn as nn | ||||
| from mmdet.models.builder import HEADS | from mmdet.models.builder import HEADS | ||||
| from mmdet.models.roi_heads.bbox_heads.bbox_head import BBoxHead | from mmdet.models.roi_heads.bbox_heads.bbox_head import BBoxHead | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .fcn_mask_head import FCNMaskNHead | from .fcn_mask_head import FCNMaskNHead | ||||
| __all__ = ['FCNMaskNHead'] | __all__ = ['FCNMaskNHead'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| # Copyright (c) OpenMMLab. All rights reserved. | # Copyright (c) OpenMMLab. All rights reserved. | ||||
| # Implementation in this file is modifed from source code avaiable via https://github.com/ViTAE-Transformer/ViTDet | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from warnings import warn | from warnings import warn | ||||
| import numpy as np | import numpy as np | ||||
| @@ -1,3 +1,5 @@ | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from .checkpoint import load_checkpoint | from .checkpoint import load_checkpoint | ||||
| from .convModule_norm import ConvModule_Norm | from .convModule_norm import ConvModule_Norm | ||||
| @@ -1,5 +1,6 @@ | |||||
| # Copyright (c) Open-MMLab. All rights reserved. | # Copyright (c) Open-MMLab. All rights reserved. | ||||
| # Implementation adopted from ViTAE-Transformer, source code avaiable via https://github.com/ViTAE-Transformer/ViTDet | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| import io | import io | ||||
| import os | import os | ||||
| import os.path as osp | import os.path as osp | ||||
| @@ -1,5 +1,5 @@ | |||||
| # Implementation adopted from ViTAE-Transformer, source code avaiable via https://github.com/ViTAE-Transformer/ViTDet | |||||
| # Implementation in this file is modified based on ViTAE-Transformer | |||||
| # Originally Apache 2.0 License and publicly avaialbe at https://github.com/ViTAE-Transformer/ViTDet | |||||
| from mmcv.cnn import ConvModule | from mmcv.cnn import ConvModule | ||||
| @@ -1 +1,3 @@ | |||||
| # The implementation is adopted from U-2-Net, made publicly available under the Apache 2.0 License | |||||
| # source code avaiable via https://github.com/xuebinqin/U-2-Net | |||||
| from .u2net import U2NET | from .u2net import U2NET | ||||
| @@ -1,4 +1,5 @@ | |||||
| # Implementation in this file is modifed from source code avaiable via https://github.com/xuebinqin/U-2-Net | |||||
| # The implementation is adopted from U-2-Net, made publicly available under the Apache 2.0 License | |||||
| # source code avaiable via https://github.com/xuebinqin/U-2-Net | |||||
| import torch | import torch | ||||
| import torch.nn as nn | import torch.nn as nn | ||||
| import torch.nn.functional as F | import torch.nn.functional as F | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| import os.path as osp | import os.path as osp | ||||
| import cv2 | import cv2 | ||||