Commit Graph

99 Commits

Author SHA1 Message Date
Alexander Alekhin
e2a5a6a05c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-09-25 18:32:44 +00:00
Alexander Alekhin
fef7fc343e ml: add checks of empty train data 2019-09-22 11:12:19 +00:00
luz.paz
fcc7d8dd4e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`

backporting of commit: ec43292e1e
2019-08-16 17:34:29 +03:00
luz.paz
ec43292e1e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`
2019-08-15 18:02:09 -04:00
Alexander Alekhin
665408e57f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-01 13:17:32 +03:00
Hannah McLaughlin
418898029c Merge pull request #13718 from lochsh:svm-sigmoid-fix
SVM sigmoid kernel fix (issue #13621) (#13718)

* Added test for sigmoid case for retrieving support vectors

* undo unhelpful test

* add test for sigmoid SVM with data that is easily separable into two concentric circles

* Update sigmoid kernel to use tanh(gamma * <x, y> + coef0) instead of -tanh(gamma * <x, y> + coef0)

* remove unnecessary constraint on coef0

* cleanup

* fixing inappropriate use of doubles

* Add f to float literal

* replace CV_Assert with ASSERT_EQ where appropriate
2019-01-31 15:34:36 +03:00
Vadim Pisarevsky
0f622206e4
completely new C++ persistence implementation (#13011)
* integrated the new C++ persistence; removed old persistence; most of OpenCV compiles fine! the tests have not been run yet

* fixed multiple bugs in the new C++ persistence

* fixed raw size of the parsed empty sequences

* [temporarily] excluded obsolete applications traincascade and createsamples from build

* fixed several compiler warnings and multiple test failures

* undo changes in cocoa window rendering (that was fixed in another PR)

* fixed more compile warnings and the remaining test failures (hopefully)

* trying to fix the last little warning
2018-11-02 00:27:06 +03:00
Alexander Alekhin
df8b057b44 avoid Ptr<> == NULL checks 2018-09-09 19:30:46 +00:00
Alexander Alekhin
d74b98c3d9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-04 18:39:03 +00:00
Jakub Golinowski
9f1218b00b Merge pull request #11897 from Jakub-Golinowski:hpx_backend
* Add HPX backend for OpenCV implementation
Adds hpx backend for cv::parallel_for_() calls respecting the nstripes chunking parameter. C++ code for the backend is added to modules/core/parallel.cpp. Also, the necessary changes to cmake files are introduced.
Backend can operate in 2 versions (selectable by cmake build option WITH_HPX_STARTSTOP): hpx (runtime always on) and hpx_startstop (start and stop the backend for each cv::parallel_for_() call)

* WIP: Conditionally include hpx_main.hpp to tests in core module
Header hpx_main.hpp is included to both core/perf/perf_main.cpp and core/test/test_main.cpp.
The changes to cmake files for linking hpx library to above mentioned test executalbles are proposed but have issues.

* Add coditional iclusion of hpx_main.hpp to cpp cpu modules

* Remove start/stop version of hpx backend
2018-08-31 16:23:26 +03:00
berak
e13f6ded7f ml: fix adjusting K in KNearest (#12358) 2018-08-31 16:07:53 +03:00
Alexander Alekhin
7d4bb9428b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-20 19:30:18 +03:00
Alexander Alekhin
7ee69740e8 ml(test): test different samples layout of TrainData 2018-08-17 16:57:20 +03:00
Alexander Alekhin
cd2b188c9a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-04-24 18:13:06 +03:00
Alexander Alekhin
6b581c4e51 build: unreachable code after CV_Error() (part 2) 2018-04-24 16:03:40 +03:00
Alexander Alekhin
2385a5870e next(ml): eliminate dummy interface class ANN_MLP_ANNEAL 2018-04-10 18:09:54 +03:00
Alexander Alekhin
12d2bd4adb ml: refactor ML_ANN test 2018-02-19 21:35:48 +03:00
luz.paz
e805a55a5b Misc. modules/ typos (cont.)
Found via `codespell`
2018-02-12 10:15:36 -05:00
Alexander Alekhin
4a297a2443 ts: refactor OpenCV tests
- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers
2018-02-03 19:39:47 +00:00
Alexander Alekhin
aef3019152 ml: fix SimulatedAnnealingSolver interface 2017-12-15 21:44:32 +03:00
LaurentBerger
7ad308ea47 Simulated Annealing for ANN_MLP training method (#10213)
* Simulated Annealing for ANN_MLP training method

* EXPECT_LT

* just to test new data

* manage RNG

* Try again

* Just run buildbot with new data

* try to understand

* Test layer

* New data- new test

* Force RNG in backprop

* Use Impl to avoid virtual method

* reset all weights

* try to solve ABI

* retry

* ABI solved?

* till problem with dynamic_cast

* Something is wrong

* Solved?

* disable backprop test

* remove ANN_MLP_ANNEALImpl

* Disable weight in varmap

* Add example for SimulatedAnnealing
2017-12-15 13:57:39 +03:00
LaurentBerger
a44573c43b Add ReLU and LeakyReLU activation function in ml module 2017-11-28 11:02:05 +01:00
Alexander Alekhin
006966e629 trace: initial support for code trace 2017-06-26 17:07:13 +03:00
David Carlier
bacc210606 fixing segfaults occuring when launching those unit tests 2017-04-18 09:50:17 +01:00
mrquorr
d8425d8881 finished for one sample
Finished with several samples support, need regression testing

Gave a more relevant name to function (getVotes)

Finished implicit implementation

Removed printf, finished regresion testing

Fixed conversion warning

Finished test for Rtrees

Fixed documentation

Initialized variable

Added doxygen documentation

Added parameter name
2017-02-28 11:14:33 -06:00
MYLS
8596e82d98 Add JSON support.
a JSON emitter, a parser, tests and some basic doc.
2016-08-11 00:53:15 +08:00
MYLS
617df09143 Modify Base64 functions and add test and documentation
Major changes:

- modify the Base64 functions to compatible with `cvWriteRawData` and so
on.
- add a Base64 flag for FileStorage and outputs raw data in Base64
automatically.
- complete all  testing and documentation.
2016-07-19 15:54:38 +08:00
Marina Noskova
53711ec29d Deleted default value for parameters in docs.
Added some asserts.
2016-02-25 19:12:54 +03:00
Marina Noskova
d484893839 Deleted functions makeTrainData() and makeTestData() in test_svmsgd.cpp.
Added function makeData() in test_svmsgd.cpp.
2016-02-25 16:57:03 +03:00
Marina Noskova
74c87a26a5 Delete function areClassesEmpty(). 2016-02-25 15:31:07 +03:00
Marina Noskova
f3c4a6aab8 Rename parameters lambda, gamma0 and c. 2016-02-24 13:22:07 +03:00
Marina Noskova
ff54952769 Corrected spelling mistakes 2016-02-15 14:35:36 +03:00
Marina Noskova
5496dedd6a Fixed warnings. 2016-02-10 19:46:24 +03:00
Marina Noskova
617dd5db5b Fixed doc/opencv.bib 2016-02-10 17:57:36 +03:00
Marina Noskova
05353a1492 Removed trailing whitespaces 2016-02-10 16:59:12 +03:00
Marina Noskova
41c0a38344 Fixed test samples for tests with different borders
Added new test (separating two points)
2016-02-10 16:59:12 +03:00
Marina Noskova
bfdca05f25 Added margin type, added tests with different scales of features.
Also fixed documentation, refactored sample.
2016-02-10 16:59:12 +03:00
Marina Noskova
acd74037b3 Increasing the dimension of features space in the SVMSGD::train function. 2016-02-10 16:59:11 +03:00
Marina Noskova
40bf97c6d1 Refactored SVMSGD class 2016-02-10 16:56:14 +03:00
berak
5afd0e211e ml: fix NormalBayesClassifier bulk prediction(#5911) 2016-01-04 11:47:08 +01:00
Deanna Hood
0d706f6796 Return uncompressed support vectors for getSupportVectors on linear SVM (Bug #4096) 2015-12-10 18:31:02 +03:00
berak
74fc9acdd1 initialize temp_train_samples in SVM::autoTrain
add smoke test
2015-09-23 11:08:48 +02:00
Vadim Pisarevsky
052593c760 1. Input/OutputArray optimizations;
2. Algorithm::load/save added (moved from StatModel)
3. copyrights updated; added copyright/licensing info for ffmpeg
4. some warnings from Xcode 6.x are fixed
2015-04-07 16:44:26 +03:00
Sancho McCann
6593422c05 Bugfix: #4030 SVM auto-training. 2015-04-01 20:44:51 +00:00
Maksim Shabunin
79e8f0680c Updated ml module interfaces and documentation 2015-02-17 11:46:14 +03:00
Maksim Shabunin
d004ee58c5 Support loading old models in ML module
- added test for loading legacy files
- added version to new written models
- fixed loading of several fields in some models
- added generation of new fields from old data
2014-12-31 12:16:25 +03:00
Vadim Pisarevsky
4057e27539 Merge pull request #3126 from avdmitry:move_KDTree_to_ml 2014-09-14 18:57:23 +00:00
Dmitriy Anisimov
a6b29be55b minor change: moved algorithm type to the end of params 2014-09-13 15:06:07 +04:00
Dmitriy Anisimov
dfaf75f502 moving algorithm type to param 2014-09-06 09:29:32 +04:00
Dmitriy Anisimov
5f3ee657ce removed kdtree declaration from interface 2014-08-31 21:39:47 +04:00