Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An option to be indepedent of OpenCV #167

Merged
merged 10 commits into from Jun 6, 2016
Merged

Conversation

beru
Copy link
Contributor

@beru beru commented Jun 5, 2016

It's hard to deny that OpenCV is a de-facto standard library in computer vision.
But it's rather huge for my PC-9801 computer.

@nyanp
Copy link
Member

nyanp commented Jun 5, 2016

@beru
Excellent! Attempts to reduce dependencies are always welcome in tiny-cnn :)
Could you extract stb version of test program as the independent file? I want to keep example source code as clean as possible, for both OpenCV&stb users.

@beru
Copy link
Contributor Author

beru commented Jun 5, 2016

@nyanp
I updated the branch. Would you check it please?

@@ -54,7 +56,7 @@ OPTION(BUILD_DOCS "Set to ON to build documentation" OFF)
# Find Dependencies
# ----------------------------------------------------------------------------

IF(BUILD_EXAMPLES)
IF(USE_OPENCV)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beru
In this PR CMake requires opencv even if we don't compile the mnist example (This is why AppVeyor failed to build). We need opencv only when BUILD_EXAMPLS && USE_OPENCV. Could you fix it?

@beru
Copy link
Contributor Author

beru commented Jun 5, 2016

Thank you for pointing out the problem. I updated CMakeLists.txt file.
Could you please take a look at it again?

@nyanp
Copy link
Member

nyanp commented Jun 6, 2016

@beru
Perfect :) I'll merge it. Thank you very much!

@nyanp nyanp merged commit ce16653 into tiny-dnn:master Jun 6, 2016
@edgarriba
Copy link
Member

@beru nice contribution!
Could you implement a find_package cmake instead of adding the header files?

Take a look how I solved this for NNPACK: https://github.com/edgarriba/tiny-cnn/tree/feat/generic-computational-graph-device-abstraction/cmake/Modules

Extra link: Writing find modules https://cmake.org/Wiki/CMake:How_To_Find_Libraries

@edgarriba
Copy link
Member

@nyanp This need some fixes for new branch.

edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Jun 13, 2016
edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Jun 13, 2016
edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Jun 13, 2016
edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Jun 13, 2016
nyanp pushed a commit that referenced this pull request Jun 15, 2016
* v0.0.1 -> v.0.1.0

- Now we can handle non-sequential model as ```network<graph>``` #108
#153
- Catch up the latest format of caffe's proto #162
- Improve the default behaviour of re-init weight #136
- Add more tests and documents #73
- Remove dependency of OpenCV in MNIST example

* Create DeviceAbstraction.puml

Create test.md

Update test.md

Update and rename test.md to device-abstraction-uml.md

Create device-abstraction-uml.puml

Update readme.md

reorganize cmake

reorganize cmake

remove test warnings

remove mock files

Update device-abstraction-uml.puml

* add tests&comments

* cleanup codes

currently we don't need hand-written ctor/dtors in dropout

* Remove OpenCV dependency closes #2

* fix comments

* update build instruction file

* support CNN_USE_OPENCV build config

* fix build configuration file

* change the location of stb_image header files

* follows the comment #167 (comment)
relocate stb_image files

* Update layer.h

* Implement on deconvolution and unpooling layer.

* core module skeletons

* Added test case in separate cpp file to force link errors if there are duplicate symbols when including tiny_cnn.h in multiple .cpp files.

* Fix linker error due to duplicate symbols.

* Update README.md

- Update layer catalogue
- Upgrade example codes to v0.1.0

* update first convolutional layer abstraction version with NNPACK support

base methods for new API

update find_package NNPACK

update tiny_backend

fix segfault by adding move constructor to conv layer

refactor nnp_backend

update UML with new design

fix required libs in cmake, set float_t as float and set activation vector as input in nnpack

fix padding and add assertion after nnp_convolution_inference

fix CMake warnings and reorganize modules

fix data race

fix broken tests

Reorganize CMake modules

add epsilon for broken tests

fix broken tests. float_t was missing in some layers.

fix clang errors
@beru
Copy link
Contributor Author

beru commented Jun 17, 2016

@edgarriba
Thank you for the kind messages.
I've noticed the problem but I'm slow to react. Sorry for the delay.
I posted another PR #189 recently. I wish that can fix the problem.

Talking about using CMake find_package command feature for stb_image.
Since stb_image is a single-file headers library and it doesn't have a Makefile so I'm not sure if it is designed to be installed into certain path. Probablly stb_image library is not registered to repositories of famous package managers too. So I'd rather the files to be accompanied with tiny-cnn.

edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Jun 17, 2016
nyanp pushed a commit that referenced this pull request Jun 20, 2016
* Remove OpenCV dependency closes #2

* update build instruction file

* change the location of stb_image header files

* follows the comment #167 (comment)
relocate stb_image files

* Implement on deconvolution and unpooling layer.

* Create DeviceAbstraction.puml

Create test.md

Update test.md

Update and rename test.md to device-abstraction-uml.md

Create device-abstraction-uml.puml

Update readme.md

reorganize cmake

reorganize cmake

remove test warnings

remove mock files

Update device-abstraction-uml.puml

* switch std::bind to lambdas

* first commit to split into small backends

split tiny convolutional kernels

split NNPACK kernel and reorganize backend files

split maxpool kernels

simplify conv2d_back signature

split fully connected layer kernels

reorganize folders

check NNPACK prerequisites

add coloured nn_error, nn_warning and nn_info

uncomment tiny backend
edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Aug 8, 2016
edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Aug 8, 2016
edgarriba pushed a commit to edgarriba/tiny-cnn that referenced this pull request Aug 8, 2016
An option to be indepedent of OpenCV
edgarriba added a commit to edgarriba/tiny-cnn that referenced this pull request Aug 8, 2016
* v0.0.1 -> v.0.1.0

- Now we can handle non-sequential model as ```network<graph>``` tiny-dnn#108
tiny-dnn#153
- Catch up the latest format of caffe's proto tiny-dnn#162
- Improve the default behaviour of re-init weight tiny-dnn#136
- Add more tests and documents tiny-dnn#73
- Remove dependency of OpenCV in MNIST example

* Create DeviceAbstraction.puml

Create test.md

Update test.md

Update and rename test.md to device-abstraction-uml.md

Create device-abstraction-uml.puml

Update readme.md

reorganize cmake

reorganize cmake

remove test warnings

remove mock files

Update device-abstraction-uml.puml

* add tests&comments

* cleanup codes

currently we don't need hand-written ctor/dtors in dropout

* Remove OpenCV dependency closes #2

* fix comments

* update build instruction file

* support CNN_USE_OPENCV build config

* fix build configuration file

* change the location of stb_image header files

* follows the comment tiny-dnn#167 (comment)
relocate stb_image files

* Update layer.h

* Implement on deconvolution and unpooling layer.

* core module skeletons

* Added test case in separate cpp file to force link errors if there are duplicate symbols when including tiny_cnn.h in multiple .cpp files.

* Fix linker error due to duplicate symbols.

* Update README.md

- Update layer catalogue
- Upgrade example codes to v0.1.0

* update first convolutional layer abstraction version with NNPACK support

base methods for new API

update find_package NNPACK

update tiny_backend

fix segfault by adding move constructor to conv layer

refactor nnp_backend

update UML with new design

fix required libs in cmake, set float_t as float and set activation vector as input in nnpack

fix padding and add assertion after nnp_convolution_inference

fix CMake warnings and reorganize modules

fix data race

fix broken tests

Reorganize CMake modules

add epsilon for broken tests

fix broken tests. float_t was missing in some layers.

fix clang errors
edgarriba added a commit to edgarriba/tiny-cnn that referenced this pull request Aug 8, 2016
* Remove OpenCV dependency closes #2

* update build instruction file

* change the location of stb_image header files

* follows the comment tiny-dnn#167 (comment)
relocate stb_image files

* Implement on deconvolution and unpooling layer.

* Create DeviceAbstraction.puml

Create test.md

Update test.md

Update and rename test.md to device-abstraction-uml.md

Create device-abstraction-uml.puml

Update readme.md

reorganize cmake

reorganize cmake

remove test warnings

remove mock files

Update device-abstraction-uml.puml

* switch std::bind to lambdas

* first commit to split into small backends

split tiny convolutional kernels

split NNPACK kernel and reorganize backend files

split maxpool kernels

simplify conv2d_back signature

split fully connected layer kernels

reorganize folders

check NNPACK prerequisites

add coloured nn_error, nn_warning and nn_info

uncomment tiny backend
@beru beru deleted the without_opencv branch January 8, 2017 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants