Skip to content
This repository was archived by the owner on Feb 11, 2023. It is now read-only.

Commit 8be429a

Browse files
committed
rename package
* refactor circleCI * update setup.py
1 parent 8d78d68 commit 8be429a

34 files changed

+176
-155
lines changed

.shippable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ install:
3838
script:
3939
- mkdir results
4040
# - nosetests --with-xunit --xunit-file=shippable/testresults/nosetests.xml
41-
- nosetests -v --exe --with-doctest --with-coverage --with-xunit --cover-package=benchmark --xunit-file=shippable/testresults/nosetests.xml
41+
- nosetests -v --exe --with-doctest --with-coverage --with-xunit --cover-package=birl --xunit-file=shippable/testresults/nosetests.xml
4242

4343
after_success:
4444
- codecov

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ script:
3737
- tox
3838
- mkdir results
3939
- python bm_experiments/bm_comp_perform.py -o ./results -n 1
40-
- python benchmark/bm_template.py -c ./data_images/pairs-imgs-lnds_mix.csv -o ./results --visual --unique --an_executable none
41-
- python benchmark/bm_template.py -c ./data_images/pairs-imgs-lnds_anhir.csv -d ./data_images -o ./results --an_executable none
40+
- python birl/bm_template.py -c ./data_images/pairs-imgs-lnds_mix.csv -o ./results --visual --unique --an_executable none
41+
- python birl/bm_template.py -c ./data_images/pairs-imgs-lnds_anhir.csv -d ./data_images -o ./results --an_executable none
4242
- python bm_experiments/evaluate_experiment.py -d ./data_images -e ./results/BmTemplate --visual
4343

4444
after_success:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ For each registration method, different experiments can be performed independent
140140
Sample execution of the "empty" benchmark template:
141141
```bash
142142
mkdir results
143-
python benchmark/bm_template.py \
143+
python birl/bm_template.py \
144144
-c ./data_images/pairs-imgs-lnds_mix.csv \
145145
-o ./results \
146146
--an_executable none \
147147
--unique --visual
148148
```
149149
or with relative paths:
150150
```bash
151-
python benchmark/bm_template.py \
151+
python birl/bm_template.py \
152152
-c ./data_images/pairs-imgs-lnds_anhir.csv \
153153
-d ./data_images \
154154
-o ./results \
@@ -165,7 +165,7 @@ This script generate simple report exported in JSON file on given output path.
165165

166166
### Add custom registration method
167167

168-
The only limitation of adding costume image registration methods that it has to be launched from python script or command line. The new registration benchmark should be inherited from [ImRegBenchmark](benchmark/cls_benchmark.py) as for example [BmTemplate](benchmark/bm_template.py).
168+
The only limitation of adding costume image registration methods that it has to be launched from python script or command line. The new registration benchmark should be inherited from [ImRegBenchmark](birl/cls_benchmark.py) as for example [BmTemplate](birl/bm_template.py).
169169

170170
The benchmark workflow is the following:
171171
1. `self._prepare()` prepare the experiment, e.g. create experiment folder, copy configurations, etc.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ test_script:
6565
- tox
6666
- mkdir results
6767
- python bm_experiments/bm_comp_perform.py -o ./results -n 1
68-
- python benchmark/bm_template.py -c ./data_images/pairs-imgs-lnds_mix.csv -o ./results --unique --visual --an_executable none
68+
- python birl/bm_template.py -c ./data_images/pairs-imgs-lnds_mix.csv -o ./results --unique --visual --an_executable none
6969

7070
on_success:
7171
- coverage report

benchmark/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

birl/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import birl.utilities
2+
3+
birl.utilities
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
EXAMPLE (usage):
99
>> mkdir ./results
10-
>> python benchmark/bm_template.py \
10+
>> python birl/bm_template.py \
1111
-c ./data_images/pairs-imgs-lnds_anhir.csv -d ./data_images \
1212
-o ./results --visual --unique \
1313
--an_executable none
@@ -21,9 +21,8 @@
2121
import logging
2222

2323
sys.path += [os.path.abspath('.'), os.path.abspath('..')] # Add path to root
24-
from benchmark.utilities.experiments import create_basic_parse, parse_arg_params
25-
from benchmark.cls_benchmark import (
26-
ImRegBenchmark, COL_REG_DIR, COL_IMAGE_MOVE, COL_POINTS_MOVE)
24+
from birl.utilities.experiments import create_basic_parse, parse_arg_params
25+
from birl.cls_benchmark import ImRegBenchmark, COL_REG_DIR, COL_IMAGE_MOVE, COL_POINTS_MOVE
2726

2827

2928
def extend_parse(a_parser):
@@ -58,7 +57,7 @@ class BmTemplate(ImRegBenchmark):
5857
image and landmarks. It means that there was no registration performed.
5958
6059
Running in single thread:
61-
>>> from benchmark.utilities.data_io import create_folder, update_path
60+
>>> from birl.utilities.data_io import create_folder, update_path
6261
>>> path_out = create_folder('temp_results')
6362
>>> path_csv = os.path.join(update_path('data_images'), 'pairs-imgs-lnds_mix.csv')
6463
>>> main({'nb_workers': 1, 'unique': False, 'visual': True,
@@ -69,7 +68,7 @@ class BmTemplate(ImRegBenchmark):
6968
>>> shutil.rmtree(path_out, ignore_errors=True)
7069
7170
Running in multiple parallel threads:
72-
>>> from benchmark.utilities.data_io import create_folder, update_path
71+
>>> from birl.utilities.data_io import create_folder, update_path
7372
>>> path_out = create_folder('temp_results')
7473
>>> path_csv = os.path.join(update_path('data_images'), 'pairs-imgs-lnds_mix.csv')
7574
>>> params = {'nb_workers': 2, 'unique': False, 'visual': True,
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
import pandas as pd
2525

2626
sys.path += [os.path.abspath('.'), os.path.abspath('..')] # Add path to root
27-
from benchmark.utilities.data_io import (
27+
from birl.utilities.data_io import (
2828
update_path, create_folder, image_size, load_landmarks, load_image, save_image)
29-
from benchmark.utilities.experiments import (
29+
from birl.utilities.experiments import (
3030
run_command_line, string_dict, compute_points_dist_statistic, wrap_execute_sequence)
31-
from benchmark.utilities.visualisation import (
31+
from birl.utilities.visualisation import (
3232
export_figure, draw_image_points, draw_images_warped_landmarks)
33-
from benchmark.utilities.cls_experiment import Experiment
33+
from birl.utilities.cls_experiment import Experiment
3434

3535
#: number of available threads on this computer
3636
NB_THREADS = int(mproc.cpu_count())
@@ -130,7 +130,7 @@ class ImRegBenchmark(Experiment):
130130
is alignment (consistent warping) between resulting landmarks and image.
131131
132132
Running in single thread:
133-
>>> from benchmark.utilities.data_io import create_folder, update_path
133+
>>> from birl.utilities.data_io import create_folder, update_path
134134
>>> path_out = create_folder('temp_results')
135135
>>> path_csv = os.path.join(update_path('data_images'), 'pairs-imgs-lnds_mix.csv')
136136
>>> params = {'nb_workers': 1, 'unique': False, 'visual': True,
@@ -143,7 +143,7 @@ class ImRegBenchmark(Experiment):
143143
>>> shutil.rmtree(path_out, ignore_errors=True)
144144
145145
Running in multiple parallel threads:
146-
>>> from benchmark.utilities.data_io import create_folder, update_path
146+
>>> from birl.utilities.data_io import create_folder, update_path
147147
>>> path_out = create_folder('temp_results')
148148
>>> path_csv = os.path.join(update_path('data_images'), 'pairs-imgs-lnds_mix.csv')
149149
>>> params = {'nb_workers': 2, 'unique': False, 'visual': True,
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
from numpy.testing import assert_raises, assert_array_almost_equal
2323

2424
sys.path += [os.path.abspath('.'), os.path.abspath('..')] # Add path to root
25-
from benchmark.utilities.data_io import update_path
26-
from benchmark.utilities.dataset import args_expand_parse_images
27-
from benchmark.utilities.experiments import (parse_arg_params, try_decorator)
28-
from benchmark.cls_benchmark import ImRegBenchmark
29-
from benchmark.cls_benchmark import (
25+
from birl.utilities.data_io import update_path
26+
from birl.utilities.dataset import args_expand_parse_images
27+
from birl.utilities.experiments import (parse_arg_params, try_decorator)
28+
from birl.cls_benchmark import ImRegBenchmark
29+
from birl.cls_benchmark import (
3030
NAME_CSV_RESULTS, NAME_TXT_RESULTS, NAME_CSV_REGISTRATION_PAIRS, COVER_COLUMNS,
3131
COL_IMAGE_MOVE_WARP, COL_POINTS_REF_WARP, COL_POINTS_MOVE_WARP,
3232
_visual_image_move_warp_lnds_move_warp, _visual_image_ref_warp_lnds_move_warp,
3333
visualise_registration)
34-
from benchmark.bm_template import BmTemplate
34+
from birl.bm_template import BmTemplate
3535

3636
PATH_DATA = update_path('data_images')
3737
PATH_CSV_COVER_MIX = os.path.join(PATH_DATA, 'pairs-imgs-lnds_mix.csv')

0 commit comments

Comments
 (0)