Skip to content

Commit a2ad410

Browse files
committed
HED training/testing code release
0 parents  commit a2ad410

File tree

386 files changed

+95456
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+95456
-0
lines changed

.Doxyfile

+2,335
Large diffs are not rendered by default.

.gitignore

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
## General
2+
3+
# Compiled Object files
4+
*.slo
5+
*.lo
6+
*.o
7+
*.cuo
8+
9+
# Compiled Dynamic libraries
10+
*.so
11+
*.dylib
12+
13+
# Compiled Static libraries
14+
*.lai
15+
*.la
16+
*.a
17+
18+
# Compiled protocol buffers
19+
*.pb.h
20+
*.pb.cc
21+
*_pb2.py
22+
23+
# Compiled python
24+
*.pyc
25+
26+
# Compiled MATLAB
27+
*.mex*
28+
29+
# IPython notebook checkpoints
30+
.ipynb_checkpoints
31+
32+
# Editor temporaries
33+
*.swp
34+
*~
35+
36+
# Sublime Text settings
37+
*.sublime-workspace
38+
*.sublime-project
39+
40+
# Eclipse Project settings
41+
*.*project
42+
.settings
43+
44+
# QtCreator files
45+
*.user
46+
47+
# PyCharm files
48+
.idea
49+
50+
# OSX dir files
51+
.DS_Store
52+
53+
## Caffe
54+
55+
# User's build configuration
56+
Makefile.config
57+
58+
# Data and models are either
59+
# 1. reference, and not casually committed
60+
# 2. custom, and live on their own unless they're deliberated contributed
61+
data/*
62+
models/*
63+
*.caffemodel
64+
*.caffemodel.h5
65+
*.solverstate
66+
*.solverstate.h5
67+
*.binaryproto
68+
*leveldb
69+
*lmdb
70+
71+
# build, distribute, and bins (+ python proto bindings)
72+
build
73+
.build_debug/*
74+
.build_release/*
75+
distribute/*
76+
*.testbin
77+
*.bin
78+
python/caffe/proto/
79+
cmake_build
80+
.cmake_build
81+
82+
# Generated documentation
83+
docs/_site
84+
docs/gathered
85+
_site
86+
doxygen
87+
docs/dev
88+
89+
# LevelDB files
90+
*.sst
91+
*.ldb
92+
LOCK
93+
LOG*
94+
CURRENT
95+
MANIFEST-*

.travis.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Use a build matrix to do two builds in parallel:
2+
# one using CMake, and one using make.
3+
env:
4+
matrix:
5+
- WITH_CUDA=false WITH_CMAKE=false
6+
- WITH_CUDA=false WITH_CMAKE=true
7+
- WITH_CUDA=true WITH_CMAKE=false
8+
- WITH_CUDA=true WITH_CMAKE=true
9+
- WITH_CUDA=false WITH_CMAKE=true PYTHON_VERSION=3
10+
11+
language: cpp
12+
13+
# Cache Ubuntu apt packages.
14+
cache:
15+
apt: true
16+
directories:
17+
- /home/travis/miniconda
18+
- /home/travis/miniconda2
19+
- /home/travis/miniconda3
20+
21+
compiler: gcc
22+
23+
before_install:
24+
- export NUM_THREADS=4
25+
- export SCRIPTS=./scripts/travis
26+
- export CONDA_DIR="/home/travis/miniconda$PYTHON_VERSION"
27+
28+
install:
29+
- sudo -E $SCRIPTS/travis_install.sh
30+
31+
before_script:
32+
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/cuda/lib64:$CONDA_DIR/lib
33+
- export PATH=$CONDA_DIR/bin:$PATH
34+
- if ! $WITH_CMAKE; then $SCRIPTS/travis_setup_makefile_config.sh; fi
35+
36+
script: $SCRIPTS/travis_build_and_test.sh
37+
38+
notifications:
39+
# Emails are sent to the committer's git-configured email address by default,
40+
# but only if they have access to the repository. To enable Travis on your
41+
# public fork of Caffe, just go to travis-ci.org and flip the switch on for
42+
# your Caffe fork. To configure your git email address, use:
43+
# git config --global user.email [email protected]
44+
email:
45+
on_success: always
46+
on_failure: always
47+
48+
# IRC notifications disabled by default.
49+
# Uncomment next 5 lines to send notifications to chat.freenode.net#caffe
50+
# irc:
51+
# channels:
52+
# - "chat.freenode.net#caffe"
53+
# template:
54+
# - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"

CMakeLists.txt

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
cmake_minimum_required(VERSION 2.8.7)
2+
3+
# ---[ Caffe project
4+
project(Caffe C CXX)
5+
6+
# ---[ Using cmake scripts and modules
7+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
8+
9+
include(ExternalProject)
10+
11+
include(cmake/Utils.cmake)
12+
include(cmake/Targets.cmake)
13+
include(cmake/Misc.cmake)
14+
include(cmake/Summary.cmake)
15+
include(cmake/ConfigGen.cmake)
16+
17+
# ---[ Options
18+
caffe_option(CPU_ONLY "Build Caffe without CUDA support" OFF) # TODO: rename to USE_CUDA
19+
caffe_option(USE_CUDNN "Build Caffe with cuDNN libary support" ON IF NOT CPU_ONLY)
20+
caffe_option(BUILD_SHARED_LIBS "Build shared libraries" ON)
21+
caffe_option(BUILD_python "Build Python wrapper" ON)
22+
set(python_version "2" CACHE STRING "Specify which python version to use")
23+
caffe_option(BUILD_matlab "Build Matlab wrapper" OFF IF UNIX OR APPLE)
24+
caffe_option(BUILD_docs "Build documentation" ON IF UNIX OR APPLE)
25+
caffe_option(BUILD_python_layer "Build the Caffe python layer" ON)
26+
27+
# ---[ Dependencies
28+
include(cmake/Dependencies.cmake)
29+
30+
# ---[ Flags
31+
if(UNIX OR APPLE)
32+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall")
33+
endif()
34+
35+
if(USE_libstdcpp)
36+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
37+
message("-- Warning: forcing libstdc++ (controlled by USE_libstdcpp option in cmake)")
38+
endif()
39+
40+
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE)
41+
42+
# ---[ Warnings
43+
caffe_warnings_disable(CMAKE_CXX_FLAGS -Wno-sign-compare -Wno-uninitialized)
44+
45+
# ---[ Config generation
46+
configure_file(cmake/Templates/caffe_config.h.in "${PROJECT_BINARY_DIR}/caffe_config.h")
47+
48+
# ---[ Includes
49+
set(Caffe_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
50+
include_directories(${Caffe_INCLUDE_DIR} ${PROJECT_BINARY_DIR})
51+
include_directories(BEFORE src) # This is needed for gtest.
52+
53+
# ---[ Subdirectories
54+
add_subdirectory(src/gtest)
55+
add_subdirectory(src/caffe)
56+
add_subdirectory(tools)
57+
add_subdirectory(examples)
58+
add_subdirectory(python)
59+
add_subdirectory(matlab)
60+
add_subdirectory(docs)
61+
62+
# ---[ Linter target
63+
add_custom_target(lint COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/lint.cmake)
64+
65+
# ---[ pytest target
66+
add_custom_target(pytest COMMAND python${python_version} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python )
67+
add_dependencies(pytest pycaffe)
68+
69+
# ---[ Configuration summary
70+
caffe_print_configuration_summary()
71+
72+
# ---[ Export configs generation
73+
caffe_generate_export_configs()

LICENSE

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
COPYRIGHT
2+
3+
All contributions by the University of California:
4+
Copyright (c) 2014, 2015, The Regents of the University of California (Regents)
5+
All rights reserved.
6+
7+
All other contributions:
8+
Copyright (c) 2014, 2015, the respective contributors
9+
All rights reserved.
10+
11+
Caffe uses a shared copyright model: each contributor holds copyright over
12+
their contributions to Caffe. The project versioning records all such
13+
contribution and copyright details. If a contributor wants to further mark
14+
their specific copyright on a particular contribution, they should indicate
15+
their copyright solely in the commit message of the change when it is
16+
committed.
17+
18+
LICENSE
19+
20+
Redistribution and use in source and binary forms, with or without
21+
modification, are permitted provided that the following conditions are met:
22+
23+
1. Redistributions of source code must retain the above copyright notice, this
24+
list of conditions and the following disclaimer.
25+
2. Redistributions in binary form must reproduce the above copyright notice,
26+
this list of conditions and the following disclaimer in the documentation
27+
and/or other materials provided with the distribution.
28+
29+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
33+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39+
40+
CONTRIBUTION AGREEMENT
41+
42+
By contributing to the BVLC/caffe repository through pull-request, comment,
43+
or otherwise, the contributor releases their content to the
44+
license and copyright terms herein.

0 commit comments

Comments
 (0)