# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3.7.5 64-bit
#     language: python
#     name: python37564bit67e9689113b54fe08a64600d6234199b
# ---

# # Plant ID set
# binary classification (docks or not docks)

# +
from dataglob import DataGlob

from IPython.display import clear_output
import os

# +
in_dir = os.getcwd() + "/../training/plant-id"
out_dir = os.getcwd()

glob1 = DataGlob(in_dir, out_dir) # create DataGlob

# adjust some knobs
glob1._overwrite = True
glob1.set_configuration("prewitt", True)
glob1.set_configuration("original", True)

# see the knobs
glob1.show_configuration()

# configured model
glob1.prepare_database()
glob1.create_databunch()
glob1.create_model()
# -

# control model
glob1.prepare_control_database()
glob1.create_databunch()
glob1.create_model()

# +
glob1 = DataGlob(in_dir, out_dir) # create DataGlob

# adjust some knobs
glob1._overwrite = True
glob1.set_configuration("canny_tight", True)
glob1.set_configuration("original", True)

# see the knobs
glob1.show_configuration()

# configured model
glob1.prepare_database()
glob1.create_databunch()
glob1.create_model()

# +
glob1 = DataGlob(in_dir, out_dir) # create DataGlob

# adjust some knobs
glob1._overwrite = True
glob1.set_configuration("canny_auto", True)
glob1.set_configuration("original", True)

# see the knobs
glob1.show_configuration()

# configured model
glob1.prepare_database()
glob1.create_databunch()
glob1.create_model()

# +
glob1 = DataGlob(in_dir, out_dir) # create DataGlob

# adjust some knobs
glob1._overwrite = True
glob1.set_configuration("canny_wide", True)
glob1.set_configuration("original", True)

# see the knobs
glob1.show_configuration()

# configured model
glob1.prepare_database()
glob1.create_databunch()
glob1.create_model()

# +
glob1 = DataGlob(in_dir, out_dir) # create DataGlob

# adjust some knobs
glob1._overwrite = True
glob1.set_configuration("laplacian", True)
glob1.set_configuration("original", True)

# see the knobs
glob1.show_configuration()

# configured model
glob1.prepare_database()
glob1.create_databunch()
glob1.create_model()

# +
glob1 = DataGlob(in_dir, out_dir) # create DataGlob

# adjust some knobs
glob1._overwrite = True
glob1.set_configuration("sobel_x", True)
glob1.set_configuration("original", True)

# see the knobs
glob1.show_configuration()

# configured model
glob1.prepare_database()
glob1.create_databunch()
glob1.create_model()

# +
glob1 = DataGlob(in_dir, out_dir) # create DataGlob

# adjust some knobs
glob1._overwrite = True
glob1.set_configuration("sobel_y", True)
glob1.set_configuration("original", True)

# see the knobs
glob1.show_configuration()

# configured model
glob1.prepare_database()
glob1.create_databunch()
glob1.create_model()

StarcoderdataJupyterScriptsDedupFiltered