update sorting tolerance

This commit is contained in:
unknown
2026-01-25 09:50:10 +08:00
parent bac8690c35
commit 1d1dd6820d
7 changed files with 162 additions and 2 deletions
+1
View File
@@ -11,3 +11,4 @@ orisys.egg-info/
/dist_nuitka/
/build_nuitka
/data/
/config/
+159
View File
@@ -0,0 +1,159 @@
<?xml version='1.0' encoding='utf8'?>
<nuitka-compilation-report nuitka_version="2.8.9" nuitka_commercial_version="not installed" mode="module" completion="error exit message (1)" exit_message="Failed unexpectedly in Scons C backend compilation.">
<module name="orisys" kind="CompiledPythonPackage" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\__init__.py" distribution="orisys">
<optimization-time pass="1" time="0.01" micro_passes="3" />
<optimization-time pass="2" time="0.00" micro_passes="1" />
<module_usages>
<module_usage name="os" finding="excluded" line="1" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="orisys.sensor" finding="relative" line="11" />
<module_usage name="orisys" finding="absolute" line="12" />
<module_usage name="orisys.util" finding="relative" line="12" />
<module_usage name="orisys" finding="absolute" line="13" />
<module_usage name="orisys.configs" finding="relative" line="13" />
</module_usages>
</module>
<module name="orisys.HHD" kind="CompiledPythonModule" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\HHD.py" distribution="orisys">
<optimization-time pass="1" time="0.70" micro_passes="6" max_branch_merge="278" merged_total="16265" />
<optimization-time pass="2" time="0.10" micro_passes="1" max_branch_merge="258" merged_total="2611" />
<module_usages>
<module_usage name="numpy" finding="absolute" line="24" />
<module_usage name="timeit" finding="excluded" line="27" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="sys" finding="absolute" line="28" />
<module_usage name="scipy" finding="absolute" line="29" />
<module_usage name="scipy.signal" finding="absolute" line="29" />
<module_usage name="scipy.spatial" finding="absolute" line="29" />
<module_usage name="cupy" finding="absolute" line="35" />
<module_usage name="cupy.cuda" finding="absolute" line="40" />
<module_usage name="cupy.cuda.Stream" finding="not-found" line="40" />
<module_usage name="cupy" finding="absolute" line="480" />
<module_usage name="numpy" finding="absolute" line="861" />
<module_usage name="scipy" finding="absolute" line="862" />
<module_usage name="scipy.signal" finding="absolute" line="862" />
<module_usage name="scipy.spatial" finding="absolute" line="862" />
<module_usage name="cupy" finding="absolute" line="867" />
<module_usage name="cupyx.scipy.signal" finding="absolute" line="868" />
<module_usage name="scipy.spatial.distance" finding="absolute" line="1092" />
</module_usages>
</module>
<module name="orisys.Stitcher" kind="CompiledPythonModule" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\Stitcher.py" distribution="orisys">
<optimization-time pass="1" time="0.68" micro_passes="8" max_branch_merge="113" merged_total="9783" />
<optimization-time pass="2" time="0.09" micro_passes="1" max_branch_merge="89" merged_total="1164" />
<module_usages>
<module_usage name="os" finding="excluded" line="1" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="numpy" finding="absolute" line="2" />
<module_usage name="scipy.fft" finding="absolute" line="3" />
<module_usage name="scipy.ndimage" finding="absolute" line="4" />
<module_usage name="cv2" finding="absolute" line="5" />
</module_usages>
</module>
<module name="orisys.configs" kind="CompiledPythonPackage" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\configs\__init__.py" distribution="orisys">
<optimization-time pass="1" time="0.07" micro_passes="5" max_branch_merge="38" merged_total="1506" />
<optimization-time pass="2" time="0.01" micro_passes="1" max_branch_merge="31" merged_total="292" />
<module_usages>
<module_usage name="os" finding="excluded" line="1" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="json" finding="excluded" line="1" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="sys" finding="absolute" line="2" />
<module_usage name="pathlib" finding="excluded" line="3" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
</module_usages>
</module>
<module name="orisys.get_depth" kind="CompiledPythonModule" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\get_depth.py" distribution="orisys">
<optimization-time pass="1" time="0.18" micro_passes="5" max_branch_merge="186" merged_total="2614" />
<optimization-time pass="2" time="0.03" micro_passes="1" max_branch_merge="171" merged_total="501" />
<module_usages>
<module_usage name="numpy" finding="absolute" line="1" />
<module_usage name="cv2" finding="absolute" line="2" />
<module_usage name="cupy" finding="absolute" line="6" />
<module_usage name="cupyx.scipy.ndimage" finding="absolute" line="202" />
<module_usage name="cupyx.scipy.ndimage.gaussian_filter" finding="not-found" line="202" />
<module_usage name="cupyx.scipy.ndimage" finding="absolute" line="242" />
<module_usage name="cupyx.scipy.ndimage.zoom" finding="not-found" line="242" />
</module_usages>
</module>
<module name="orisys.sensor" kind="CompiledPythonModule" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\sensor.py" distribution="orisys">
<optimization-time pass="1" time="0.24" micro_passes="5" max_branch_merge="112" merged_total="4886" />
<optimization-time pass="2" time="0.03" micro_passes="1" max_branch_merge="110" merged_total="914" />
<module_usages>
<module_usage name="os" finding="excluded" line="9" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="numpy" finding="absolute" line="10" />
<module_usage name="cv2" finding="absolute" line="11" />
<module_usage name="time" finding="absolute" line="12" />
<module_usage name="enum" finding="excluded" line="13" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="typing" finding="excluded" line="14" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="threading" finding="excluded" line="15" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="queue" finding="excluded" line="16" exclusion_reason="Not following into stdlib unless standalone or requested to follow into stdlib." />
<module_usage name="orisys.Stitcher" finding="relative" line="18" />
<module_usage name="orisys.tracker" finding="relative" line="19" />
<module_usage name="orisys.HHD" finding="relative" line="20" />
<module_usage name="orisys" finding="absolute" line="21" />
<module_usage name="orisys.configs" finding="relative" line="21" />
<module_usage name="orisys.get_depth" finding="relative" line="22" />
<module_usage name="cupy" finding="absolute" line="72" />
</module_usages>
</module>
<module name="orisys.tracker" kind="CompiledPythonModule" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\tracker.py" distribution="orisys">
<optimization-time pass="1" time="0.07" micro_passes="5" max_branch_merge="108" merged_total="2168" />
<optimization-time pass="2" time="0.01" micro_passes="1" max_branch_merge="108" merged_total="419" />
<module_usages>
<module_usage name="cv2" finding="absolute" line="1" />
<module_usage name="numpy" finding="absolute" line="2" />
</module_usages>
</module>
<module name="orisys.util" kind="CompiledPythonModule" usage="root_module" reason="Root module" source_path="${cwd}\src\orisys\util.py" distribution="orisys">
<optimization-time pass="1" time="0.71" micro_passes="6" max_branch_merge="138" merged_total="1449" />
<optimization-time pass="2" time="0.02" micro_passes="1" max_branch_merge="134" merged_total="236" />
<module_usages>
<module_usage name="cv2" finding="absolute" line="1" />
<module_usage name="numpy" finding="absolute" line="2" />
<module_usage name="scipy.interpolate" finding="absolute" line="3" />
</module_usages>
</module>
<performance>
<memory_usage name="after_launch" value="41095168" />
<memory_usage name="before_c_code_generation" value="905592832" />
<memory_usage name="before_running_scons" value="910643200" />
</performance>
<data_composer blob_size="38985" total="1450">
<module_data filename="__bytecode.const" blob_name=".bytecode" blob_size="3" input_size="0" />
<module_data filename="__constants.const" blob_name="" blob_size="800" input_size="2037" />
<module_data filename="module.orisys.HHD.const" blob_name="orisys.HHD" blob_size="11474" input_size="15837" />
<module_data filename="module.orisys.Stitcher.const" blob_name="orisys.Stitcher" blob_size="6634" input_size="9431" />
<module_data filename="module.orisys.configs.const" blob_name="orisys.configs" blob_size="2966" input_size="4231" />
<module_data filename="module.orisys.const" blob_name="orisys" blob_size="612" input_size="1011" />
<module_data filename="module.orisys.get_depth.const" blob_name="orisys.get_depth" blob_size="5580" input_size="6725" />
<module_data filename="module.orisys.sensor.const" blob_name="orisys.sensor" blob_size="6946" input_size="10850" />
<module_data filename="module.orisys.tracker.const" blob_name="orisys.tracker" blob_size="2011" input_size="3419" />
<module_data filename="module.orisys.util.const" blob_name="orisys.util" blob_size="1793" input_size="2720" />
</data_composer>
<command_line>
<option value="--module" />
<option value="--include-package=orisys" />
<option value="--output-dir=build_nuitka" />
<option value="--remove-output" />
<option value="--no-pyi-file" />
<option value="src/orisys" />
</command_line>
<plugins>
<plugin name="anti-bloat" user_enabled="no" />
<plugin name="eventlet" user_enabled="no" />
<plugin name="gi" user_enabled="no" />
<plugin name="implicit-imports" user_enabled="no" />
<plugin name="options-nanny" user_enabled="no" />
<plugin name="pkg-resources" user_enabled="no" />
<plugin name="transformers" user_enabled="no" />
</plugins>
<distributions>
<distribution name="orisys" version="0.2.0" installer="conda" />
</distributions>
<python python_exe="${sys.prefix}\python.exe" python_flavor="Anaconda Python" python_version="3.10.19" os_name="Windows" os_release="11" arch_name="x86_64" filesystem_encoding="utf-8">
<search_path>
<path value="${cwd}" />
<path value="${cwd}\src" />
<path value="${sys.prefix}\DLLs" />
<path value="${sys.prefix}\lib" />
<path value="${sys.prefix}" />
<path value="${sys.prefix}\lib\site-packages" />
<path value="${sys.prefix}\lib\site-packages\setuptools\_vendor" />
</search_path>
</python>
<output run_filename="${cwd}\build_nuitka\orisys.cp310-win_amd64.pyd" />
</nuitka-compilation-report>
Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 KiB

+1 -1
View File
@@ -509,7 +509,7 @@ class Stitcher:
heights = [b[3] - b[1] for b in cropped_boxes]
median_height = np.median(heights) if heights else target_h
# Use a fraction of the box height as tolerance (e.g., 20% of box height)
row_tolerance = max(1, int(median_height * 0.2))
row_tolerance = max(1, int(median_height * 0.4))
# Quantize y-coordinates to group boxes into rows
def get_row_key(box):