250x250
Notice
Recent Posts
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
관리 메뉴

일상 코딩

[windows 10/윈도우 10] darkflow 설치 및 환경설정 본문

딥러닝/darkflow - YOLO

[windows 10/윈도우 10] darkflow 설치 및 환경설정

polarcompass 2022. 12. 5. 00:16
728x90
설치 및 구동 환경
OS WINDOWS 10 64bit
CPU i5-12400F
GPU NVIDIA GTX 1080 (Pascal 아키텍쳐)
RAM 64GB (이것보다 작아도 충분)

 

설치 할 프로그램 목록 및 순서
1 Visual Studio 2015 업데이트 3
2 Anaconda
3 Nvidia 그래픽드라이버
4 CUDA
5 cuDNN
6 Darkflow
labelImg -  라벨링 툴

https://github.com/heartexlabs/labelImg/releases

 

Releases · heartexlabs/labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source ...

github.com

Release 버전 v1.8.1을 받아서 실행한다.

Darkflow - YOLO 커스텀 학습 라이브러리

https://github.com/thtrieu/darkflow

 

GitHub - thtrieu/darkflow: Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export con

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices - GitHub - thtrieu/darkflow: Translate darknet to tensorflow. ...

github.com

 

Darkflow 설치 요구 버전
Tensorflow-gpu 1.4.0 2017.11.
그래픽드라이버 최소 버전 450.36.06+ 이후로 다 됨  
CUDA SDK 버전 8.0 2017.02.
cuDNN 6.0 2017.04.27.
파이썬 3.6 2016.12.23.
컴파일러 Visual Studio 2015 업데이트 3 2015
빌드 도구 CMAKE v3.6.3  

 

Tensorflow-gpu - 1.4.0
https://www.tensorflow.org/install/source_windows#tested_build_configurations

nvidia 그래픽드라이버 최소 요구 버전
https://docs.nvidia.com/deploy/cuda-compatibility/#source-compatibility

Compute Capability에 따른 그래픽카드 및 CUDA 맞춤 버전
https://en.wikipedia.org/wiki/CUDA

CUDA 8.0과 맞는 가장 최근에 나온 그래픽카드 목록

풀칩을 사용하는 TITAN Xp(중고가격 30~40만원)를 중고로 사용하는게 구해서 시스템 구성하는걸 추천한다.

 

Visual Studio 2015 업데이트 3 Community iso 다운로드 설치
https://go.microsoft.com/fwlink/?LinkId=615448&clcid=0x409

https://www.kunal-chowdhury.com/2015/07/download-visualstudio-2015.html?m=0

 

Download Visual Studio 2015 (ISO / Offline Installer + Web Installer)

How to download Visual Studio 2015, Download Visual Studio 2015 RTM ISO image, Download Visual Studio 2015 Offline Installer, Visual Studio 2015 ISO download, Download .NET Framework 4.6 Free, Visual Studio 2015 System Requirements, Visual Studio 2015 down

www.kunal-chowdhury.com

iso 다운로드

Visual Studio 2022 Build Tools 설치
https://visualstudio.microsoft.com/ko/downloads/

Visual Studio 2022 build tools 다운로드

다운로드 링크

https://aka.ms/vs/17/release/vs_BuildTools.exe

MSVC VS 2015 C++ 빌드 도구 꼭 설치한다.

Anaconda 설치

https://www.anaconda.com/products/distribution

 

Anaconda | Anaconda Distribution

Anaconda's open-source Distribution is the easiest way to perform Python/R data science and machine learning on a single machine.

www.anaconda.com

 

conda 가상환경 설정

관리자권한으로 PowerShell 실행

# 가상 환경 python 3.6버전으로 생성
conda create -n DFTest python=3.6 pip
# 가상 환경 진입
conda activate DFTest
# Tensorflow설치
pip install tensorflow-gpu==1.4

# 나머지 라이브러리 설치
pip install scipy numpy opencv-python
pip install cython

 

git 설치
https://git-scm.com/download/win

본인 OS에 맞는bit 버전 선택

git을 통한 Darkflow 다운로드

관리자권한으로 PowerShell 실행 후 빨간줄 형태로 만들어 준다.

cd ..
cd ..
git clone https://github.com/thtrieu/darkflow

 

PowerShell 창은 설치 종료시까지 끄지 않는다.

수동 다운로드

https://github.com/thtrieu/darkflow

 

GitHub - thtrieu/darkflow: Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export con

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices - GitHub - thtrieu/darkflow: Translate darknet to tensorflow. ...

github.com

수동 다운로드 해준다.
C 드라이브 최상단에 다운받고 압축해제 한다.

darkflow는 이상태로 대기

 

그래픽드라이버 설치
https://www.nvidia.co.kr/Download/Find.aspx?lang=kr#

위에 언급한 최소 버전 이상이라면 아무거나 받아도 상관없다.

 

CUDA Toolkit 8.0 설치
https://developer.nvidia.com/cuda-toolkit-archive

위에서 자신에게 맞는 CUDA Toolkit 버전 및 그래픽카드를 찾았다면

이 단계를 진행한다.

cuda 8.0 GA2

https://developer.nvidia.com/cuda-80-ga2-download-archive

 

CUDA Toolkit 8.0 - Feb 2017

Select Target Platform Click on the green buttons that describe your target platform. Only supported platforms will be shown. Operating System Architecture Distribution Version Installer Type Do you want to cross-compile? Yes No Select Host Platform Click

developer.nvidia.com

OS / Arch / Version / Install Type

<설치시 유의사항>

사용자 정의 설치 > CUDA > Visual Studio Integration 체크 해제 후 설치한다.

 

cuDNN 6.0 설치
https://developer.nvidia.com/rdp/cudnn-archive

cuDNN 6.0 & CUDA 8.0 두개의 버전이 맞는지 확인 후 다운로드 한다.

cuDNN은 폴더안에 있는 파일을 옮기는 걸로 설치가 완료 된다.

방법은 아래 블로그로 가서 확인하면 자세히 나와있다.

https://afsdzvcx123.tistory.com/entry/%EC%9D%B8%EA%B3%B5%EC%A7%80%EB%8A%A5-Windows%EC%9C%88%EB%8F%84%EC%9A%B0-CUDA-cuDNN-%EC%84%A4%EC%B9%98%EB%B0%A9%EB%B2%95

 

[인공지능] Windows(윈도우) CUDA, cuDNN 설치방법

참조 https://developer.nvidia.com/cuda-downloads https://developer.nvidia.com/cuda-toolkit-archive https://www.wikiwand.com/en/CUDA#/GPUs_supported https://mickael-k.tistory.com/17 1. 현재 그래픽카드 버전 정보 현재 제 개인PC 그래픽카

afsdzvcx123.tistory.com

 

Darkflow 빌드
# C 드라이브 최상단으로 위치에서 darkflow로 이동
# cd d까지 친후 Tab을 누르면 자동으로 darkflow가 완성된다.
cd darkflow
# build
python setup.py build_ext --inplace

입력 후 오류 메세지가 나오지 않으면 성공

python flow --h

입력 후 다음 메세지가 나오면 성공

중간 중간 다양한 오류가 나오게 될텐데

다음 참조 블로그를 보시면 될 것 같다.

참조

https://iagreebut.tistory.com/90

 

[Window10] YOLO Darkflow 설치하기

일주일간의 개고생과 무수한 삽질.. 그리고 희생된 데스크탑(포맷함) 제 컴퓨터에는 지금 롤과 YOLO Darkflow를 돌릴 수 있는 환경에 필요한 세팅 뿐... 일단 YOLO를 사용한다고 생각한 이상, darknet에

iagreebut.tistory.com

 

728x90