Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB committed Mar 27, 2019
1 parent 7b1ef39 commit f5fd086
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 19 deletions.
26 changes: 13 additions & 13 deletions .travis.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if(ENABLE_CUDA)
add_definitions(-DZED_STEREO)
message("ZED Camera support enabled")
else()
message(WARNING "ZED SDK not found !")
message("ZED SDK not found !")
set(ENABLE_ZED_CAMERA "FALSE" CACHE BOOL "Enable ZED Camera support" FORCE)
endif()
endif()
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ More details: http://pjreddie.com/darknet/yolo/
* **GPU with CC >= 3.0**: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
* on Linux **GCC or Clang**, on Windows **MSVS 2017 (v15)** https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15#

Compiling on **Windows** by using `Cmake-GUI` as on this [**IMAGE**](https://user-images.githubusercontent.com/4096485/55107892-6becf380-50e3-11e9-9a0a-556a943c429a.png): Configure -> Optional platform for generator (Set: x64) -> Finish -> Generate -> Open Project -> x64 & Release -> Build -> Build solution

Compiling on **Linux** by using command `make` (or alternative way by using command: `cmake . && make` )

#### Pre-trained models

There are weights-file for different cfg-files (smaller size -> faster speed & lower accuracy:
Expand All @@ -69,7 +73,7 @@ You can get cfg-files by path: `darknet/cfg/`

#### Yolo v3 in other frameworks

* Convert `yolov3.weights`/`cfg` model to **TensorFlow**: by using [mystic123](https://github.com/mystic123/tensorflow-yolo-v3) or [jinyu121](https://github.com/jinyu121/DW2TF) projects
* Convert `yolov3.weights`/`cfg` model to **TensorFlow**: by using [mystic123](https://github.com/mystic123/tensorflow-yolo-v3) or [jinyu121](https://github.com/jinyu121/DW2TF) projects, and [TensorFlow-lite](https://www.tensorflow.org/lite/guide/get_started#2_convert_the_model_format)
* To use Yolo v3 model in **Intel OpenVINO** (Myriad X / USB Neural Compute Stick / Arria FPGA): read this [manual](https://software.intel.com/en-us/articles/OpenVINO-Using-TensorFlow#converting-a-darknet-yolo-model)
* **OpenCV-dnn** is very fast DNN implementation on CPU (x86/ARM-Android), use `yolov3.weights`/`cfg` with: [C++ example](https://github.com/opencv/opencv/blob/8c25a8eb7b10fb50cda323ee6bec68aa1a9ce43c/samples/dnn/object_detection.cpp#L192-L221), [Python example](https://github.com/opencv/opencv/blob/8c25a8eb7b10fb50cda323ee6bec68aa1a9ce43c/samples/dnn/object_detection.py#L129-L150)

Expand Down Expand Up @@ -165,6 +169,10 @@ To run Darknet on Linux use examples from this article, just use `./darknet` ins

### How to compile on Windows (using `vcpkg`)

If you have installed: MSVS 2015/2017, CUDA 10, cuDNN 7.x, OpenCV 3.x. Then compile Darknet by using `C:\Program Files\CMake\bin\cmake-gui.exe` as on this [**IMAGE**](https://user-images.githubusercontent.com/4096485/55107892-6becf380-50e3-11e9-9a0a-556a943c429a.png): Configure -> Optional platform for generator (Set: x64) -> Finish -> Generate -> Open Project -> x64 & Release -> Build -> Build solution

Otherwise:

1. Install or update Visual Studio to at least version 2017, making sure to have it fully patched (run again the installer if not sure to automatically update to latest version). If you need to install from scratch, download VS from here: [Visual Studio 2017 Community](http://visualstudio.com)

2. Install CUDA and cuDNN
Expand Down Expand Up @@ -387,7 +395,7 @@ It will create `.txt`-file for each `.jpg`-image-file - in the same directory an

9. After training is complete - get result `yolo-obj_final.weights` from path `build\darknet\x64\backup\`

* After each 100 iterations you can stop and later start training from this point. For example, after 2000 iterations you can stop training, and later just copy `yolo-obj_2000.weights` from `build\darknet\x64\backup\` to `build\darknet\x64\` and start training using: `darknet.exe detector train data/obj.data yolo-obj.cfg yolo-obj_2000.weights`
* After each 100 iterations you can stop and later start training from this point. For example, after 2000 iterations you can stop training, and later just start training using: `darknet.exe detector train data/obj.data yolo-obj.cfg backup\yolo-obj_2000.weights`

(in the original repository https://github.com/pjreddie/darknet the weights-file is saved only once every 10 000 iterations `if(iterations > 1000)`)

Expand Down
3 changes: 1 addition & 2 deletions src/crnn_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void forward_crnn_layer_gpu(layer l, network_state state)
layer self_layer = *(l.self_layer);
layer output_layer = *(l.output_layer);

/*

#ifdef CUDNN_HALF // slow and bad for training
if (!state.train && state.net.cudnn_half) {
s.index = state.index;
Expand All @@ -278,7 +278,6 @@ void forward_crnn_layer_gpu(layer l, network_state state)
cuda_convert_f32_to_f16(output_layer.weights_gpu, output_layer.c*output_layer.n*output_layer.size*output_layer.size, output_layer.weights_gpu16);
}
#endif //CUDNN_HALF
*/


if (state.train) {
Expand Down
4 changes: 4 additions & 0 deletions src/dark_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ int gpu_index = 0;
#endif // USE_CMAKE_LIBS
#endif // CUDNN

#if defined(CUDNN_HALF) && !defined(CUDNN)
#error "If you set CUDNN_HALF=1 then you must set CUDNN=1"
#endif

void cuda_set_device(int n)
{
gpu_index = n;
Expand Down
2 changes: 1 addition & 1 deletion src/network_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void forward_backward_network_gpu(network net, float *x, float *y)
state.delta = 0;
state.truth = *net.truth_gpu;
state.train = 1;
#ifdef CUDNN_HALF
#if defined(CUDNN_HALF) && defined(CUDNN)
int i;
for (i = 0; i < net.n; ++i) {
layer l = net.layers[i];
Expand Down

0 comments on commit f5fd086

Please sign in to comment.