Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
33dde339
Commit
33dde339
authored
Apr 01, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
066c074b
341e2fa7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
67 deletions
+33
-67
lda.cpp
modules/core/src/lda.cpp
+7
-5
system.cpp
modules/core/src/system.cpp
+1
-1
CMakeLists.txt
modules/dnn/CMakeLists.txt
+1
-1
perf_common.cpp
modules/dnn/perf/perf_common.cpp
+6
-0
test_common.cpp
modules/dnn/test/test_common.cpp
+0
-0
test_common.impl.hpp
modules/dnn/test/test_common.impl.hpp
+0
-0
test_ie_models.cpp
modules/dnn/test/test_ie_models.cpp
+15
-60
bitstrm.cpp
modules/imgcodecs/src/bitstrm.cpp
+3
-0
No files found.
modules/core/src/lda.cpp
View file @
33dde339
...
...
@@ -903,19 +903,19 @@ public:
// given in src. This function is a port of the EigenvalueSolver in JAMA,
// which has been released to public domain by The MathWorks and the
// National Institute of Standards and Technology (NIST).
EigenvalueDecomposition
(
InputArray
src
,
bool
fallbackSymmetric
=
true
)
:
EigenvalueDecomposition
()
:
n
(
0
),
d
(
NULL
),
e
(
NULL
),
ort
(
NULL
),
V
(
NULL
),
H
(
NULL
)
{
compute
(
src
,
fallbackSymmetric
);
// nothing
}
// This function computes the Eigenvalue Decomposition for a general matrix
// given in src. This function is a port of the EigenvalueSolver in JAMA,
// which has been released to public domain by The MathWorks and the
// National Institute of Standards and Technology (NIST).
void
compute
(
InputArray
src
,
bool
fallbackSymmetric
)
void
compute
(
InputArray
src
,
bool
fallbackSymmetric
=
true
)
{
CV_INSTRUMENT_REGION
();
...
...
@@ -970,7 +970,8 @@ void eigenNonSymmetric(InputArray _src, OutputArray _evals, OutputArray _evects)
else
src64f
=
src
;
EigenvalueDecomposition
eigensystem
(
src64f
,
false
);
EigenvalueDecomposition
eigensystem
;
eigensystem
.
compute
(
src64f
,
false
);
// EigenvalueDecomposition returns transposed and non-sorted eigenvalues
std
::
vector
<
double
>
eigenvalues64f
;
...
...
@@ -1146,7 +1147,8 @@ void LDA::lda(InputArrayOfArrays _src, InputArray _lbls) {
// M = inv(Sw)*Sb
Mat
M
;
gemm
(
Swi
,
Sb
,
1.0
,
Mat
(),
0.0
,
M
);
EigenvalueDecomposition
es
(
M
);
EigenvalueDecomposition
es
;
es
.
compute
(
M
);
_eigenvalues
=
es
.
eigenvalues
();
_eigenvectors
=
es
.
eigenvectors
();
// reshape eigenvalues, so they are stored by column
...
...
modules/core/src/system.cpp
View file @
33dde339
...
...
@@ -94,7 +94,7 @@ void* allocSingletonBuffer(size_t size) { return fastMalloc(size); }
#include <cstdlib> // std::abort
#endif
#if defined __ANDROID__ || defined __linux__ || defined __FreeBSD__ || defined __HAIKU__ || defined __Fuchsia__
#if defined __ANDROID__ || defined __linux__ || defined __FreeBSD__ || defined __
OpenBSD__ || defined __
HAIKU__ || defined __Fuchsia__
# include <unistd.h>
# include <fcntl.h>
# include <elf.h>
...
...
modules/dnn/CMakeLists.txt
View file @
33dde339
...
...
@@ -94,7 +94,7 @@ set(perf_path "${CMAKE_CURRENT_LIST_DIR}/perf")
file
(
GLOB_RECURSE perf_srcs
"
${
perf_path
}
/*.cpp"
)
file
(
GLOB_RECURSE perf_hdrs
"
${
perf_path
}
/*.hpp"
"
${
perf_path
}
/*.h"
)
ocv_add_perf_tests
(
${
INF_ENGINE_TARGET
}
FILES test_common
"
${
CMAKE_CURRENT_LIST_DIR
}
/test/test_common.
c
pp"
FILES test_common
"
${
CMAKE_CURRENT_LIST_DIR
}
/test/test_common.
hpp"
"
${
CMAKE_CURRENT_LIST_DIR
}
/test/test_common.impl.h
pp"
FILES Src
${
perf_srcs
}
FILES Include
${
perf_hdrs
}
)
...
...
modules/dnn/perf/perf_common.cpp
0 → 100644
View file @
33dde339
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "perf_precomp.hpp"
#include "../test/test_common.impl.hpp" // shared with accuracy tests
modules/dnn/test/test_common.cpp
View file @
33dde339
This diff is collapsed.
Click to expand it.
modules/dnn/test/test_common.impl.hpp
0 → 100644
View file @
33dde339
This diff is collapsed.
Click to expand it.
modules/dnn/test/test_ie_models.cpp
View file @
33dde339
...
...
@@ -177,34 +177,17 @@ TEST_P(DNNTestOpenVINO, models)
{
Target
target
=
(
dnn
::
Target
)(
int
)
get
<
0
>
(
GetParam
());
std
::
string
modelName
=
get
<
1
>
(
GetParam
());
std
::
string
precision
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
"FP16"
:
"FP32"
;
#ifdef INF_ENGINE_RELEASE
#if INF_ENGINE_RELEASE <= 2018030000
if
(
target
==
DNN_TARGET_MYRIAD
&&
(
modelName
==
"landmarks-regression-retail-0001"
||
modelName
==
"semantic-segmentation-adas-0001"
||
modelName
==
"face-reidentification-retail-0001"
))
throw
SkipTestException
(
""
);
#elif INF_ENGINE_RELEASE == 2018040000
if
(
modelName
==
"single-image-super-resolution-0034"
||
(
target
==
DNN_TARGET_MYRIAD
&&
(
modelName
==
"license-plate-recognition-barrier-0001"
||
modelName
==
"landmarks-regression-retail-0009"
||
modelName
==
"semantic-segmentation-adas-0001"
)))
throw
SkipTestException
(
""
);
#elif INF_ENGINE_RELEASE == 2018050000
if
(
modelName
==
"single-image-super-resolution-0063"
||
modelName
==
"single-image-super-resolution-1011"
||
modelName
==
"single-image-super-resolution-1021"
||
(
target
==
DNN_TARGET_OPENCL_FP16
&&
modelName
==
"face-reidentification-retail-0095"
)
||
(
target
==
DNN_TARGET_MYRIAD
&&
(
modelName
==
"license-plate-recognition-barrier-0001"
||
modelName
==
"semantic-segmentation-adas-0001"
)))
throw
SkipTestException
(
""
);
#endif
#endif
std
::
string
precision
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
"FP16"
:
"FP32"
;
#if INF_ENGINE_RELEASE <= 2018050000
std
::
string
prefix
=
utils
::
fs
::
join
(
"intel_models"
,
utils
::
fs
::
join
(
modelName
,
utils
::
fs
::
join
(
precision
,
modelName
)));
#endif
#endif
initDLDTDataPath
();
std
::
string
xmlPath
=
findDataFile
(
prefix
+
".xml"
);
std
::
string
binPath
=
findDataFile
(
prefix
+
".bin"
);
...
...
@@ -221,49 +204,21 @@ TEST_P(DNNTestOpenVINO, models)
{
auto
dstIt
=
cvOutputsMap
.
find
(
srcIt
.
first
);
CV_Assert
(
dstIt
!=
cvOutputsMap
.
end
());
double
normInfIE
=
cvtest
::
norm
(
srcIt
.
second
,
cv
::
NORM_INF
);
double
normInf
=
cvtest
::
norm
(
srcIt
.
second
,
dstIt
->
second
,
cv
::
NORM_INF
);
double
eps
=
0
;
if
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
{
double
fp16_eps
=
1.0
/
1024
;
eps
=
fp16_eps
*
1
/*ULP*/
*
std
::
max
(
normInfIE
,
1.0
);
}
EXPECT_LE
(
normInf
,
eps
)
<<
"IE: "
<<
normInfIE
;
}
}
static
testing
::
internal
::
ParamGenerator
<
String
>
intelModels
()
{
initDLDTDataPath
();
std
::
vector
<
String
>
modelsNames
;
std
::
string
path
;
try
{
path
=
findDataDirectory
(
"intel_models"
,
false
);
}
catch
(...)
{
std
::
cerr
<<
"ERROR: Can't find OpenVINO models. Check INTEL_CVSDK_DIR environment variable (run setup.sh)"
<<
std
::
endl
;
return
ValuesIn
(
modelsNames
);
// empty list
EXPECT_EQ
(
normInf
,
0
);
}
cv
::
utils
::
fs
::
glob_relative
(
path
,
""
,
modelsNames
,
false
,
true
);
modelsNames
.
erase
(
std
::
remove_if
(
modelsNames
.
begin
(),
modelsNames
.
end
(),
[
&
](
const
String
&
dir
){
return
!
utils
::
fs
::
isDirectory
(
utils
::
fs
::
join
(
path
,
dir
));
}),
modelsNames
.
end
()
);
CV_Assert
(
!
modelsNames
.
empty
());
return
ValuesIn
(
modelsNames
);
}
INSTANTIATE_TEST_CASE_P
(
/**/
,
DNNTestOpenVINO
,
Combine
(
testing
::
ValuesIn
(
getAvailableTargets
(
DNN_BACKEND_INFERENCE_ENGINE
)),
intelModels
())
Combine
(
testing
::
ValuesIn
(
getAvailableTargets
(
DNN_BACKEND_INFERENCE_ENGINE
)),
testing
::
Values
(
"age-gender-recognition-retail-0013"
,
"face-person-detection-retail-0002"
,
"head-pose-estimation-adas-0001"
,
"person-detection-retail-0002"
,
"vehicle-detection-adas-0002"
))
);
}}
...
...
modules/imgcodecs/src/bitstrm.cpp
View file @
33dde339
...
...
@@ -175,8 +175,11 @@ void RBaseStream::setPos( int pos )
}
int
offset
=
pos
%
m_block_size
;
int
old_block_pos
=
m_block_pos
;
m_block_pos
=
pos
-
offset
;
m_current
=
m_start
+
offset
;
if
(
old_block_pos
!=
m_block_pos
)
readBlock
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment