Skip to content

Commit

Permalink
support GeForce RTX on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
springkim committed Oct 29, 2018
1 parent 621ecbf commit 81ac08e
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 2,107 deletions.
2,060 changes: 0 additions & 2,060 deletions 3rdparty/include/cudnn.h

This file was deleted.

Binary file modified 3rdparty/lib/cudnn.lib
Binary file not shown.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# CMakeList.txt.pl
# CMakeList.txt
# YOLOv3_SpringEdition
#
# Created by kimbomm on 2018. 04. 01...
Expand All @@ -19,6 +19,7 @@ LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_52,code=sm_52) #for maxwell
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_60,code=sm_60) #for pascal
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_61,code=sm_61) #for pascal
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_62,code=sm_62) #for jetson tx2
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_75,code=sm_75) #for turing
#https://developer.nvidia.com/cuda-gpus

add_definitions(-DGPU)
Expand Down
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
YOLOv3_SpringEdition <img src="https://i.imgur.com/oYejfWp.png" title="Windows8" width="48">
--------------------------------------------------------------------------------------------


작성중....
VS2017
LINUX
기타 등등...

<img src="https://i.imgur.com/ElCyyzT.png" title="Windows8" width="48"><img src="https://i.imgur.com/O5bye0l.png" width="48"><img src="https://i.imgur.com/kmfOMZz.png" width="48"><img src="https://i.imgur.com/6OT8yM9.png" width="48">

#### YOLOv3 C++ Windows and Linux interface library. (Train,Detect both)
Expand Down Expand Up @@ -150,21 +144,24 @@ change log
**build_windows.bat** and **build_linux.sh** will download automatically correct version of cudnn. and build as cmake.

```
Windows + 1080ti + CUDA8.0 + cudnn7.1 + yolov3 = 36FPS
Windows + 1080ti + CUDA9.0 + cudnn7.1 + yolov3 = 36FPS
Windows + 1080 + CUDA9.0 + cudnn7.1 + yolov3 = 27FPS
Windows + 1080 + CUDA9.0 + cudnn7.1 + yolov3(spp) = 15FPS
Ubuntu + 1080 + CUDA8.0 + cudnn7.1 + yolov3 = 30FPS
Ubuntu + 1080 + CUDA9.0 + cudnn7.1 + yolov3 = 30FPS
Windows + 2080ti + CUDA 10.0 + cudnn7.3.1 + yolov3 = 44FPS
Windows + 1080ti + CUDA 8.0 + cudnn7.1 + yolov3 = 36FPS
Windows + 1080ti + CUDA 9.0 + cudnn7.1 + yolov3 = 36FPS
Windows + 1080 + CUDA 9.0 + cudnn7.1 + yolov3 = 27FPS
Windows + 1080 + CUDA 9.0 + cudnn7.1 + yolov3(spp) = 15FPS
Ubuntu + 1080 + CUDA 8.0 + cudnn7.1 + yolov3 = 30FPS
Ubuntu + 1080 + CUDA 9.0 + cudnn7.1 + yolov3 = 30FPS
```

Software requirement
--------------------

- CMake
- CUDA 8.0 or 9.0(9.1 is not working)
- CUDA 8.0 or 9.0(9.1 is not working) or 10.0
- OpenCV(for testing)
- Visual Studio 2015
- Visual Studio 2013, 2015, 2017

Hardware requirement
--------------------
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9687976f0cdc7564667e42d0d6932ed20a75528c
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
11 changes: 6 additions & 5 deletions Yolov3_SpringEdition_Test/download_cudnn64_7.dll.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ set /p "ver90="<"cuda_ver.txt"
if not "%ver90%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.1cuda9.0/cudnn64_7.dll','cudnn64_7.dll')"
)
nvcc -V | findstr /C:"release 10.0" > cuda_ver.txt
set /p "ver100="<"cuda_ver.txt"
if not "%ver100%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.3.1_cuda10.0/cudnn64_7.dll','cudnn64_7.dll')"
)
DEL cuda_ver.txt
move cudnn64_7.dll "%cudir%"
::nvcc -V | findstr /C:"release 9.1" > cuda_ver.txt
::set /p "ver91="<"cuda_ver.txt"
::if not "%ver91%" equ "" (
:: powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/l0zsm9g78ciexzh/cudnn64_7.dll?dl=1','cudnn64_7.dll')"
::)

pause
8 changes: 5 additions & 3 deletions Yolov3_SpringEdition_Test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include"YOLOv3SE.h"
#include<chrono>
#include<iostream>
void Yolo3Test(std::string weights, std::string cfg,std::string names) {
YOLOv3 detector;
detector.Create(weights,cfg,names);
Expand All @@ -21,13 +22,13 @@ void Yolo3Test(std::string weights, std::string cfg,std::string names) {
t_end = std::chrono::system_clock::now();
diff = t_end - t_beg;
std::cout << "FPS : " << 1.0 / diff.count() << "\t" << diff.count() << std::endl;
//continue;
continue;
for (auto&box : boxes) {
cv::putText(img, detector.Names(box.m_class), box.tl(), cv::FONT_HERSHEY_SIMPLEX, 1.0, colors[box.m_class], 2);
cv::rectangle(img, box, colors[box.m_class], 2);
}
cv::imshow("original", img);
if (cv::waitKey(0) == 27) {
if (cv::waitKey(10) == 27) {
break;
}
}
Expand Down Expand Up @@ -62,7 +63,8 @@ int main() {
//Yolo3Test("yolov3_darknet53.weights","yolov3_darknet53_coco.cfg","coco.names");

///Test YOLOv3 based on darknet53 with SPP(spatial pyramid pooling)
Yolo3Test("yolov3_darknet53_spp.weights", "yolov3_darknet53_spp_coco.cfg", "coco.names");
Yolo3Test("yolov3_darknet53.weights", "yolov3_darknet53_coco.cfg", "coco.names");
//Yolo3Test("yolov3_darknet53_spp.weights", "yolov3_darknet53_spp_coco.cfg", "coco.names");

///Test Classifier
//ClassifyTest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ set /p "ver90="<"cuda_ver.txt"
if not "%ver90%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.1cuda9.0/cudnn64_7.dll','cudnn64_7.dll')"
)
nvcc -V | findstr /C:"release 10.0" > cuda_ver.txt
set /p "ver100="<"cuda_ver.txt"
if not "%ver100%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.3.1_cuda10.0/cudnn64_7.dll','cudnn64_7.dll')"
)
DEL cuda_ver.txt
move cudnn64_7.dll "%cudir%"
::nvcc -V | findstr /C:"release 9.1" > cuda_ver.txt
::set /p "ver91="<"cuda_ver.txt"
::if not "%ver91%" equ "" (
:: powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/l0zsm9g78ciexzh/cudnn64_7.dll?dl=1','cudnn64_7.dll')"
::)

pause
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ set /p "ver90="<"cuda_ver.txt"
if not "%ver90%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.1cuda9.0/cudnn64_7.dll','cudnn64_7.dll')"
)
nvcc -V | findstr /C:"release 10.0" > cuda_ver.txt
set /p "ver100="<"cuda_ver.txt"
if not "%ver100%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.3.1_cuda10.0/cudnn64_7.dll','cudnn64_7.dll')"
)
DEL cuda_ver.txt
move cudnn64_7.dll "%cudir%"
::nvcc -V | findstr /C:"release 9.1" > cuda_ver.txt
::set /p "ver91="<"cuda_ver.txt"
::if not "%ver91%" equ "" (
:: powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/l0zsm9g78ciexzh/cudnn64_7.dll?dl=1','cudnn64_7.dll')"
::)

pause
22 changes: 15 additions & 7 deletions build_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ if not "%ver90%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.1cuda9.0/cudnn.h','3rdparty\include\cudnn.h')"
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.1cuda9.0/cudnn.lib','3rdparty\lib\cudnn.lib')"
)
::nvcc -V | findstr /C:"release 9.1" > cuda_ver.txt
::set /p "ver91="<"cuda_ver.txt"
::if not "%ver91%" equ "" (
:: powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/0487mtsb4dao5xb/cudnn.h?dl=1','3rdparty\include\cudnn.h')"
:: powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/l64r6jbkw0fe5p4/cudnn.lib?dl=1','3rdparty\lib\cudnn.lib')"
::)
nvcc -V | findstr /C:"release 10.0" > cuda_ver.txt
set /p "ver100="<"cuda_ver.txt"
if not "%ver100%" equ "" (
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.3.1_cuda10.0/cudnn.h','3rdparty\include\cudnn.h')"
powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/springkim/YOLOv3_SpringEdition/releases/download/cudnn7.3.1_cuda10.0/cudnn.lib','3rdparty\lib\cudnn.lib')"
)
DEL cuda_ver.txt
md build
cd build
cmake .. -G "Visual Studio 14 2015 Win64"
if exist "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\MSBuild.exe" (
cmake .. -G "Visual Studio 12 2013 Win64"
)
if exist "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\MSBuild.exe" (
cmake .. -G "Visual Studio 14 2015 Win64"
)
if exist 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MSBuild.exe' (
cmake .. -G "Visual Studio 15 2017 Win64"
)
cmake --build . --config Release --target ALL_BUILD
pause
6 changes: 0 additions & 6 deletions git_update.bat

This file was deleted.

7 changes: 7 additions & 0 deletions git_upload.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off
title github upload
set /p msg=Enter commit msg:
git add -A
git commit -m "%msg%"
git push origin master
pause
File renamed without changes.

0 comments on commit 81ac08e

Please sign in to comment.