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
ModelZoo
ResNet50_tensorflow
Commits
2ad1ec15
Unverified
Commit
2ad1ec15
authored
Jan 22, 2022
by
srihari-humbarwadi
Browse files
added configs for `SemanticHead` and `InstanceHead`
parent
31a8e466
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
17 deletions
+23
-17
official/vision/beta/projects/panoptic_maskrcnn/configs/panoptic_deeplab.py
...ta/projects/panoptic_maskrcnn/configs/panoptic_deeplab.py
+23
-17
No files found.
official/vision/beta/projects/panoptic_maskrcnn/configs/panoptic_deeplab.py
View file @
2ad1ec15
...
...
@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Panoptic
Mask R-CNN
configuration definition."""
"""Panoptic
Deeplab
configuration definition."""
import
dataclasses
from
typing
import
List
,
Optional
,
Union
from
typing
import
List
,
Tuple
,
Union
from
official.modeling
import
hyperparams
from
official.vision.beta.configs
import
common
from
official.vision.beta.configs
import
backbones
from
official.vision.beta.configs
import
decoders
from
official.vision.beta.configs
import
semantic_segmentation
SEGMENTATION_HEAD
=
semantic_segmentation
.
SegmentationHead
_COCO_INPUT_PATH_BASE
=
'coco/tfrecords'
_COCO_TRAIN_EXAMPLES
=
118287
...
...
@@ -31,17 +28,27 @@ _COCO_VAL_EXAMPLES = 5000
@
dataclasses
.
dataclass
class
InstanceCenterHead
(
semantic_segmentation
.
SegmentationHead
):
"""Instance Center head config."""
# None, deeplabv3plus, panoptic_fpn_fusion,
# panoptic_deeplab_fusion or pyramid_fusion
class
PanopticDeeplabHead
(
hyperparams
.
Config
):
"""Panoptic Deeplab head config."""
level
:
int
=
3
num_convs
:
int
=
2
num_filters
:
int
=
256
kernel_size
:
int
=
5
feature_fusion
:
Optional
[
str
]
=
None
low_level
:
Union
[
int
,
List
[
int
]]
=
dataclasses
.
field
(
default_factory
=
lambda
:
[
3
,
2
]
)
low_level_num_filters
:
Union
[
int
,
List
[
int
]]
=
dataclasses
.
field
(
default_factory
=
lambda
:
[
64
,
32
])
use_depthwise_convolution
:
bool
=
False
upsample_factor
:
int
=
1
low_level
:
Union
[
List
[
int
],
Tuple
[
int
]]
=
(
3
,
2
)
low_level_num_filters
:
Union
[
List
[
int
]
,
Tuple
[
int
]]
=
(
64
,
32
)
@
dataclasses
.
dataclass
class
SemanticHead
(
PanopticDeeplabHead
):
"""Semantic head config."""
prediction_kernel_size
:
int
=
1
@
dataclasses
.
dataclass
class
InstanceHead
(
PanopticDeeplabHead
):
"""Instance head config."""
prediction_kernel_size
:
int
=
1
# pytype: disable=wrong-keyword-args
@
dataclasses
.
dataclass
...
...
@@ -55,7 +62,6 @@ class PanopticDeeplab(hyperparams.Config):
backbone
:
backbones
.
Backbone
=
backbones
.
Backbone
(
type
=
'resnet'
,
resnet
=
backbones
.
ResNet
())
decoder
:
decoders
.
Decoder
=
decoders
.
Decoder
(
type
=
'aspp'
)
semantic_head
:
SEGMENTATION_HEAD
=
SEGMENTATION_HEAD
()
instance_head
:
InstanceCenterHead
=
InstanceCenterHead
(
low_level
=
[
3
,
2
])
semantic_head
:
SemanticHead
=
SemanticHead
()
instance_head
:
InstanceHead
=
InstanceHead
()
shared_decoder
:
bool
=
False
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