trainingsample 0.2.8__tar.gz → 0.2.10__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.
- {trainingsample-0.2.8 → trainingsample-0.2.10}/.github/workflows/publish.yml +4 -6
- {trainingsample-0.2.8 → trainingsample-0.2.10}/Cargo.lock +6 -6
- {trainingsample-0.2.8 → trainingsample-0.2.10}/Cargo.toml +1 -1
- {trainingsample-0.2.8 → trainingsample-0.2.10}/PKG-INFO +1 -1
- {trainingsample-0.2.8 → trainingsample-0.2.10}/pyproject.toml +1 -1
- {trainingsample-0.2.8 → trainingsample-0.2.10}/scripts/build-opencv-static.sh +67 -5
- {trainingsample-0.2.8 → trainingsample-0.2.10}/.cargo/config.toml +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/.envrc +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/.github/workflows/ci.yml +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/.gitignore +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/.pre-commit-config.yaml +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/.rustfmt.toml +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/BENCHMARKS.md +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/Dockerfile +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/LICENSE +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/README.md +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/clippy.toml +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/docs/API_COMPAT_CV2.md +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/docs/BUILDING_STATIC_OPENCV.md +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/rust-toolchain.toml +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/scripts/run_competitive_benchmarks.sh +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/setup-env.sh +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/core.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/cropping.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/cv_batch_ops.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/cv_batch_ops_optimized.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/cv_compat.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/format_conversion_simd.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/lib.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/loading.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/luminance.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/luminance_simd.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/opencv_ops.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/python_bindings.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/tests.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/src/true_batch_ops.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/tests/__init__.py +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/tests/comprehensive_tests.rs +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/tests/test_comprehensive.py +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/tests/test_performance_benchmarks.py +0 -0
- {trainingsample-0.2.8 → trainingsample-0.2.10}/tests/test_python_bindings.py +0 -0
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
uses: actions/cache@v4
|
|
42
42
|
with:
|
|
43
43
|
path: third_party/opencv-static
|
|
44
|
-
key: opencv-static-4.12.0-no-itt-no-openjpeg-linux-${{ matrix.os }}-${{ runner.arch }}-${{ matrix.manylinux }}
|
|
44
|
+
key: opencv-static-4.12.0-codecs-jasper-no-itt-no-openjpeg-linux-${{ matrix.os }}-${{ runner.arch }}-${{ matrix.manylinux }}
|
|
45
45
|
|
|
46
46
|
- name: Install build dependencies
|
|
47
47
|
run: |
|
|
@@ -84,7 +84,6 @@ jobs:
|
|
|
84
84
|
echo "LLVM config at: $(which llvm-config-14 2>/dev/null || which llvm-config-18 2>/dev/null)"
|
|
85
85
|
|
|
86
86
|
- name: Build static OpenCV
|
|
87
|
-
if: steps.cache-opencv.outputs.cache-hit != 'true'
|
|
88
87
|
run: |
|
|
89
88
|
./scripts/build-opencv-static.sh
|
|
90
89
|
|
|
@@ -105,7 +104,7 @@ jobs:
|
|
|
105
104
|
# OpenCV static linking configuration
|
|
106
105
|
OPENCV_INCLUDE_PATHS: ${{ github.workspace }}/third_party/opencv-static/include/opencv4
|
|
107
106
|
OPENCV_LINK_PATHS: ${{ github.workspace }}/third_party/opencv-static/lib
|
|
108
|
-
OPENCV_LINK_LIBS: static=opencv_world,static=stdc++
|
|
107
|
+
OPENCV_LINK_LIBS: static=opencv_world,static=jpeg,static=png,static=tiff,static=webp,static=z,static=jasper,static=stdc++
|
|
109
108
|
OPENCV_DISABLE_PROBES: pkg_config,cmake,vcpkg,vcpkg_cmake
|
|
110
109
|
|
|
111
110
|
- name: Upload wheels
|
|
@@ -131,7 +130,7 @@ jobs:
|
|
|
131
130
|
uses: actions/cache@v4
|
|
132
131
|
with:
|
|
133
132
|
path: third_party/opencv-static
|
|
134
|
-
key: opencv-static-4.12.0-no-itt-no-openjpeg-macos-${{ runner.os }}-${{ runner.arch }}
|
|
133
|
+
key: opencv-static-4.12.0-codecs-jasper-no-itt-no-openjpeg-macos-${{ runner.os }}-${{ runner.arch }}
|
|
135
134
|
|
|
136
135
|
- name: Install build dependencies
|
|
137
136
|
run: |
|
|
@@ -143,7 +142,6 @@ jobs:
|
|
|
143
142
|
echo "DYLD_LIBRARY_PATH=/opt/homebrew/opt/llvm/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
|
|
144
143
|
|
|
145
144
|
- name: Build static OpenCV
|
|
146
|
-
if: steps.cache-opencv.outputs.cache-hit != 'true'
|
|
147
145
|
run: |
|
|
148
146
|
./scripts/build-opencv-static.sh
|
|
149
147
|
|
|
@@ -159,7 +157,7 @@ jobs:
|
|
|
159
157
|
# OpenCV static linking configuration
|
|
160
158
|
OPENCV_INCLUDE_PATHS: ${{ github.workspace }}/third_party/opencv-static/include/opencv4
|
|
161
159
|
OPENCV_LINK_PATHS: ${{ github.workspace }}/third_party/opencv-static/lib
|
|
162
|
-
OPENCV_LINK_LIBS: static=opencv_world,framework=Accelerate,dylib=c++
|
|
160
|
+
OPENCV_LINK_LIBS: static=opencv_world,static=jpeg,static=png,static=tiff,static=webp,static=z,static=jasper,framework=Accelerate,dylib=c++
|
|
163
161
|
OPENCV_DISABLE_PROBES: pkg_config,cmake,vcpkg,vcpkg_cmake
|
|
164
162
|
- name: Upload wheels
|
|
165
163
|
uses: actions/upload-artifact@v4
|
|
@@ -135,9 +135,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|
|
135
135
|
|
|
136
136
|
[[package]]
|
|
137
137
|
name = "bitflags"
|
|
138
|
-
version = "2.
|
|
138
|
+
version = "2.10.0"
|
|
139
139
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
140
|
-
checksum = "
|
|
140
|
+
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
|
|
141
141
|
|
|
142
142
|
[[package]]
|
|
143
143
|
name = "bitstream-io"
|
|
@@ -840,7 +840,7 @@ version = "0.27.0"
|
|
|
840
840
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
841
841
|
checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25"
|
|
842
842
|
dependencies = [
|
|
843
|
-
"bitflags 2.
|
|
843
|
+
"bitflags 2.10.0",
|
|
844
844
|
"block",
|
|
845
845
|
"core-graphics-types",
|
|
846
846
|
"foreign-types",
|
|
@@ -1164,7 +1164,7 @@ version = "0.18.0"
|
|
|
1164
1164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1165
1165
|
checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0"
|
|
1166
1166
|
dependencies = [
|
|
1167
|
-
"bitflags 2.
|
|
1167
|
+
"bitflags 2.10.0",
|
|
1168
1168
|
"crc32fast",
|
|
1169
1169
|
"fdeflate",
|
|
1170
1170
|
"flate2",
|
|
@@ -1488,7 +1488,7 @@ version = "1.1.2"
|
|
|
1488
1488
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1489
1489
|
checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
|
|
1490
1490
|
dependencies = [
|
|
1491
|
-
"bitflags 2.
|
|
1491
|
+
"bitflags 2.10.0",
|
|
1492
1492
|
"errno",
|
|
1493
1493
|
"libc",
|
|
1494
1494
|
"linux-raw-sys",
|
|
@@ -1746,7 +1746,7 @@ dependencies = [
|
|
|
1746
1746
|
|
|
1747
1747
|
[[package]]
|
|
1748
1748
|
name = "trainingsample"
|
|
1749
|
-
version = "0.2.
|
|
1749
|
+
version = "0.2.10"
|
|
1750
1750
|
dependencies = [
|
|
1751
1751
|
"anyhow",
|
|
1752
1752
|
"criterion",
|
|
@@ -14,7 +14,7 @@ description = "High-performance Rust reimplementation of GIL-blocking video/imag
|
|
|
14
14
|
license = {text = "MIT"}
|
|
15
15
|
name = "trainingsample"
|
|
16
16
|
requires-python = ">=3.11"
|
|
17
|
-
version = "0.2.
|
|
17
|
+
version = "0.2.10"
|
|
18
18
|
|
|
19
19
|
[project.optional-dependencies]
|
|
20
20
|
dev = ["pytest>=6.0", "pytest-benchmark", "maturin>=1.0,<2.0", "pre-commit"]
|
|
@@ -10,7 +10,7 @@ PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
|
10
10
|
BUILD_DIR="${PROJECT_ROOT}/opencv-build-tmp"
|
|
11
11
|
INSTALL_DIR="${PROJECT_ROOT}/third_party/opencv-static"
|
|
12
12
|
SIGNATURE_FILE="${INSTALL_DIR}/build_signature.txt"
|
|
13
|
-
BUILD_SIGNATURE="opencv-${OPENCV_VERSION}-static-no-itt-no-openjpeg"
|
|
13
|
+
BUILD_SIGNATURE="opencv-${OPENCV_VERSION}-static-codecs-jasper-no-itt-no-openjpeg"
|
|
14
14
|
|
|
15
15
|
echo "Building static OpenCV ${OPENCV_VERSION}..."
|
|
16
16
|
echo "Install directory: ${INSTALL_DIR}"
|
|
@@ -46,6 +46,19 @@ cmake -S "opencv-${OPENCV_VERSION}" \
|
|
|
46
46
|
-DBUILD_LIST=core,imgproc,imgcodecs,highgui,video,videoio,calib3d,features2d,photo \
|
|
47
47
|
-DBUILD_SHARED_LIBS=OFF \
|
|
48
48
|
-DBUILD_opencv_world=ON \
|
|
49
|
+
-DOPENCV_FORCE_3RDPARTY_BUILD=ON \
|
|
50
|
+
-DBUILD_JPEG=ON \
|
|
51
|
+
-DBUILD_PNG=ON \
|
|
52
|
+
-DBUILD_TIFF=ON \
|
|
53
|
+
-DBUILD_WEBP=ON \
|
|
54
|
+
-DBUILD_ZLIB=ON \
|
|
55
|
+
-DBUILD_JASPER=ON \
|
|
56
|
+
-DWITH_JPEG=ON \
|
|
57
|
+
-DWITH_PNG=ON \
|
|
58
|
+
-DWITH_TIFF=ON \
|
|
59
|
+
-DWITH_WEBP=ON \
|
|
60
|
+
-DWITH_ZLIB=ON \
|
|
61
|
+
-DWITH_JASPER=ON \
|
|
49
62
|
-DBUILD_TESTS=OFF \
|
|
50
63
|
-DBUILD_PERF_TESTS=OFF \
|
|
51
64
|
-DBUILD_EXAMPLES=OFF \
|
|
@@ -60,6 +73,7 @@ cmake -S "opencv-${OPENCV_VERSION}" \
|
|
|
60
73
|
-DWITH_V4L=OFF \
|
|
61
74
|
-DWITH_GTK=OFF \
|
|
62
75
|
-DWITH_QT=OFF \
|
|
76
|
+
-DWITH_OPENEXR=OFF \
|
|
63
77
|
-DWITH_ITT=OFF \
|
|
64
78
|
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
|
|
65
79
|
|
|
@@ -71,12 +85,41 @@ cmake --build build --config Release --target opencv_world -j$(nproc 2>/dev/null
|
|
|
71
85
|
echo "Installing to ${INSTALL_DIR}..."
|
|
72
86
|
cmake --install build --config Release
|
|
73
87
|
|
|
88
|
+
# Copy bundled third-party codec archives into the install lib directory and
|
|
89
|
+
# provide canonical aliases (libjpeg.a, libwebp.a, …) for the linker.
|
|
90
|
+
CODEC_LIB_DIR="${BUILD_DIR}/build/3rdparty/lib"
|
|
91
|
+
mkdir -p "${INSTALL_DIR}/lib"
|
|
92
|
+
|
|
93
|
+
declare -a CODEC_MAPPINGS=(
|
|
94
|
+
"liblibjpeg-turbo.a:libjpeg.a"
|
|
95
|
+
"liblibpng.a:libpng.a"
|
|
96
|
+
"liblibtiff.a:libtiff.a"
|
|
97
|
+
"liblibwebp.a:libwebp.a"
|
|
98
|
+
"libzlib.a:libz.a"
|
|
99
|
+
"liblibjasper.a:libjasper.a"
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
for mapping in "${CODEC_MAPPINGS[@]}"; do
|
|
103
|
+
SRC_ARCHIVE="${CODEC_LIB_DIR}/${mapping%%:*}"
|
|
104
|
+
CANONICAL_NAME="${mapping%%:*}"
|
|
105
|
+
LINK_NAME="${mapping##*:}"
|
|
106
|
+
|
|
107
|
+
if [ ! -f "${SRC_ARCHIVE}" ]; then
|
|
108
|
+
echo "ERROR: Expected third-party archive ${SRC_ARCHIVE} was not produced by the OpenCV build"
|
|
109
|
+
find "${CODEC_LIB_DIR}" -maxdepth 1 -type f -name 'lib*.a' | sed "s#^# #"
|
|
110
|
+
exit 1
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
cp -f "${SRC_ARCHIVE}" "${INSTALL_DIR}/lib/${CANONICAL_NAME}"
|
|
114
|
+
ln -sf "${CANONICAL_NAME}" "${INSTALL_DIR}/lib/${LINK_NAME}"
|
|
115
|
+
done
|
|
116
|
+
|
|
74
117
|
# Verify installation - check both lib and lib64 (manylinux uses lib64)
|
|
75
|
-
if [ -
|
|
76
|
-
# Move from lib64 to lib for consistency
|
|
118
|
+
if [ -d "${INSTALL_DIR}/lib64" ]; then
|
|
119
|
+
# Move from lib64 to lib for consistency (copy to handle reruns safely)
|
|
77
120
|
mkdir -p "${INSTALL_DIR}/lib"
|
|
78
|
-
|
|
79
|
-
|
|
121
|
+
cp -a "${INSTALL_DIR}/lib64/." "${INSTALL_DIR}/lib/"
|
|
122
|
+
rm -rf "${INSTALL_DIR}/lib64"
|
|
80
123
|
fi
|
|
81
124
|
|
|
82
125
|
if [ ! -f "${INSTALL_DIR}/lib/libopencv_world.a" ]; then
|
|
@@ -86,6 +129,25 @@ if [ ! -f "${INSTALL_DIR}/lib/libopencv_world.a" ]; then
|
|
|
86
129
|
exit 1
|
|
87
130
|
fi
|
|
88
131
|
|
|
132
|
+
# Ensure third-party codecs were produced as static archives
|
|
133
|
+
REQUIRED_ARCHIVES=(
|
|
134
|
+
"libjpeg.a"
|
|
135
|
+
"libpng.a"
|
|
136
|
+
"libtiff.a"
|
|
137
|
+
"libwebp.a"
|
|
138
|
+
"libz.a"
|
|
139
|
+
"libjasper.a"
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
for archive in "${REQUIRED_ARCHIVES[@]}"; do
|
|
143
|
+
if [ ! -f "${INSTALL_DIR}/lib/${archive}" ]; then
|
|
144
|
+
echo "ERROR: Required static archive ${archive} not found in ${INSTALL_DIR}/lib"
|
|
145
|
+
echo "Available archives:"
|
|
146
|
+
find "${INSTALL_DIR}" -maxdepth 2 -type f -name 'lib*.a' | sed "s#^# #"
|
|
147
|
+
exit 1
|
|
148
|
+
fi
|
|
149
|
+
done
|
|
150
|
+
|
|
89
151
|
printf '%s\n' "${BUILD_SIGNATURE}" > "${SIGNATURE_FILE}"
|
|
90
152
|
|
|
91
153
|
echo "Static OpenCV built successfully!"
|
|
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
|