Update README.md
Browse filesinitial hexmaker config
- .gitignore +158 -0
- app.py +12 -11
- assets/Beeuty-1.png +3 -0
- assets/favicon.ico +0 -0
- assets/logo.png +3 -0
- assets/logo_hex.gif +3 -0
- assets/logo_hex.png +3 -0
- assets/logo_old.png +3 -0
- web-ui.bat +2 -0
.gitignore
CHANGED
@@ -2,6 +2,164 @@
|
|
2 |
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
|
3 |
################################################################################
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
/.vs
|
6 |
/src/__pycache__
|
7 |
/utils/__pycache__
|
|
|
2 |
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
|
3 |
################################################################################
|
4 |
|
5 |
+
# C extensions
|
6 |
+
*.so
|
7 |
+
|
8 |
+
# Distribution / packaging
|
9 |
+
.Python
|
10 |
+
build/
|
11 |
+
develop-eggs/
|
12 |
+
dist/
|
13 |
+
downloads/
|
14 |
+
eggs/
|
15 |
+
.eggs/
|
16 |
+
lib/
|
17 |
+
lib64/
|
18 |
+
parts/
|
19 |
+
sdist/
|
20 |
+
var/
|
21 |
+
wheels/
|
22 |
+
share/python-wheels/
|
23 |
+
*.egg-info/
|
24 |
+
.installed.cfg
|
25 |
+
*.egg
|
26 |
+
MANIFEST
|
27 |
+
|
28 |
+
# PyInstaller
|
29 |
+
# Usually these files are written by a python script from a template
|
30 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
31 |
+
*.manifest
|
32 |
+
*.spec
|
33 |
+
|
34 |
+
# Installer logs
|
35 |
+
pip-log.txt
|
36 |
+
pip-delete-this-directory.txt
|
37 |
+
|
38 |
+
# Unit test / coverage reports
|
39 |
+
htmlcov/
|
40 |
+
.tox/
|
41 |
+
.nox/
|
42 |
+
.coverage
|
43 |
+
.coverage.*
|
44 |
+
.cache
|
45 |
+
nosetests.xml
|
46 |
+
coverage.xml
|
47 |
+
*.cover
|
48 |
+
*.py,cover
|
49 |
+
.hypothesis/
|
50 |
+
.pytest_cache/
|
51 |
+
cover/
|
52 |
+
|
53 |
+
# Translations
|
54 |
+
*.mo
|
55 |
+
*.pot
|
56 |
+
|
57 |
+
# Django stuff:
|
58 |
+
*.log
|
59 |
+
local_settings.py
|
60 |
+
db.sqlite3
|
61 |
+
db.sqlite3-journal
|
62 |
+
|
63 |
+
# Flask stuff:
|
64 |
+
instance/
|
65 |
+
.webassets-cache
|
66 |
+
|
67 |
+
# Scrapy stuff:
|
68 |
+
.scrapy
|
69 |
+
|
70 |
+
# Sphinx documentation
|
71 |
+
docs/_build/
|
72 |
+
|
73 |
+
# PyBuilder
|
74 |
+
.pybuilder/
|
75 |
+
target/
|
76 |
+
|
77 |
+
# Jupyter Notebook
|
78 |
+
.ipynb_checkpoints
|
79 |
+
|
80 |
+
# IPython
|
81 |
+
profile_default/
|
82 |
+
ipython_config.py
|
83 |
+
|
84 |
+
# pyenv
|
85 |
+
# For a library or package, you might want to ignore these files since the code is
|
86 |
+
# intended to run in multiple environments; otherwise, check them in:
|
87 |
+
# .python-version
|
88 |
+
|
89 |
+
# pipenv
|
90 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
91 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
92 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
93 |
+
# install all needed dependencies.
|
94 |
+
#Pipfile.lock
|
95 |
+
|
96 |
+
# poetry
|
97 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
98 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
99 |
+
# commonly ignored for libraries.
|
100 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
101 |
+
#poetry.lock
|
102 |
+
|
103 |
+
# pdm
|
104 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
105 |
+
#pdm.lock
|
106 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
107 |
+
# in version control.
|
108 |
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
109 |
+
.pdm.toml
|
110 |
+
.pdm-python
|
111 |
+
.pdm-build/
|
112 |
+
|
113 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
114 |
+
__pypackages__/
|
115 |
+
|
116 |
+
# Celery stuff
|
117 |
+
celerybeat-schedule
|
118 |
+
celerybeat.pid
|
119 |
+
|
120 |
+
# SageMath parsed files
|
121 |
+
*.sage.py
|
122 |
+
|
123 |
+
# Environments
|
124 |
+
.env
|
125 |
+
.venv
|
126 |
+
env/
|
127 |
+
venv/
|
128 |
+
ENV/
|
129 |
+
env.bak/
|
130 |
+
venv.bak/
|
131 |
+
|
132 |
+
# Spyder project settings
|
133 |
+
.spyderproject
|
134 |
+
.spyproject
|
135 |
+
|
136 |
+
# Rope project settings
|
137 |
+
.ropeproject
|
138 |
+
|
139 |
+
# mkdocs documentation
|
140 |
+
/site
|
141 |
+
|
142 |
+
# mypy
|
143 |
+
.mypy_cache/
|
144 |
+
.dmypy.json
|
145 |
+
dmypy.json
|
146 |
+
|
147 |
+
# Pyre type checker
|
148 |
+
.pyre/
|
149 |
+
|
150 |
+
# pytype static type analyzer
|
151 |
+
.pytype/
|
152 |
+
|
153 |
+
# Cython debug symbols
|
154 |
+
cython_debug/
|
155 |
+
|
156 |
+
# PyCharm
|
157 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
158 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
159 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
160 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
161 |
+
#.idea/
|
162 |
+
/.vs
|
163 |
/.vs
|
164 |
/src/__pycache__
|
165 |
/utils/__pycache__
|
app.py
CHANGED
@@ -308,15 +308,15 @@ with gr.Blocks(css_paths="style_20250128.css", title="HexaGrid Creator", theme='
|
|
308 |
)
|
309 |
with gr.Column():
|
310 |
with gr.Accordion("Hex Coloring and Exclusion", open = False):
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
filter_color = gr.Checkbox(label="Filter Excluded Colors from Sampling", value=False,)
|
316 |
-
|
317 |
color_display = gr.DataFrame(label="List of Excluded RGBA Colors", headers=["R", "G", "B", "A"], elem_id="excluded_colors", type="array", value=build_dataframe(excluded_color_list), interactive=True, elem_classes="solid centered")
|
318 |
-
|
319 |
-
|
320 |
fill_hex = gr.Checkbox(label="Fill Hex with color from Image", value=True)
|
321 |
with gr.Accordion("Image Filters", open = False):
|
322 |
with gr.Row():
|
@@ -458,10 +458,10 @@ with gr.Blocks(css_paths="style_20250128.css", title="HexaGrid Creator", theme='
|
|
458 |
with gr.Row():
|
459 |
rotation = gr.Slider(-90, 180, 0.0, 0.1, label="Hexagon Rotation (degree)")
|
460 |
add_hex_text = gr.Dropdown(label="Add Text to Hexagons", choices=[None, "Row-Column Coordinates", "Sequential Numbers", "Playing Cards Sequential", "Playing Cards Alternate Red and Black", "Custom List"], value=None)
|
461 |
-
|
462 |
custom_text_list = gr.TextArea(label="Custom Text List", value=constants.cards_alternating, visible=False,)
|
463 |
custom_text_color_list = gr.TextArea(label="Custom Text Color List", value=constants.card_colors_alternating, visible=False)
|
464 |
-
|
465 |
hex_text_info = gr.Markdown("""
|
466 |
### Text Color uses the Border Color and Border Opacity, unless you use a custom list.
|
467 |
### The Custom Text List and Custom Text Color List are comma separated lists.
|
@@ -480,7 +480,8 @@ with gr.Blocks(css_paths="style_20250128.css", title="HexaGrid Creator", theme='
|
|
480 |
with gr.Row():
|
481 |
hex_size = gr.Number(label="Hexagon Size", value=32, minimum=1, maximum=768)
|
482 |
border_size = gr.Slider(-5,25,value=0,step=1,label="Border Size")
|
483 |
-
with gr.Row():
|
|
|
484 |
background_color = gr.ColorPicker(label="Background Color", value="#000000", interactive=True)
|
485 |
background_opacity = gr.Slider(0,100,0,1,label="Background Opacity %")
|
486 |
border_color = gr.ColorPicker(label="Border Color", value="#7b7b7b", interactive=True)
|
@@ -516,7 +517,7 @@ with gr.Blocks(css_paths="style_20250128.css", title="HexaGrid Creator", theme='
|
|
516 |
depth_image_source = gr.Radio(label="Depth Image Source", choices=["Input Image", "Output Image", "Overlay Image","Image with Margins"], value="Input Image")
|
517 |
with gr.Row():
|
518 |
generate_depth_button = gr.Button("Generate Depth Map and 3D Model From Selected Image", elem_classes="solid", variant="secondary")
|
519 |
-
|
520 |
depth_map_output = gr.Image(label="Depth Map", image_mode="L", elem_classes="centered solid imgcontainer", format="PNG", type="filepath", key="ImgDepth")
|
521 |
model_output = gr.Model3D(label="3D Model", clear_color=[1.0, 1.0, 1.0, 0.25], key="Img3D", elem_classes="centered solid imgcontainer")
|
522 |
with gr.Row():
|
|
|
308 |
)
|
309 |
with gr.Column():
|
310 |
with gr.Accordion("Hex Coloring and Exclusion", open = False):
|
311 |
+
with gr.Row():
|
312 |
+
with gr.Column():
|
313 |
+
color_picker = gr.ColorPicker(label="Pick a color to exclude",value="#505050")
|
314 |
+
with gr.Column():
|
315 |
filter_color = gr.Checkbox(label="Filter Excluded Colors from Sampling", value=False,)
|
316 |
+
exclude_color_button = gr.Button("Exclude Color", elem_id="exlude_color_button", elem_classes="solid")
|
317 |
color_display = gr.DataFrame(label="List of Excluded RGBA Colors", headers=["R", "G", "B", "A"], elem_id="excluded_colors", type="array", value=build_dataframe(excluded_color_list), interactive=True, elem_classes="solid centered")
|
318 |
+
selected_row = gr.Number(0, label="Selected Row", visible=False)
|
319 |
+
delete_button = gr.Button("Delete Row", elem_id="delete_exclusion_button", elem_classes="solid")
|
320 |
fill_hex = gr.Checkbox(label="Fill Hex with color from Image", value=True)
|
321 |
with gr.Accordion("Image Filters", open = False):
|
322 |
with gr.Row():
|
|
|
458 |
with gr.Row():
|
459 |
rotation = gr.Slider(-90, 180, 0.0, 0.1, label="Hexagon Rotation (degree)")
|
460 |
add_hex_text = gr.Dropdown(label="Add Text to Hexagons", choices=[None, "Row-Column Coordinates", "Sequential Numbers", "Playing Cards Sequential", "Playing Cards Alternate Red and Black", "Custom List"], value=None)
|
461 |
+
with gr.Row():
|
462 |
custom_text_list = gr.TextArea(label="Custom Text List", value=constants.cards_alternating, visible=False,)
|
463 |
custom_text_color_list = gr.TextArea(label="Custom Text Color List", value=constants.card_colors_alternating, visible=False)
|
464 |
+
with gr.Row():
|
465 |
hex_text_info = gr.Markdown("""
|
466 |
### Text Color uses the Border Color and Border Opacity, unless you use a custom list.
|
467 |
### The Custom Text List and Custom Text Color List are comma separated lists.
|
|
|
480 |
with gr.Row():
|
481 |
hex_size = gr.Number(label="Hexagon Size", value=32, minimum=1, maximum=768)
|
482 |
border_size = gr.Slider(-5,25,value=0,step=1,label="Border Size")
|
483 |
+
with gr.Row():
|
484 |
+
rotation = gr.Slider(-90, 180, 0.0, 0.1, label="deg. Rotation")
|
485 |
background_color = gr.ColorPicker(label="Background Color", value="#000000", interactive=True)
|
486 |
background_opacity = gr.Slider(0,100,0,1,label="Background Opacity %")
|
487 |
border_color = gr.ColorPicker(label="Border Color", value="#7b7b7b", interactive=True)
|
|
|
517 |
depth_image_source = gr.Radio(label="Depth Image Source", choices=["Input Image", "Output Image", "Overlay Image","Image with Margins"], value="Input Image")
|
518 |
with gr.Row():
|
519 |
generate_depth_button = gr.Button("Generate Depth Map and 3D Model From Selected Image", elem_classes="solid", variant="secondary")
|
520 |
+
with gr.Row():
|
521 |
depth_map_output = gr.Image(label="Depth Map", image_mode="L", elem_classes="centered solid imgcontainer", format="PNG", type="filepath", key="ImgDepth")
|
522 |
model_output = gr.Model3D(label="3D Model", clear_color=[1.0, 1.0, 1.0, 0.25], key="Img3D", elem_classes="centered solid imgcontainer")
|
523 |
with gr.Row():
|
assets/Beeuty-1.png
ADDED
![]() |
Git LFS Details
|
assets/favicon.ico
ADDED
|
assets/logo.png
ADDED
![]() |
Git LFS Details
|
assets/logo_hex.gif
ADDED
![]() |
Git LFS Details
|
assets/logo_hex.png
ADDED
![]() |
Git LFS Details
|
assets/logo_old.png
ADDED
![]() |
Git LFS Details
|
web-ui.bat
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
py -m app
|
2 |
+
pause
|