Simple GUI with ipywidgets.

Helper Functions

set_css_in_cell_output[source]

set_css_in_cell_output()

Widgets

Base Widgets

class ZipUpload[source]

ZipUpload(path=None, layout=None)

Widgets upload and extract zip files

t = ZipUpload()
t.widget

class ItemsPerPage[source]

ItemsPerPage(path=None, plot_fn=None, items={}, srt=True, srt_by='name', srt_index=0, **kwargs)

Dropdown to show n items per page

t = ItemsPerPage(srt_index=1)
t.widget

class BaseParamWidget[source]

BaseParamWidget(config=None)

Parameter Widget Base Class

class BaseUI[source]

BaseUI(config=None, path=None)

Base UI for different steps

Path Widgets

class PathSelector[source]

PathSelector(start_dir, select_name='Select', select_file=False, tooltip=None)

Widgets to browse and select files or directories

t = PathSelector('')
display(t.button, t.dialog)

class PathDownloads[source]

PathDownloads(*args, **kwargs) :: PathSelector

Widgets to browse and download files or directories

t = PathDownloads('', select_file=True)
display(t.button, t.dialog)

class PathConfig[source]

PathConfig(*args, **kwargs) :: PathSelector

Widgets to browse and and load config file

t = PathConfig('', select_file=True)
display(t.button, t.dialog)

Grund Truth Estimation Widgets

class GTDataSB[source]

GTDataSB(path=None)

Layout for Grund Truth Estimation "Data" Section

t=GTDataSB()
t.widget

class GTEstSB[source]

GTEstSB(path=None)

Layout for Grund Truth Estimation "Data" Section

t=GTEstSB()
t.widget
class GTSimSB:
    'Layout for Expert Similarity "Data" Section'
    
    #Hints
    txt = 'Get statistics on segmentation similarities <br>'
    hints = w.HTML(txt)
    
    grid = w.GridspecLayout(4, GRID_COLS, width='100%',  grid_gap="0px", align_items='center')
    
    #Labels
    #grid[0, :] = w.Label('Simultaneous truth & performance level estimation')
    grid[0, 0] = w.HTML("Inter Experts")
    grid[1, 0] = w.HTML("GT vs Experts")
    grid[2, :] = w.HTML('<hr>')
    grid[3, 0] = w.Label('Downloads')
    
       
    #Intercoder sim
    inter = w.Button(description='Get statistics', layout=w.Layout(width='auto'),
                      tooltip='Calculate intercoder (inter-expert) agreement')
    grid[0, 1:] = inter
    
    #GT vs Experts
    gt_exp = w.Button(description='Get statistics', layout=w.Layout(width='auto'),
                  tooltip='Calculate agreement between expert segmentation masks and estimated ground truth')
    grid[1, 1:] = gt_exp
    
    #Final Widget
    widget = w.VBox([hints,grid])
    
    def __init__(self, path=None):
        path = path or Path('.') 
        self.down  = PathDownloads(path, 'Select', tooltip='Click to download file or directory')
        self.grid[3, 1:] = self.down.button    
t=GTSimSB()
t.widget

Grund Truth Estimation UI

class GTEstUI[source]

GTEstUI(hide=False, **kwargs) :: BaseUI

UI for ground truth estimation

t=GTEstUI()
t.sb_acc

Train Widgets

class TrainDataSB[source]

TrainDataSB(path=None, **kwargs) :: BaseParamWidget

Layout for "Training Data" Section

t=TrainDataSB('')
t.widget

class TrainModelSB[source]

TrainModelSB(**kwargs) :: BaseParamWidget

Layout for "Ensemble Training"

t=TrainModelSB()
t.widget

class TrainValidSB[source]

TrainValidSB(path=None, **kwargs) :: BaseParamWidget

Layout for "Validation" Section

t=TrainValidSB()
t.widget

Pop-Up Widgets

class LRWidget[source]

LRWidget()

Widget for Learning Rate Finder

t = LRWidget()
t.widget.layout.display = "block"  
t.widget

class BasePopUpParamWidget[source]

BasePopUpParamWidget(**kwargs) :: BaseParamWidget

Parameter Pop-Up Widget Base Class

class ParamWidget[source]

ParamWidget(**kwargs) :: BasePopUpParamWidget

Widget for custom training parameters

t=ParamWidget(config=Config(bs=8))
t.widget.layout.display = "block"    
t.widget

class MWWidget[source]

MWWidget(**kwargs) :: BasePopUpParamWidget

Widget to customize loss functions

t=MWWidget(config=Config())
t.widget.layout.display = "block"  
t.widget

Train UI

class TrainUI[source]

TrainUI(hide=False, **kwargs) :: BaseUI

UI for ensemble training

t=TrainUI('')
t.sb_acc

Prediction Widgets

class PredInputSB[source]

PredInputSB(path=None)

Layout for "Data and Ensemble" Section

t=PredInputSB('')
t.widget

class PredSB[source]

PredSB(path=None, **kwargs) :: BaseParamWidget

Layout for "Prediction and Quality Control" Section

t=PredSB()
t.widget

Prediction UI

class PredUI[source]

PredUI(hide=False, **kwargs) :: BaseUI

UI for prediction of new data

t=PredUI('')
t.sb_acc

GUI

class GUI[source]

GUI(path=Path('.'), reinit=False) :: GetAttr

GUI for deepflash2

t = GUI()