-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move kodak data and morie tests for datasets
- Loading branch information
1 parent
b68a9f0
commit 28a89d1
Showing
38 changed files
with
83 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import os | ||
import glob | ||
|
||
dir = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
KODAK_IMAGES = glob.glob(os.path.join(dir, '*')) | ||
# remove and folders | ||
KODAK_IMAGES = [f for f in KODAK_IMAGES if os.path.isfile(f)] | ||
KODAK_IMAGES.sort() |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
from IQM_Vis.examples.multiple import run | ||
from IQM_Vis.examples.simple import run | ||
from IQM_Vis.examples.dataset import run | ||
from IQM_Vis.examples.all import run | ||
from IQM_Vis.examples.kodak import run | ||
import IQM_Vis.examples.images | ||
import IQM_Vis.examples.kodak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,14 @@ | |
# Author: Matt Clifford <[email protected]> | ||
# License: BSD 3-Clause License | ||
|
||
import os | ||
import glob | ||
import IQM_Vis | ||
from IQM_Vis.examples.KODAK_dataset import KODAK_IMAGES | ||
|
||
def run(): | ||
file_path = os.path.dirname(os.path.abspath(__file__)) | ||
dir = os.path.join(file_path, 'KODAK-dataset') | ||
image_list = glob.glob(os.path.join(dir, '*')) | ||
# remove and folders | ||
image_list = [f for f in image_list if os.path.isfile(f)] | ||
image_list.sort() | ||
|
||
metrs = IQM_Vis.metrics.get_all_metrics() | ||
if '1-MS_SSIM' in metrs: | ||
metrs.pop('1-MS_SSIM') | ||
data = IQM_Vis.dataset_holder(image_list, | ||
data = IQM_Vis.dataset_holder(KODAK_IMAGES, | ||
metrs, | ||
# IQM_Vis.metrics.get_all_metric_images() | ||
) | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Author: Matt Clifford <[email protected]> | ||
# License: BSD 3-Clause License | ||
|
||
from tests.QtBot_utils import BotTester | ||
import IQM_Vis | ||
|
||
import sys | ||
import os | ||
sys.path.append(os.path.abspath('..')) | ||
|
||
|
||
def get_UI(): | ||
app = IQM_Vis.make_UI(test=True, debug=True) | ||
return app | ||
|
||
|
||
build_IQM_Vis = BotTester(get_UI=get_UI).build_IQM_Vis | ||
|
||
|
||
def test_dev_true(build_IQM_Vis): | ||
test_window, _ = build_IQM_Vis | ||
assert test_window.showing == True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# Author: Matt Clifford <[email protected]> | ||
# License: BSD 3-Clause License | ||
from PyQt6 import QtTest, QtCore | ||
|
||
import IQM_Vis | ||
import sys | ||
import os | ||
sys.path.append(os.path.abspath('..')) | ||
import IQM_Vis.examples.KODAK_dataset | ||
from tests.QtBot_utils import BotTester | ||
|
||
|
||
def get_UI(): | ||
image1 = IQM_Vis.examples.images.IMAGE1 | ||
image2 = IQM_Vis.examples.images.IMAGE2 | ||
images = [image1, image2] | ||
images = IQM_Vis.examples.KODAK_dataset.KODAK_IMAGES | ||
|
||
MAE = IQM_Vis.metrics.MAE() | ||
MSE = IQM_Vis.metrics.MSE() | ||
|
@@ -44,14 +45,49 @@ def get_UI(): | |
test_app = IQM_Vis.make_UI(transformations=transformations, | ||
image_list=images, | ||
metrics=metrics, | ||
metric_images=metric_images, | ||
# metric_images=metric_images, | ||
test=True) | ||
return test_app | ||
|
||
|
||
build_IQM_Vis = BotTester(get_UI=get_UI, wait_time=1000, | ||
final_wait=True).build_IQM_Vis | ||
|
||
def test_sliders(build_IQM_Vis): | ||
def test_dataset_scrolling(build_IQM_Vis): | ||
test_window, qtbotbis = build_IQM_Vis | ||
assert test_window.showing == True | ||
|
||
QtTest.QTest.qWait(500) | ||
|
||
# cycle the dataset backwards | ||
for _ in range(2): | ||
button = test_window.window.widget_controls['button']['prev_data'] | ||
qtbotbis.mouseClick(button, QtCore.Qt.MouseButton.LeftButton) | ||
QtTest.QTest.qWait(500) | ||
# check not crashed | ||
assert test_window.showing == True | ||
|
||
# click on an image to change the image | ||
for i in range(1,5): | ||
image = test_window.window.widget_controls['images'][i] | ||
qtbotbis.mouseClick(image, QtCore.Qt.MouseButton.LeftButton) | ||
QtTest.QTest.qWait(500) | ||
|
||
# cycle the dataset forwards | ||
for _ in range(3): | ||
button = test_window.window.widget_controls['button']['prev_data'] | ||
qtbotbis.mouseClick(button, QtCore.Qt.MouseButton.LeftButton) | ||
QtTest.QTest.qWait(500) | ||
# check not crashed | ||
assert test_window.showing == True | ||
|
||
# click on an image to change the image | ||
for i in range(1,5): | ||
image = test_window.window.widget_controls['images'][i] | ||
qtbotbis.mouseClick(image, QtCore.Qt.MouseButton.LeftButton) | ||
QtTest.QTest.qWait(500) | ||
# check not crashed | ||
assert test_window.showing == True | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="13" time="27.636" timestamp="2024-10-09T16:14:46.626846" hostname="Dell-5320"><testcase classname="tests.test_metrics" name="test_all_metrics_initialise" time="0.247" /><testcase classname="tests.test_metrics" name="test_all_metrics_images_initialise" time="0.252" /><testcase classname="tests.test_metrics" name="test_all_metrics_process_image" time="2.069" /><testcase classname="tests.test_metrics" name="test_all_metric_images_process_image" time="0.280" /><testcase classname="tests.test_transforms" name="test_all_transforms_init_value_no_change_image" time="0.259" /><testcase classname="tests.test_transforms" name="test_all_transforms_min_max_specified" time="0.256" /><testcase classname="tests.test_transforms" name="test_all_transforms_min_change_image" time="0.301" /><testcase classname="tests.test_transforms" name="test_all_transforms_max_change_image" time="0.359" /><testcase classname="tests.UI.test_sliders" name="test_sliders" time="3.176" /><testcase classname="tests.notebook_examples.test_1_making_the_UI" name="test_build_1" time="3.073" /><testcase classname="tests.notebook_examples.test_2_simple_customisation" name="test_build_1" time="3.203" /><testcase classname="tests.notebook_examples.test_3_customisation_details" name="test_build_3" time="3.173" /><testcase classname="tests.notebook_examples.test_4_experiment" name="test_experiment_runs" time="8.071" /></testsuite></testsuites> | ||
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="14" time="37.058" timestamp="2024-10-09T16:59:53.362008" hostname="Dell-5320"><testcase classname="tests.test_metrics" name="test_all_metrics_initialise" time="0.215" /><testcase classname="tests.test_metrics" name="test_all_metrics_images_initialise" time="0.208" /><testcase classname="tests.test_metrics" name="test_all_metrics_process_image" time="1.927" /><testcase classname="tests.test_metrics" name="test_all_metric_images_process_image" time="0.238" /><testcase classname="tests.test_transforms" name="test_all_transforms_init_value_no_change_image" time="0.235" /><testcase classname="tests.test_transforms" name="test_all_transforms_min_max_specified" time="0.233" /><testcase classname="tests.test_transforms" name="test_all_transforms_min_change_image" time="0.253" /><testcase classname="tests.test_transforms" name="test_all_transforms_max_change_image" time="0.295" /><testcase classname="tests.UI.test_check_args" name="test_dev_true" time="2.859" /><testcase classname="tests.UI.test_dataset_scrolling" name="test_dataset_scrolling" time="11.077" /><testcase classname="tests.notebook_examples.test_1_making_the_UI" name="test_build_1" time="2.855" /><testcase classname="tests.notebook_examples.test_2_simple_customisation" name="test_build_1" time="2.980" /><testcase classname="tests.notebook_examples.test_3_customisation_details" name="test_build_3" time="2.903" /><testcase classname="tests.notebook_examples.test_4_experiment" name="test_experiment_runs" time="7.946" /></testsuite></testsuites> |
Oops, something went wrong.