radnn 0.0.7.2__py3-none-any.whl → 0.0.7.3__py3-none-any.whl
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.
- radnn/__init__.py +5 -4
- radnn/core.py +44 -28
- radnn/data/__init__.py +6 -0
- radnn/data/data_feed.py +142 -0
- radnn/data/dataset_base.py +3 -5
- radnn/data/image_dataset.py +0 -2
- radnn/data/preprocess/normalizer.py +7 -1
- radnn/data/preprocess/standardizer.py +9 -2
- radnn/data/sample_set.py +30 -17
- radnn/data/sequence_dataset.py +0 -2
- radnn/data/subset_type.py +39 -0
- radnn/data/tf_classification_data_feed.py +97 -0
- radnn/errors.py +29 -0
- radnn/evaluation/evaluate_classification.py +7 -3
- radnn/experiment/ml_experiment.py +29 -0
- radnn/experiment/ml_experiment_config.py +7 -3
- radnn/experiment/ml_experiment_env.py +6 -2
- radnn/experiment/ml_experiment_store.py +0 -1
- radnn/learn/learning_algorithm.py +4 -3
- radnn/ml_system.py +59 -19
- radnn/plots/plot_auto_multi_image.py +21 -12
- radnn/plots/plot_confusion_matrix.py +7 -4
- radnn/plots/plot_learning_curve.py +7 -3
- radnn/plots/plot_multi_scatter.py +7 -3
- radnn/plots/plot_roc.py +8 -4
- radnn/plots/plot_voronoi_2d.py +8 -5
- radnn/system/files/csvfile.py +8 -5
- radnn/system/files/fileobject.py +9 -4
- radnn/system/files/imgfile.py +8 -4
- radnn/system/files/jsonfile.py +8 -4
- radnn/system/files/picklefile.py +8 -4
- radnn/system/files/textfile.py +8 -4
- radnn/system/filestore.py +10 -8
- radnn/system/filesystem.py +7 -2
- radnn/system/hosts/colab_host.py +29 -0
- radnn/system/hosts/linux_host.py +29 -0
- radnn/system/hosts/windows_host.py +29 -1
- radnn/system/tee_logger.py +7 -3
- radnn/utils.py +54 -3
- {radnn-0.0.7.2.dist-info → radnn-0.0.7.3.dist-info}/METADATA +1 -1
- radnn-0.0.7.3.dist-info/RECORD +56 -0
- radnn-0.0.7.2.dist-info/RECORD +0 -53
- {radnn-0.0.7.2.dist-info → radnn-0.0.7.3.dist-info}/LICENSE.txt +0 -0
- {radnn-0.0.7.2.dist-info → radnn-0.0.7.3.dist-info}/WHEEL +0 -0
- {radnn-0.0.7.2.dist-info → radnn-0.0.7.3.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
7
|
+
# ......................................................................................
|
|
8
|
+
|
|
9
|
+
# Copyright (c) 2019-2025 Pantelis I. Kaplanoglou
|
|
10
|
+
|
|
11
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
# in the Software without restriction, including without limitation the rights
|
|
14
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
# copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
# SOFTWARE.
|
|
28
|
+
|
|
29
|
+
# ......................................................................................
|
|
1
30
|
import os
|
|
2
31
|
import numpy as np
|
|
3
32
|
from datetime import datetime
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2019-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -22,7 +27,6 @@
|
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
29
|
# ......................................................................................
|
|
25
|
-
|
|
26
30
|
import os
|
|
27
31
|
import json
|
|
28
32
|
import re
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
9
|
# Copyright (c) 2023-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
@@ -22,7 +27,6 @@
|
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
29
|
# ......................................................................................
|
|
25
|
-
|
|
26
30
|
import os
|
|
27
31
|
import shutil
|
|
28
32
|
import sys
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
from radnn
|
|
1
|
+
from radnn import mlsys
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
if mlsys.is_tensorflow_installed:
|
|
4
5
|
from .keras_optimization_algorithm import KOptimizationAlgorithm
|
|
5
6
|
|
|
6
7
|
class LearningAlgorithm(object):
|
|
@@ -29,7 +30,7 @@ class LearningAlgorithm(object):
|
|
|
29
30
|
return oResult
|
|
30
31
|
# -----------------------------------------------------------------------------------
|
|
31
32
|
def prepare(self):
|
|
32
|
-
if is_tensorflow_installed:
|
|
33
|
+
if mlsys.is_tensorflow_installed:
|
|
33
34
|
self._implementation = KOptimizationAlgorithm(self.config, self.is_verbose)
|
|
34
35
|
return self
|
|
35
36
|
# -----------------------------------------------------------------------------------
|
radnn/ml_system.py
CHANGED
|
@@ -1,12 +1,38 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
7
|
+
# ......................................................................................
|
|
8
|
+
|
|
9
|
+
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
10
|
+
|
|
11
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
# in the Software without restriction, including without limitation the rights
|
|
14
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
# copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
# SOFTWARE.
|
|
28
|
+
|
|
29
|
+
# .......................................................................................
|
|
1
30
|
import os
|
|
2
31
|
import random
|
|
3
32
|
import numpy as np
|
|
4
33
|
import importlib
|
|
5
34
|
|
|
6
35
|
class MLSystem(object):
|
|
7
|
-
IS_USING_TENSORFLOW = False
|
|
8
|
-
IS_USING_TORCH = False
|
|
9
|
-
|
|
10
36
|
# --------------------------------------------------------------------------------------
|
|
11
37
|
_instance = None
|
|
12
38
|
@classmethod
|
|
@@ -17,30 +43,36 @@ class MLSystem(object):
|
|
|
17
43
|
return cls._instance
|
|
18
44
|
# --------------------------------------------------------------------------------------
|
|
19
45
|
@property
|
|
20
|
-
def
|
|
21
|
-
return self.is_tensorflow_installed and
|
|
46
|
+
def is_using_tensorflow(self):
|
|
47
|
+
return self.is_tensorflow_installed and self._is_using_tensorflow
|
|
48
|
+
# --------------------------------------------------------------------------------------
|
|
49
|
+
@is_using_tensorflow.setter
|
|
50
|
+
def is_using_tensorflow(self, value):
|
|
51
|
+
self._is_using_tensorflow = value
|
|
52
|
+
self._is_using_torch = not value
|
|
22
53
|
# --------------------------------------------------------------------------------------
|
|
23
54
|
@property
|
|
24
|
-
def
|
|
25
|
-
return self.is_torch_installed and
|
|
55
|
+
def is_using_torch(self):
|
|
56
|
+
return self.is_torch_installed and self.is_using_torch
|
|
57
|
+
# --------------------------------------------------------------------------------------
|
|
58
|
+
@is_using_torch.setter
|
|
59
|
+
def is_using_torch(self, value):
|
|
60
|
+
self._is_using_torch = value
|
|
61
|
+
self._is_using_tensorflow = not value
|
|
26
62
|
# --------------------------------------------------------------------------------------
|
|
27
63
|
def __init__(self):
|
|
28
64
|
self._is_random_seed_initialized = False
|
|
29
65
|
self._filesys = None
|
|
66
|
+
self._seed = None
|
|
30
67
|
self.switches = dict()
|
|
31
68
|
self.switches["IsDebuggable"] = False
|
|
32
69
|
|
|
33
70
|
self.is_tensorflow_installed = False
|
|
34
71
|
self.is_torch_installed = False
|
|
35
72
|
self.is_opencv_installed = False
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
self.
|
|
39
|
-
self.IS_USING_TORCH = False
|
|
40
|
-
# --------------------------------------------------------------------------------------
|
|
41
|
-
def use_torch(self):
|
|
42
|
-
self.IS_USING_TORCH = True
|
|
43
|
-
self.IS_USING_TENSORFLOW = False
|
|
73
|
+
|
|
74
|
+
self._is_using_tensorflow = False
|
|
75
|
+
self.is_using_torch = False
|
|
44
76
|
# --------------------------------------------------------------------------------------
|
|
45
77
|
@property
|
|
46
78
|
def filesys(self):
|
|
@@ -49,10 +81,17 @@ class MLSystem(object):
|
|
|
49
81
|
@filesys.setter
|
|
50
82
|
def filesys(self, value):
|
|
51
83
|
self._filesys = value
|
|
84
|
+
|
|
85
|
+
# --------------------------------------------------------------------------------------
|
|
86
|
+
@property
|
|
87
|
+
def seed(self):
|
|
88
|
+
return self._seed
|
|
52
89
|
# --------------------------------------------------------------------------------------
|
|
53
90
|
# We are seeding the number generators to get some amount of determinism for the whole ML training process.
|
|
54
91
|
# For Tensorflow it is not ensuring 100% deterministic reproduction of an experiment on the GPU.
|
|
55
|
-
def random_seed_all(self, seed, is_done_once=False):
|
|
92
|
+
def random_seed_all(self, seed, is_done_once=False, is_parallel_deterministic=False):
|
|
93
|
+
self._seed = seed
|
|
94
|
+
|
|
56
95
|
bContinue = True
|
|
57
96
|
if is_done_once:
|
|
58
97
|
bContinue = (not self._is_random_seed_initialized)
|
|
@@ -61,12 +100,13 @@ class MLSystem(object):
|
|
|
61
100
|
random.seed(seed)
|
|
62
101
|
os.environ['PYTHONHASHSEED'] = str(seed)
|
|
63
102
|
np.random.seed(seed)
|
|
64
|
-
if mlsys.
|
|
103
|
+
if mlsys.is_tensorflow_installed:
|
|
65
104
|
import tensorflow as tf
|
|
66
105
|
tf.compat.v1.reset_default_graph()
|
|
106
|
+
if is_parallel_deterministic:
|
|
107
|
+
tf.config.experimental.enable_op_determinism() # Enable determinism for num_parallel_calls
|
|
67
108
|
tf.random.set_seed(seed)
|
|
68
|
-
|
|
69
|
-
elif mlsys.is_torch:
|
|
109
|
+
if mlsys.is_torch_installed:
|
|
70
110
|
import torch
|
|
71
111
|
torch.manual_seed(seed)
|
|
72
112
|
# GPU and multi-GPU
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
9
|
# Copyright (c) 2022-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import numpy as np
|
|
27
31
|
import matplotlib.pyplot as plt
|
|
28
32
|
|
|
@@ -44,9 +48,9 @@ class AutoMultiImagePlot(object):
|
|
|
44
48
|
self.row_count = len(self.rows)
|
|
45
49
|
self.row_titles.append(row_title)
|
|
46
50
|
|
|
47
|
-
def add_column(self,
|
|
51
|
+
def add_column(self, image, image_title=None, color_map=None, aspect=None, extent=None):
|
|
48
52
|
oRowColumns = self.rows[self.current_row]
|
|
49
|
-
dImage = {"image":
|
|
53
|
+
dImage = {"image": image, "title": image_title
|
|
50
54
|
, "cmap": color_map, "aspect": aspect
|
|
51
55
|
, "extend": extent}
|
|
52
56
|
|
|
@@ -63,7 +67,7 @@ class AutoMultiImagePlot(object):
|
|
|
63
67
|
nColumns = restrict_columns
|
|
64
68
|
if nColumns is None:
|
|
65
69
|
nColumns = self.max_col_count
|
|
66
|
-
fig, oSubplotGrid = plt.subplots(nrows=self.row_count, ncols=nColumns
|
|
70
|
+
fig, oSubplotGrid = plt.subplots( nrows=self.row_count, ncols=nColumns
|
|
67
71
|
, figsize=figure_size
|
|
68
72
|
, subplot_kw={'xticks': [], 'yticks': []})
|
|
69
73
|
bIsSingleRow = self.row_count == 1
|
|
@@ -73,7 +77,6 @@ class AutoMultiImagePlot(object):
|
|
|
73
77
|
if title is None:
|
|
74
78
|
title = self.title
|
|
75
79
|
fig.suptitle(title)
|
|
76
|
-
|
|
77
80
|
for nRowIndex, oRowColumns in enumerate(self.rows):
|
|
78
81
|
if len(oRowColumns) > 0:
|
|
79
82
|
sRowTitle = self.row_titles[nRowIndex]
|
|
@@ -88,17 +91,23 @@ class AutoMultiImagePlot(object):
|
|
|
88
91
|
if bMustPlot:
|
|
89
92
|
dImage = oRowColumns[nImageIndex]
|
|
90
93
|
oSubPlot = oSubplotGrid[nRowIndex, nColIndex]
|
|
91
|
-
|
|
94
|
+
sTitle = dImage['title']
|
|
95
|
+
if sTitle is not None:
|
|
96
|
+
oSubPlot.title.set_text(sTitle)
|
|
97
|
+
oSubPlot.set_xticks([])
|
|
98
|
+
oSubPlot.set_yticks([])
|
|
92
99
|
oSubPlot.imshow(dImage["image"], cmap=dImage["cmap"],
|
|
93
100
|
aspect=dImage["aspect"], extent=dImage["extend"],
|
|
94
101
|
vmin=self.min, vmax=self.max
|
|
95
102
|
)
|
|
103
|
+
|
|
96
104
|
if nColIndex == 0:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
if sRowTitle is not None:
|
|
106
|
+
oSubPlot.text(0.0, 0.5, sRowTitle, transform=oSubPlot.transAxes,
|
|
107
|
+
horizontalalignment='right', verticalalignment='center',
|
|
108
|
+
fontsize=9, fontweight='bold')
|
|
100
109
|
nImageIndex += nIncr
|
|
101
|
-
|
|
110
|
+
fig.subplots_adjust(wspace=0.1, hspace=0.6)
|
|
102
111
|
return self
|
|
103
112
|
|
|
104
113
|
# --------------------------------------------------------------------------------------
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
9
|
# Copyright (c) 2020-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
@@ -21,9 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
# .......................................................................................
|
|
27
30
|
import matplotlib.pyplot as plt
|
|
28
31
|
|
|
29
32
|
class PlotConfusionMatrix(object):
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
9
|
# Copyright (c) 2020-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import matplotlib.pyplot as plt
|
|
27
31
|
|
|
28
32
|
class PlotLearningCurve(object):
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
9
|
# Copyright (c) 2022-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import numpy as np
|
|
27
31
|
import matplotlib.pyplot as plt
|
|
28
32
|
from matplotlib import cm
|
radnn/plots/plot_roc.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2023-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
from sklearn import metrics
|
|
27
31
|
import matplotlib.pyplot as plt
|
|
28
32
|
|
radnn/plots/plot_voronoi_2d.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2023-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,9 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
# .......................................................................................
|
|
27
30
|
import matplotlib.pyplot as plt
|
|
28
31
|
import numpy as np
|
|
29
32
|
from matplotlib import cm
|
radnn/system/files/csvfile.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,9 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
# .......................................................................................
|
|
27
30
|
import pandas as pd
|
|
28
31
|
|
|
29
32
|
|
radnn/system/files/fileobject.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,10 +26,10 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import os
|
|
27
31
|
import glob
|
|
32
|
+
|
|
28
33
|
class FileObject(object):
|
|
29
34
|
# ----------------------------------------------------------------------------------
|
|
30
35
|
def __init__(self, filename, parent_folder=None, error_template=None, default_file_extension=None):
|
radnn/system/files/imgfile.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import cv2
|
|
27
31
|
|
|
28
32
|
|
radnn/system/files/jsonfile.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import os
|
|
27
31
|
import json
|
|
28
32
|
import glob
|
radnn/system/files/picklefile.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import os
|
|
27
31
|
import sys
|
|
28
32
|
import shutil
|
radnn/system/files/textfile.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
|
-
# Copyright (c)
|
|
9
|
+
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
6
11
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
12
|
# of this software and associated documentation files (the "Software"), to deal
|
|
@@ -21,8 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# .......................................................................................
|
|
26
30
|
import os
|
|
27
31
|
import numpy as np
|
|
28
32
|
from .fileobject import FileObject
|
radnn/system/filestore.py
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
9
|
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
@@ -21,9 +26,7 @@
|
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
28
|
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
# .......................................................................................
|
|
27
30
|
import os
|
|
28
31
|
import shutil
|
|
29
32
|
import glob
|
|
@@ -37,9 +40,8 @@ from radnn.system.files import JSONFile
|
|
|
37
40
|
from radnn.system.files import PickleFile
|
|
38
41
|
from radnn.system.files import TextFile
|
|
39
42
|
from radnn.system.files import CSVFile
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (is_opencv_installed()):
|
|
43
|
+
from radnn.ml_system import mlsys
|
|
44
|
+
if mlsys.is_opencv_installed:
|
|
43
45
|
from radnn.system.files.imgfile import PNGFile
|
|
44
46
|
|
|
45
47
|
|
|
@@ -62,7 +64,7 @@ class FileStore(object):
|
|
|
62
64
|
self.obj = PickleFile(None, parent_folder=self.base_folder)
|
|
63
65
|
self.text = TextFile(None, parent_folder=self.base_folder)
|
|
64
66
|
self.csv = CSVFile(None, parent_folder=self.base_folder)
|
|
65
|
-
if
|
|
67
|
+
if mlsys.is_opencv_installed:
|
|
66
68
|
self.img = PNGFile(None, parent_folder=base_folder)
|
|
67
69
|
self.donefs = None
|
|
68
70
|
#................................................................................
|
radnn/system/filesystem.py
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
# ======================================================================================
|
|
2
|
+
#
|
|
3
|
+
# Rapid Deep Neural Networks
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the MIT License
|
|
6
|
+
# ______________________________________________________________________________________
|
|
1
7
|
# ......................................................................................
|
|
2
|
-
# MIT License
|
|
3
8
|
|
|
4
9
|
# Copyright (c) 2018-2025 Pantelis I. Kaplanoglou
|
|
5
10
|
|
|
@@ -20,8 +25,8 @@
|
|
|
20
25
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
26
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
27
|
# SOFTWARE.
|
|
23
|
-
# ......................................................................................
|
|
24
28
|
|
|
29
|
+
# .......................................................................................
|
|
25
30
|
import os
|
|
26
31
|
from radnn.core import system_name
|
|
27
32
|
from radnn.system.filestore import FileStore
|