Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable image_codec_test with valid test data #413

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
id: cpu-cores
- name: check
working-directory: ${{github.workspace}}/build
run: ctest . --timeout 2400 -C Debug -j ${{steps.cpu-cores.outputs.count}} -E "image_codec_test|ts" --output-on-failure
run: ctest . --timeout 2400 -C Debug -j ${{steps.cpu-cores.outputs.count}} -E "ts" --output-on-failure
# --rerun-failed --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ jobs:

- name: Check
working-directory: ./build
run: ctest . -j`nproc` -E image_codec_test\|ts --rerun-failed --output-on-failure
run: ctest . -j`nproc` -E ts --rerun-failed --output-on-failure

2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
run: cmake --build ${{github.workspace}}/build -j `sysctl -n hw.ncpu` --config Release
- name: Check
working-directory: ${{github.workspace}}/build
run: ctest --timeout 120 -C Release -j `sysctl -n hw.ncpu` -E image_codec_test\|ts
run: ctest --timeout 120 -C Release -j `sysctl -n hw.ncpu` -E ts
6 changes: 3 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure
working-directory: ${{github.workspace}}/build
run: cmake ${{github.workspace}} -DOPENMIND_BUILD_SAMPLES=OFF -DOPENMIND_BUILD_TESTS=ON -DOPENMIND_USE_OPENCL=OFF -G "Ninja Multi-Config"
run: cmake ${{github.workspace}} -DOPENMIND_BUILD_SAMPLES=OFF -DOPENMIND_BUILD_TESTS=ON -DOPENMIND_USE_OPENCL=OFF -DENABLE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug -G "Ninja Multi-Config"
# - name: Install prerequisites
# working-directory: ${{github.workspace}}/build
# run: cmake --build ${{github.workspace}}/build --target prerequisites -j `nproc`
Expand All @@ -37,10 +37,10 @@ jobs:
run: cmake --build ${{github.workspace}}/build -j `nproc` --config Debug
- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j`nproc` -C Debug -E "image_codec_test|ts" --rerun-failed --output-on-failure
run: ctest . -j`nproc` -C Debug -E "ts" --rerun-failed --output-on-failure
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build -j `nproc` --config Release
- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j`nproc` -C Release -E "image_codec_test|ts" --rerun-failed --output-on-failure
run: ctest . -j`nproc` -C Release -E "ts" --rerun-failed --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ jobs:

- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j ${{steps.cpu-cores.outputs.count}} -E "image_codec_test|ts" --rerun-failed --output-on-failure
run: ctest . -j ${{steps.cpu-cores.outputs.count}} -E "ts" --rerun-failed --output-on-failure
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:

- name: make check Release
working-directory: ${{github.workspace}}/build
run: ctest --timeout 1024 -C Release -j ${{steps.cpu-cores.outputs.count}} -E "image_codec_test|ts" --output-on-failure
run: ctest --timeout 1024 -C Release -j ${{steps.cpu-cores.outputs.count}} -E "ts" --output-on-failure
# --rerun-failed --output-on-failure

- name: make check Debug
working-directory: ${{github.workspace}}/build
run: ctest --timeout 2048 -C Debug -j ${{steps.cpu-cores.outputs.count}} -E "image_codec_test|ts" --output-on-failure
run: ctest --timeout 2048 -C Debug -j ${{steps.cpu-cores.outputs.count}} -E "ts" --output-on-failure
# --rerun-failed --output-on-failure

- name: Install
Expand Down
Binary file modified omnn/extrapolator/test/g.tga
Binary file not shown.
Binary file modified omnn/extrapolator/test/gresized.tga
Binary file not shown.
21 changes: 21 additions & 0 deletions omnn/extrapolator/test/test_image_generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import numpy as np
from PIL import Image

# Create a 2x2 test image with RGBA channels
img_data = np.zeros((2, 2, 4), dtype=np.uint8)

# Set some test patterns
img_data[0,0] = [255, 0, 0, 255] # Red
img_data[0,1] = [0, 255, 0, 255] # Green
img_data[1,0] = [0, 0, 255, 255] # Blue
img_data[1,1] = [255, 255, 255, 255] # White

# Create PIL Image
img = Image.fromarray(img_data, 'RGBA')

# Save as TGA
img.save('g.tga')

# Create a slightly larger resized version (4x4)
img_resized = img.resize((4, 4), Image.Resampling.NEAREST)
img_resized.save('gresized.tga')
Loading