Skip to content

Commit

Permalink
Add ALL_MODELS attribute to bulk
Browse files Browse the repository at this point in the history
  • Loading branch information
justincdavis committed Aug 6, 2024
1 parent 051d384 commit 17e1109
Show file tree
Hide file tree
Showing 8 changed files with 916 additions and 702 deletions.
9 changes: 9 additions & 0 deletions ci/compile_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ def compiles_models():
for var_name in outer_variable_names:
f.write(f"{var_name} : tuple[Path, ...]\n")
f.write(f" tuple of all wrappers for {var_name.lower()} operation.\n")
f.write("ALL_MODELS : list[tuple[Path, ...]]\n")
f.write(" list of all wrappers for each operation.\n")
f.write('"""\n')
f.write("from __future__ import annotations\n\n")

Expand All @@ -451,6 +453,13 @@ def compiles_models():
f.write(f" shave{shave}.{var_name},\n")
f.write(")\n\n")

# create an ALL_MODELS attribute which is a list
# of all the tuples
f.write("ALL_MODELS: list[tuple[Path, ...]] = [\n")
for var_name in outer_variable_names:
f.write(f" {var_name},\n")
f.write("]\n")

# STEP 3
# WRITE THE __init__.py FILE
with open(os.path.join(MODEL_FOLDER, "__init__.py"), "w") as f:
Expand Down
205 changes: 205 additions & 0 deletions src/oakutils/blobs/models/bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@
tuple of all wrappers for sobelgray operation.
SOBEL : tuple[Path, ...]
tuple of all wrappers for sobel operation.
ALL_MODELS : list[tuple[Path, ...]]
list of all wrappers for each operation.
"""

Expand Down Expand Up @@ -2225,3 +2227,206 @@
shave5.SOBEL,
shave6.SOBEL,
)

ALL_MODELS: list[tuple[Path, ...]] = [
GFTTBLURGRAY_11X11,
GFTTBLURGRAY_13X13,
GFTTBLURGRAY_15X15,
GFTTBLURGRAY_3X3,
GFTTBLURGRAY_5X5,
GFTTBLURGRAY_7X7,
GFTTBLURGRAY_9X9,
GFTTBLUR_11X11,
GFTTBLUR_13X13,
GFTTBLUR_15X15,
GFTTBLUR_3X3,
GFTTBLUR_5X5,
GFTTBLUR_7X7,
GFTTBLUR_9X9,
GFTTGRAY,
GFTT,
GAUSSIANGRAY_11X11,
GAUSSIANGRAY_13X13,
GAUSSIANGRAY_15X15,
GAUSSIANGRAY_3X3,
GAUSSIANGRAY_5X5,
GAUSSIANGRAY_7X7,
GAUSSIANGRAY_9X9,
GAUSSIAN_11X11,
GAUSSIAN_13X13,
GAUSSIAN_15X15,
GAUSSIAN_3X3,
GAUSSIAN_5X5,
GAUSSIAN_7X7,
GAUSSIAN_9X9,
HARRISBLURGRAY_11X11,
HARRISBLURGRAY_13X13,
HARRISBLURGRAY_15X15,
HARRISBLURGRAY_3X3,
HARRISBLURGRAY_5X5,
HARRISBLURGRAY_7X7,
HARRISBLURGRAY_9X9,
HARRISBLUR_11X11,
HARRISBLUR_13X13,
HARRISBLUR_15X15,
HARRISBLUR_3X3,
HARRISBLUR_5X5,
HARRISBLUR_7X7,
HARRISBLUR_9X9,
HARRISGRAY,
HARRIS,
HESSIANBLURGRAY_11X11,
HESSIANBLURGRAY_13X13,
HESSIANBLURGRAY_15X15,
HESSIANBLURGRAY_3X3,
HESSIANBLURGRAY_5X5,
HESSIANBLURGRAY_7X7,
HESSIANBLURGRAY_9X9,
HESSIANBLUR_11X11,
HESSIANBLUR_13X13,
HESSIANBLUR_15X15,
HESSIANBLUR_3X3,
HESSIANBLUR_5X5,
HESSIANBLUR_7X7,
HESSIANBLUR_9X9,
HESSIANGRAY,
HESSIAN,
LAPLACIANBLURGRAY_11X11_11X11,
LAPLACIANBLURGRAY_11X11_13X13,
LAPLACIANBLURGRAY_11X11_15X15,
LAPLACIANBLURGRAY_11X11_3X3,
LAPLACIANBLURGRAY_11X11_5X5,
LAPLACIANBLURGRAY_11X11_7X7,
LAPLACIANBLURGRAY_11X11_9X9,
LAPLACIANBLURGRAY_13X13_11X11,
LAPLACIANBLURGRAY_13X13_13X13,
LAPLACIANBLURGRAY_13X13_15X15,
LAPLACIANBLURGRAY_13X13_3X3,
LAPLACIANBLURGRAY_13X13_5X5,
LAPLACIANBLURGRAY_13X13_7X7,
LAPLACIANBLURGRAY_13X13_9X9,
LAPLACIANBLURGRAY_15X15_11X11,
LAPLACIANBLURGRAY_15X15_13X13,
LAPLACIANBLURGRAY_15X15_15X15,
LAPLACIANBLURGRAY_15X15_3X3,
LAPLACIANBLURGRAY_15X15_5X5,
LAPLACIANBLURGRAY_15X15_7X7,
LAPLACIANBLURGRAY_15X15_9X9,
LAPLACIANBLURGRAY_3X3_11X11,
LAPLACIANBLURGRAY_3X3_13X13,
LAPLACIANBLURGRAY_3X3_15X15,
LAPLACIANBLURGRAY_3X3_3X3,
LAPLACIANBLURGRAY_3X3_5X5,
LAPLACIANBLURGRAY_3X3_7X7,
LAPLACIANBLURGRAY_3X3_9X9,
LAPLACIANBLURGRAY_5X5_11X11,
LAPLACIANBLURGRAY_5X5_13X13,
LAPLACIANBLURGRAY_5X5_15X15,
LAPLACIANBLURGRAY_5X5_3X3,
LAPLACIANBLURGRAY_5X5_5X5,
LAPLACIANBLURGRAY_5X5_7X7,
LAPLACIANBLURGRAY_5X5_9X9,
LAPLACIANBLURGRAY_7X7_11X11,
LAPLACIANBLURGRAY_7X7_13X13,
LAPLACIANBLURGRAY_7X7_15X15,
LAPLACIANBLURGRAY_7X7_3X3,
LAPLACIANBLURGRAY_7X7_5X5,
LAPLACIANBLURGRAY_7X7_7X7,
LAPLACIANBLURGRAY_7X7_9X9,
LAPLACIANBLURGRAY_9X9_11X11,
LAPLACIANBLURGRAY_9X9_13X13,
LAPLACIANBLURGRAY_9X9_15X15,
LAPLACIANBLURGRAY_9X9_3X3,
LAPLACIANBLURGRAY_9X9_5X5,
LAPLACIANBLURGRAY_9X9_7X7,
LAPLACIANBLURGRAY_9X9_9X9,
LAPLACIANBLUR_11X11_11X11,
LAPLACIANBLUR_11X11_13X13,
LAPLACIANBLUR_11X11_15X15,
LAPLACIANBLUR_11X11_3X3,
LAPLACIANBLUR_11X11_5X5,
LAPLACIANBLUR_11X11_7X7,
LAPLACIANBLUR_11X11_9X9,
LAPLACIANBLUR_13X13_11X11,
LAPLACIANBLUR_13X13_13X13,
LAPLACIANBLUR_13X13_15X15,
LAPLACIANBLUR_13X13_3X3,
LAPLACIANBLUR_13X13_5X5,
LAPLACIANBLUR_13X13_7X7,
LAPLACIANBLUR_13X13_9X9,
LAPLACIANBLUR_15X15_11X11,
LAPLACIANBLUR_15X15_13X13,
LAPLACIANBLUR_15X15_15X15,
LAPLACIANBLUR_15X15_3X3,
LAPLACIANBLUR_15X15_5X5,
LAPLACIANBLUR_15X15_7X7,
LAPLACIANBLUR_15X15_9X9,
LAPLACIANBLUR_3X3_11X11,
LAPLACIANBLUR_3X3_13X13,
LAPLACIANBLUR_3X3_15X15,
LAPLACIANBLUR_3X3_3X3,
LAPLACIANBLUR_3X3_5X5,
LAPLACIANBLUR_3X3_7X7,
LAPLACIANBLUR_3X3_9X9,
LAPLACIANBLUR_5X5_11X11,
LAPLACIANBLUR_5X5_13X13,
LAPLACIANBLUR_5X5_15X15,
LAPLACIANBLUR_5X5_3X3,
LAPLACIANBLUR_5X5_5X5,
LAPLACIANBLUR_5X5_7X7,
LAPLACIANBLUR_5X5_9X9,
LAPLACIANBLUR_7X7_11X11,
LAPLACIANBLUR_7X7_13X13,
LAPLACIANBLUR_7X7_15X15,
LAPLACIANBLUR_7X7_3X3,
LAPLACIANBLUR_7X7_5X5,
LAPLACIANBLUR_7X7_7X7,
LAPLACIANBLUR_7X7_9X9,
LAPLACIANBLUR_9X9_11X11,
LAPLACIANBLUR_9X9_13X13,
LAPLACIANBLUR_9X9_15X15,
LAPLACIANBLUR_9X9_3X3,
LAPLACIANBLUR_9X9_5X5,
LAPLACIANBLUR_9X9_7X7,
LAPLACIANBLUR_9X9_9X9,
LAPLACIANGRAY_11X11,
LAPLACIANGRAY_13X13,
LAPLACIANGRAY_15X15,
LAPLACIANGRAY_3X3,
LAPLACIANGRAY_5X5,
LAPLACIANGRAY_7X7,
LAPLACIANGRAY_9X9,
LAPLACIAN_11X11,
LAPLACIAN_13X13,
LAPLACIAN_15X15,
LAPLACIAN_3X3,
LAPLACIAN_5X5,
LAPLACIAN_7X7,
LAPLACIAN_9X9,
LASERSCAN_10_1,
LASERSCAN_10_3,
LASERSCAN_10_5,
LASERSCAN_20_1,
LASERSCAN_20_3,
LASERSCAN_20_5,
LASERSCAN_5_1,
LASERSCAN_5_3,
LASERSCAN_5_5,
POINTCLOUD,
SOBELBLURGRAY_11X11,
SOBELBLURGRAY_13X13,
SOBELBLURGRAY_15X15,
SOBELBLURGRAY_3X3,
SOBELBLURGRAY_5X5,
SOBELBLURGRAY_7X7,
SOBELBLURGRAY_9X9,
SOBELBLUR_11X11,
SOBELBLUR_13X13,
SOBELBLUR_15X15,
SOBELBLUR_3X3,
SOBELBLUR_5X5,
SOBELBLUR_7X7,
SOBELBLUR_9X9,
SOBELGRAY,
SOBEL,
]
Loading

0 comments on commit 17e1109

Please sign in to comment.