d137cd2ce97b55466d27908639ec4a1229bd5d99,chainer_/chainercv2/models/simplepose_coco.py,SimplePose,__init__,#SimplePose#Any#Any#Any#Any#Any#Any#Any#,114

Before Change


        self.in_size = in_size
        self.keypoints = keypoints
        self.return_heatmap = return_heatmap
        self.out_size = (in_size[0] // 4, in_size[1] // 4)

        with self.init_scope():
            self.backbone = backbone

            in_channels = backbone_out_channels
            self.decoder = SimpleSequential()
            with self.decoder.init_scope():
                for i, out_channels in enumerate(channels):
                    setattr(self.decoder, "unit{}".format(i + 1), DeconvBlock(
                        in_channels=in_channels,
                        out_channels=out_channels,
                        ksize=4,
                        stride=2,
                        pad=1))
                    in_channels = out_channels

            self.final_block = conv1x1(
                in_channels=in_channels,
                out_channels=keypoints,
                use_bias=True)

    def __call__(self, x):
        x = self.backbone(x)
        x = self.decoder(x)

After Change


    keypoints : int, default 17
        Number of keypoints.
    
    def __init__(self,
                 backbone,
                 backbone_out_channels,
                 channels,
                 return_heatmap=False,
                 in_channels=3,
                 in_size=(256, 192),
                 keypoints=17,
                 **kwargs):
        super(SimplePose, self).__init__(**kwargs)
        assert (in_channels == 3)
        self.in_size = in_size
        self.keypoints = keypoints
        self.return_heatmap = return_heatmap

        with self.init_scope():
            self.backbone = backbone

            in_channels = backbone_out_channels
            self.decoder = SimpleSequential()
            with self.decoder.init_scope():
                for i, out_channels in enumerate(channels):
                    setattr(self.decoder, "unit{}".format(i + 1), DeconvBlock(
                        in_channels=in_channels,
                        out_channels=out_channels,
                        ksize=4,
                        stride=2,
                        pad=1))
                    in_channels = out_channels
                setattr(self.decoder, "final_block", conv1x1(
                    in_channels=in_channels,
                    out_channels=keypoints,
                    use_bias=True))

            self.heatmap_max_det = HeatmapMaxDetBlock()

    def __call__(self, x):
        x = self.backbone(x)
        heatmap = self.decoder(x)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: osmr/imgclsmob
Commit Name: d137cd2ce97b55466d27908639ec4a1229bd5d99
Time: 2020-02-16
Author: osemery@gmail.com
File Name: chainer_/chainercv2/models/simplepose_coco.py
Class Name: SimplePose
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: d137cd2ce97b55466d27908639ec4a1229bd5d99
Time: 2020-02-16
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/simplepose_coco.py
Class Name: SimplePose
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: d137cd2ce97b55466d27908639ec4a1229bd5d99
Time: 2020-02-16
Author: osemery@gmail.com
File Name: tensorflow2/tf2cv/models/simplepose_coco.py
Class Name: SimplePose
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: d137cd2ce97b55466d27908639ec4a1229bd5d99
Time: 2020-02-16
Author: osemery@gmail.com
File Name: chainer_/chainercv2/models/simplepose_coco.py
Class Name: SimplePose
Method Name: __init__