如何在python中从U-NET分段保存分段图像?

时间:2019-05-12 23:44:12

标签: python computer-vision image-segmentation cv2

我已经在基于Python的this链接中训练了U-NET架构。

训练后,我想将单独分割的图像(当前是多张图像)保存在目录中。如何在python中保存这些分割的图像? 我正在使用下面的代码来保存结果。

<Patient>:
    manage_prescription:manage_prescription

    BoxLayout:

        GridLayout :
            cols:1
            BoxLayout:
                id:manage_prescription
                orientation:'vertical'

                BoxLayout:
                    size_hint_y:None
                    height:40

                    Button:
                        text:"NO."
                        font_size: 25

                    Button:
                        text:"Date"
                        font_size: 25


                    Button:
                        text:"Patient"
                        font_size: 25


                    Button:
                        text:"Doctor"
                        font_size: 25
                        on_press: root.change_dynamic_Layout()


                BoxLayout:

                    RecycleView:
                        bar_width: 10
                        bar_color: 1, 0, 0, 1   # red
                        bar_inactive_color: 0, 0, 1, 1   # blue
                        #effect_cls: "ScrollEffect"
                        scroll_type: ['bars']
                        viewclass: 'SelectableButton'
                        data:[{'text': str(x)} for x in range(20)]
                        SelectableRecycleGridLayout:
                            cols:4
                            default_size: None, dp(56)
                            default_size_hint:1, None
                            size_hint_y: None
                            height: self.minimum_height
                            orientation: 'vertical'
                            multiselect: True
                            touch_multiselect: True





<victor>:
    Label:
        text:" Switched to specific page for patient's details"


<SelectableButton>:
    # Draw a background to indicate selection
    canvas.before:
        Color:
            rgba: (.0, 0.9, .1, .3) if self.selected else (1, 1, 1, 1)
        Rectangle:
            pos: self.pos
            size: self.size
    on_press: root.on_enter()

0 个答案:

没有答案