autoforge 1.9.1__tar.gz → 1.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {autoforge-1.9.1 → autoforge-1.9.2}/PKG-INFO +1 -1
- {autoforge-1.9.1 → autoforge-1.9.2}/pyproject.toml +1 -1
- {autoforge-1.9.1 → autoforge-1.9.2}/src/AutoForge.egg-info/PKG-INFO +1 -1
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/auto_forge.py +21 -14
- {autoforge-1.9.1 → autoforge-1.9.2}/README.md +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/setup.cfg +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/AutoForge.egg-info/SOURCES.txt +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/AutoForge.egg-info/dependency_links.txt +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/AutoForge.egg-info/entry_points.txt +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/AutoForge.egg-info/requires.txt +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/AutoForge.egg-info/top_level.txt +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/CAdamW.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/FilamentHelper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/Heightmaps/ChristofidesHeightMap.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/Heightmaps/DepthEstimateHeightMap.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/Heightmaps/__init__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/ImageHelper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/OptimizerHelper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/OtherHelper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/OutputHelper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/PruningHelper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/__init__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/filamentcolors_library.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Init_comparer/__init__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Init_comparer/auto_forge_init_check.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Init_comparer/plot_results.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Loss/LossFunctions.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Loss/PerceptionLoss.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Loss/__init__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Misc/__init__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Misc/color_fit_all.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Modules/Optimizer.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Modules/__init__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/__init__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/__main__.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/priority_mask_editor.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_cadamw.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_christofides_height_map.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_christofides_heightmap.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_depth_adjusted_height_map.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_depth_estimate_height_map.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_end_to_end_optimizer.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_filament_and_output.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_filament_helper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_flatforge.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_heightmap_init.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_image_helper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_loss_functions.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_optimizer_helper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_optimizer_module.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_optimizer_smoke.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_output_helper.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_output_helper_extended.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_perception_and_pruning.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_property_based.py +0 -0
- {autoforge-1.9.1 → autoforge-1.9.2}/tests/test_pruning_helper.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "AutoForge"
|
|
7
|
-
version="1.9.
|
|
7
|
+
version="1.9.2"
|
|
8
8
|
description = "AutoForge is a Python tool for generating 3D printed layered models from an input image."
|
|
9
9
|
authors = [{ name = "Hendric Voss", email = "hvoss@techfak.uni-bielefeld.de" }]
|
|
10
10
|
readme = "README.md"
|
|
@@ -15,6 +15,7 @@ The implementation intentionally keeps side-effects (disk writes / prints) order
|
|
|
15
15
|
preserve prior behavior. Helper functions are factored out for readability; no functional
|
|
16
16
|
behavior should have changed relative to the previous monolithic version.
|
|
17
17
|
"""
|
|
18
|
+
|
|
18
19
|
import argparse
|
|
19
20
|
import sys
|
|
20
21
|
import os
|
|
@@ -154,7 +155,6 @@ def parse_args() -> argparse.Namespace:
|
|
|
154
155
|
|
|
155
156
|
parser.add_argument(
|
|
156
157
|
"--visualize",
|
|
157
|
-
type=bool,
|
|
158
158
|
default=True,
|
|
159
159
|
help="Enable visualization during optimization",
|
|
160
160
|
action=argparse.BooleanOptionalAction,
|
|
@@ -435,9 +435,7 @@ def _auto_select_background_color(
|
|
|
435
435
|
f.write(f"chosen_filament_color={chosen_hex}\n")
|
|
436
436
|
f.write(f"closest_filament_index={closest_idx}\n")
|
|
437
437
|
if getattr(args, "background_material_name", None):
|
|
438
|
-
f.write(
|
|
439
|
-
f"closest_filament_name={args.background_material_name}\n"
|
|
440
|
-
)
|
|
438
|
+
f.write(f"closest_filament_name={args.background_material_name}\n")
|
|
441
439
|
except Exception:
|
|
442
440
|
traceback.print_exc()
|
|
443
441
|
else:
|
|
@@ -447,7 +445,10 @@ def _auto_select_background_color(
|
|
|
447
445
|
|
|
448
446
|
|
|
449
447
|
def _prepare_background_and_materials(
|
|
450
|
-
args,
|
|
448
|
+
args,
|
|
449
|
+
device: torch.device,
|
|
450
|
+
material_colors_np: np.ndarray,
|
|
451
|
+
material_TDs_np: np.ndarray,
|
|
451
452
|
) -> Tuple[Tuple[int, int, int], torch.Tensor, torch.Tensor, torch.Tensor]:
|
|
452
453
|
"""Create torch tensors for materials & background color.
|
|
453
454
|
|
|
@@ -649,7 +650,9 @@ def _build_optimizer(
|
|
|
649
650
|
return optimizer
|
|
650
651
|
|
|
651
652
|
|
|
652
|
-
def _run_optimization_loop(
|
|
653
|
+
def _run_optimization_loop(
|
|
654
|
+
optimizer: FilamentOptimizer, args, device: torch.device
|
|
655
|
+
) -> None:
|
|
653
656
|
"""Execute the main gradient-based optimization iterations.
|
|
654
657
|
|
|
655
658
|
Features:
|
|
@@ -913,8 +916,10 @@ def start(args) -> float:
|
|
|
913
916
|
)
|
|
914
917
|
|
|
915
918
|
# Prepare background color tensor and material tensors
|
|
916
|
-
bgr_tuple, background, material_colors, material_TDs =
|
|
917
|
-
|
|
919
|
+
bgr_tuple, background, material_colors, material_TDs = (
|
|
920
|
+
_prepare_background_and_materials(
|
|
921
|
+
args, device, material_colors_np, material_TDs_np
|
|
922
|
+
)
|
|
918
923
|
)
|
|
919
924
|
|
|
920
925
|
# Compute sizes
|
|
@@ -932,12 +937,14 @@ def start(args) -> float:
|
|
|
932
937
|
focus_map_full = _load_priority_mask(args, output_img_np, device)
|
|
933
938
|
|
|
934
939
|
# Initialize heightmap
|
|
935
|
-
pixel_height_logits_init, global_logits_init, pixel_height_labels =
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
940
|
+
pixel_height_logits_init, global_logits_init, pixel_height_labels = (
|
|
941
|
+
_initialize_heightmap(
|
|
942
|
+
args,
|
|
943
|
+
output_img_np,
|
|
944
|
+
bgr_tuple,
|
|
945
|
+
material_colors_np,
|
|
946
|
+
random_seed,
|
|
947
|
+
)
|
|
941
948
|
)
|
|
942
949
|
|
|
943
950
|
# Prepare processing targets and focus map (processing-res)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/Heightmaps/ChristofidesHeightMap.py
RENAMED
|
File without changes
|
{autoforge-1.9.1 → autoforge-1.9.2}/src/autoforge/Helper/Heightmaps/DepthEstimateHeightMap.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|