This repository has been archived by the owner on Feb 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* absolute imports * update docstring * drop enlighten * update manifest * fixing CI: xos
- Loading branch information
Showing
23 changed files
with
62 additions
and
68 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
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 |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
Copyright (C) 2016-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
@@ -28,17 +27,17 @@ | |
|
||
# this is used while calling this file as a script | ||
sys.path += [os.path.abspath('.'), os.path.abspath('..')] # Add path to root | ||
from .utilities.data_io import ( | ||
from birl.utilities.data_io import ( | ||
update_path, create_folder, image_sizes, load_landmarks, load_image, save_image) | ||
from .utilities.dataset import image_histogram_matching, common_landmarks | ||
from .utilities.evaluate import ( | ||
from birl.utilities.dataset import image_histogram_matching, common_landmarks | ||
from birl.utilities.evaluate import ( | ||
compute_target_regist_error_statistic, compute_affine_transf_diff, compute_tre_robustness) | ||
from .utilities.experiments import ( | ||
from birl.utilities.experiments import ( | ||
nb_workers, exec_commands, string_dict, iterate_mproc_map, create_basic_parser, | ||
parse_arg_params, Experiment) | ||
from .utilities.drawing import ( | ||
from birl.utilities.drawing import ( | ||
export_figure, draw_image_points, draw_images_warped_landmarks, overlap_two_images) | ||
from .utilities.registration import estimate_affine_transform | ||
from birl.utilities.registration import estimate_affine_transform | ||
|
||
#: In case provided dataset and complete (true) dataset differ | ||
COL_PAIRED_LANDMARKS = 'Ration matched landmarks' | ||
|
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 |
---|---|---|
|
@@ -19,7 +19,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
# from __future__ import absolute_import | ||
|
||
import os | ||
import logging | ||
|
@@ -14,9 +13,9 @@ | |
from PIL import ImageDraw | ||
from matplotlib import colors as plt_colors, ticker as plt_ticker | ||
|
||
from .data_io import convert_ndarray2image | ||
from .dataset import scale_large_images_landmarks | ||
from .evaluate import compute_matrix_user_ranking | ||
from birl.utilities.data_io import convert_ndarray2image | ||
from birl.utilities.dataset import scale_large_images_landmarks | ||
from birl.utilities.evaluate import compute_matrix_user_ranking | ||
|
||
#: default figure size for visualisations | ||
MAX_FIGURE_SIZE = 18 # inches | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
Copyright (C) 2016-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
from itertools import chain | ||
from collections import Counter | ||
|
@@ -12,7 +11,7 @@ | |
import pandas as pd | ||
from scipy.spatial import distance | ||
|
||
from .registration import estimate_affine_transform, get_affine_components, norm_angle | ||
from birl.utilities.registration import estimate_affine_transform, get_affine_components, norm_angle | ||
|
||
|
||
def compute_tre(points_1, points_2): | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
Copyright (C) 2016-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
@@ -19,12 +18,12 @@ | |
import multiprocessing as mproc | ||
from functools import wraps | ||
|
||
import enlighten | ||
import tqdm | ||
import numpy as np | ||
from pathos.multiprocessing import ProcessPool | ||
|
||
from .data_io import create_folder, save_config_yaml, update_path | ||
from .dataset import CONVERT_RGB | ||
from birl.utilities.data_io import create_folder, save_config_yaml, update_path | ||
from birl.utilities.dataset import CONVERT_RGB | ||
|
||
#: number of available CPUs on this computer | ||
CPU_COUNT = int(mproc.cpu_count()) | ||
|
@@ -544,9 +543,8 @@ def iterate_mproc_map(wrap_func, iterate_vals, nb_workers=CPU_COUNT, desc=''): | |
nb_workers = CPU_COUNT if nb_workers < 0 else nb_workers | ||
|
||
if desc is not None: | ||
pbar = enlighten.Counter(total=len(iterate_vals), | ||
desc=str('%r @%i-threads' % (desc, nb_workers)), | ||
stream=sys.stderr) | ||
pbar = tqdm.tqdm(total=len(iterate_vals), | ||
desc=str('%r @%i-threads' % (desc, nb_workers))) | ||
else: | ||
pbar = None | ||
|
||
|
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
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
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 |
---|---|---|
|
@@ -72,7 +72,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -31,7 +31,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -56,7 +56,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -46,7 +46,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -37,7 +37,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -48,7 +48,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -62,7 +62,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -39,7 +39,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
Copyright (C) 2017-2019 Jiri Borovec <[email protected]> | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|