darknet-kr
kr: 다크넷(darknet): 윈도우와 리눅스를 위한 욜로-v3(yolo-v3)과 욜로-v2(yolo-v2) 출처: https://github.com/AlexeyAB/darknet | 다크넷 | 설치 | 욜로 | 이미지넷분류 | 악몽 | 재사용신경망 | 다크고 | 꼬맹이망 | 분류기벼림 | 사용방법 | | - | - | - | - | - | - | - | - | - | - | (개체 검출을 위한 신경망) - 텐서코어를 리눅스와 윈도우에서 사용할 수 있다.
https://zeuseyera.github.io/darknet-kr/11_SaYongBeob/SaYongBeob_Yolo-v3.html

1. Visual Studio 2019 설치
2. CUDA 설치
CUDA Toolkit Archive
Previous releases of the CUDA Toolkit, GPU Computing SDK, documentation and developer drivers can be found using the links below. Please select the release you want from the list below, and be sure to check www.nvidia.com/drivers for more recent production drivers appropriate for your hardware configuration.
3. CuDNN 설치
cuDNN Archive
Explore and download past releases from cuDNN GPU-accelerated primitive library for deep neural networks for your development work.

4. NVIDIA Nsight Visual Studio Edition 설치
NVIDIA Nsight Visual Studio Edition
For compute developers working in Eclipse development environment, please see Nsight Eclipse Edition NVIDIA® Nsight™ Visual Studio Edition is an application development environment for heterogeneous platforms which brings GPU computing into Microsoft Visual Studio. NVIDIA Nsight™ VSE allows you to build and debug integrated GPU kernels and native CPU code as well as inspect the state of the GPU and memory.
5. OpenCV 설치
- Darknet에서는 OpenCV 3.4 이전 버전 설치를 권장한다.
Releases - OpenCV
Courses are (a little) oversubscribed and we apologize for your enrollment delay. As an apology, you will receive a 10% discount on all waitlist course purchases. Current wait time will be sent to you in the confirmation email. Thank you!


6. 환경 변수 설정
아래의 경로를 환경 변수에 추가해준다.
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\extras\CUPTI\lib64
C:\cudnn-windows-x86_64-8.7.0.84_cuda11-archive\bin
C:\opencv\build\x64\vc15\bin
7. NVIDIA Nsight Integration(Visual Studio Extension)설치
NVIDIA Nsight Integration
NVIDA Nsight Integration is a Visual Studio extension that provides access to Nsight Systems, Nsight Compute, and Nsight Graphics activities within Visual Studio under the Nsight menu. Integrated versions of these tools used to be available in the Nsight Visual Studio Edition tool, but they have since been removed or deprecated.

8. yolov3 코드 다운로드
git clone https://github.com/pjreddie/darknet
GitHub - pjreddie/darknet: Convolutional Neural Networks
Convolutional Neural Networks. Contribute to pjreddie/darknet development by creating an account on GitHub.

9. Visual Studio 활용하기
- 프로젝트 실행
- darknet 폴더 안의 build/darknet/darknet.sln 파일을 실행한다.
- 프로젝트 종속성 설정
- CUDA C/C++ 활성화 (CUDA C/C++ 옵션이 활성화되어있다면 다음단계로…)
- 다음 경로의 파일을 모두 복사한다.
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\extras\visual_studio_integration\MSBuildExtensions
- 복사한 파일을 다음 경로로 모두 붙여넣기한다.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations
- Developer Command Prompt for VS 2019을 관리자 권한으로 실행한 후, 다음 명령어를 입력한다.
devenv.com /setup /nosetupvstemplates
- Visual Studio를 재실행한 후에, CUDA C/C++ 옵션이 활성화되는지 확인한다.
- 다음 경로의 파일을 모두 복사한다.
- 프로젝트 속성
- CUDA C/C++ > Device > Code Generation에 그래픽카드에 맞는 설정을 적용한다.
- 그래픽카드의 설정을 확인하려면 https://developer.nvidia.com/cuda-gpus에 접속한 후, CUDA-Enabled GeForce and TITAN Products을 선택한다.
- 그래픽카드의 Compute Capability의 값이 중요한데, 해당 수치가 8.6이면 compute_86,sm_86;으로 적용하면 된다.
- CUDA C/C++ > Device > Code Generation에 그래픽카드에 맞는 설정을 적용한다.
10. darknet 테스트