- Visual Studio 2019
- NVIDIA CUDA (cuda-toolkit-archive)
- NVIDIA cuDNN (cudnn-archive)
- OpenCV 2.4 이상 (4.1)
Darknet project
GitHub - AlexeyAB/darknet: YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Da
YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet ) - GitHub - AlexeyAB/darknet: YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object ...
github.com
Visual Studio 설정
darknet-master\build\darknet\darknet.vcxproj 파일 수정
: <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> : <PlatformToolset>v142</PlatformToolset> : <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.1.props" /> </ImportGroup> : <AdditionalIncludeDirectories>$(OPENCV_DIR)\include;$(SolutionDir)..\..\include;$(SolutionDir)..\..\3rdparty\stb\include;$(SolutionDir)..\..\3rdparty\pthreads\include;$(CUDA_PATH_V10_1)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> : <AdditionalLibraryDirectories>$(OPENCV_DIR)\x64\vc15\lib;$(CUDA_PATH)\lib\$(PlatformName);$(CUDNN)\lib\x64;$(cudnn)\lib\x64;..\..\3rdparty\pthreads\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> : <PostBuildEvent> <Command>xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_ffmpeg???_64.dll" "$(OutDir)" xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_world???.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cublas64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cudart64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cusolver64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\curand64_*.dll" "$(OutDir)" </Command> </PostBuildEvent> : <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.1.targets" /> </ImportGroup> :
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{4CF5694F-12A5-4012-8D94-9A0915E9FEB5}</ProjectGuid> <RootNamespace>darknet</RootNamespace> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.1.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <OutDir>$(SolutionDir)$(Platform)\</OutDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <OutDir>$(SolutionDir)$(Platform)\</OutDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories>$(OPENCV_DIR)\include;$(SolutionDir)..\..\include;$(SolutionDir)..\..\3rdparty\stb\include;$(SolutionDir)..\..\3rdparty\pthreads\include;$(CUDA_PATH_V10_1)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>CUDNN_HALF;CUDNN;_CRTDBG_MAP_ALLOC;_MBCS;_TIMESPEC_DEFINED;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_RAND_S;GPU;WIN32;DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <UndefinePreprocessorDefinitions>OPENCV;</UndefinePreprocessorDefinitions> <MultiProcessorCompilation>true</MultiProcessorCompilation> <ForcedIncludeFiles>stdlib.h;crtdbg.h;%(ForcedIncludeFiles)</ForcedIncludeFiles> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(OPENCV_DIR)\x64\vc15\lib;$(CUDA_PATH)\lib\$(PlatformName);$(CUDNN)\lib\x64;$(cudnn)\lib\x64;..\..\3rdparty\pthreads\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile> <AdditionalDependencies>pthreadVC2.lib;cublas.lib;curand.lib;cudart.lib;%(AdditionalDependencies)</AdditionalDependencies> <AssemblyDebug>true</AssemblyDebug> </Link> <CudaCompile> <CodeGeneration>compute_30,sm_30;compute_75,sm_75</CodeGeneration> <TargetMachinePlatform>64</TargetMachinePlatform> </CudaCompile> <PostBuildEvent> <Command>xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_ffmpeg???_64.dll" "$(OutDir)" xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_world???.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cublas64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cudart64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cusolver64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\curand64_*.dll" "$(OutDir)" </Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories>$(OPENCV_DIR)\include;$(SolutionDir)..\..\include;$(SolutionDir)..\..\3rdparty\stb\include;$(SolutionDir)..\..\3rdparty\pthreads\include;$(CUDA_PATH_V10_1)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>OPENCV;CUDNN_HALF;CUDNN;_TIMESPEC_DEFINED;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_RAND_S;GPU;WIN32;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <CLanguageStandard>c11</CLanguageStandard> <CppLanguageStandard>c++1y</CppLanguageStandard> <PrecompiledHeaderCompileAs>CompileAsCpp</PrecompiledHeaderCompileAs> <CompileAs>Default</CompileAs> <UndefinePreprocessorDefinitions>NDEBUG</UndefinePreprocessorDefinitions> </AdditionalUsingDirectories> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <AdditionalLibraryDirectories>$(OPENCV_DIR)\x64\vc15\lib;$(CUDA_PATH)\lib\$(PlatformName);$(CUDNN)\lib\x64;$(cudnn)\lib\x64;..\..\3rdparty\pthreads\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>pthreadVC2.lib;cublas.lib;curand.lib;cudart.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)\$(TargetName)$(TargetExt)</OutputFile> </Link> <CudaCompile> <TargetMachinePlatform>64</TargetMachinePlatform> <CodeGeneration>compute_30,sm_30;compute_75,sm_75</CodeGeneration> </CudaCompile> <PostBuildEvent> <Command>xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_ffmpeg???_64.dll" "$(OutDir)" xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_world???.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cublas64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cudart64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cusolver64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\curand64_*.dll" "$(OutDir)" </Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> <CudaCompile Include="..\..\src\activation_kernels.cu" /> <CudaCompile Include="..\..\src\avgpool_layer_kernels.cu" /> <CudaCompile Include="..\..\src\blas_kernels.cu" /> <CudaCompile Include="..\..\src\col2im_kernels.cu" /> <ClInclude Include="..\..\src\upsample_layer.h" /> <ClInclude Include="..\..\src\utils.h" /> <ClInclude Include="..\..\src\yolo_layer.h" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.1.targets" /> </ImportGroup> </Project>
OpenCV, cuDNN, GPU architecture 설정
$(OPENCV_DIR)\include $(SolutionDir)..\..\include $(SolutionDir)..\..\3rdparty\stb\include $(SolutionDir)..\..\3rdparty\pthreads\include $(CUDA_PATH_V10_1)\include
$(OPENCV_DIR)\x64\vc15\lib $(CUDA_PATH)\lib\$(PlatformName) $(CUDNN)\lib\x64;$(cudnn)\lib\x64 $(SolutionDir)..\..\3rdparty\pthreads\lib;
관련 DLL 복사
xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_ffmpeg???_64.dll" "$(OutDir)" xcopy /d /y "$(OpenCV_DIR)\x64\vc15\opencv_world???.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cublas64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cudart64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\cusolver64_*.dll" "$(OutDir)" xcopy /d /y "$(CUDA_PATH_V10_1)\bin\curand64_*.dll" "$(OutDir)"
테스트 실행
미리 훈련된 weight 값 다운로드
- yolov3-openimages.cfg (247 MB COCO Yolo v3) - requires 4 GB GPU-RAM:
https://pjreddie.com/media/files/yolov3-openimages.weights - yolov3-spp.cfg (240 MB COCO Yolo v3) - requires 4 GB GPU-RAM:
https://pjreddie.com/media/files/yolov3-spp.weights - yolov3.cfg (236 MB COCO Yolo v3) - requires 4 GB GPU-RAM:
https://pjreddie.com/media/files/yolov3.weights - yolov3-tiny.cfg (34 MB COCO Yolo v3 tiny) - requires 1 GB GPU-RAM:
https://pjreddie.com/media/files/yolov3-tiny.weights - yolov2.cfg (194 MB COCO Yolo v2) - requires 4 GB GPU-RAM:
https://pjreddie.com/media/files/yolov2.weights - yolo-voc.cfg (194 MB VOC Yolo v2) - requires 4 GB GPU-RAM:
http://pjreddie.com/media/files/yolo-voc.weights - yolov2-tiny.cfg (43 MB COCO Yolo v2) - requires 1 GB GPU-RAM:
https://pjreddie.com/media/files/yolov2-tiny.weights - yolov2-tiny-voc.cfg (60 MB VOC Yolo v2) - requires 1 GB GPU-RAM:
http://pjreddie.com/media/files/yolov2-tiny-voc.weights - yolo9000.cfg (186 MB Yolo9000-model) - requires 4 GB GPU-RAM:
http://pjreddie.com/media/files/yolo9000.weights
...\build\darknet\x64>darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg ./yolov3.weights ./data/dog.jpg
CUDA-version: 10010 (10020), cuDNN: 7.6.1, CUDNN_HALF=1, GPU count: 1 OpenCV version: 4.1.0 compute_capability = 610, cudnn_half = 0 net.optimized_memory = 0 batch = 1, time_steps = 1, train = 0 layer filters size/strd(dil) input output 0 conv 32 3 x 3/ 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BF 1 conv 64 3 x 3/ 2 416 x 416 x 32 -> 208 x 208 x 64 1.595 BF 2 conv 32 1 x 1/ 1 208 x 208 x 64 -> 208 x 208 x 32 0.177 BF 3 conv 64 3 x 3/ 1 208 x 208 x 32 -> 208 x 208 x 64 1.595 BF 4 Shortcut Layer: 1, wt = 0, wn = 0, outputs: 208 x 208 x 64 0.003 BF 5 conv 128 3 x 3/ 2 208 x 208 x 64 -> 104 x 104 x 128 1.595 BF 6 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF 7 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF 8 Shortcut Layer: 5, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF 9 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF 10 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF 11 Shortcut Layer: 8, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF 12 conv 256 3 x 3/ 2 104 x 104 x 128 -> 52 x 52 x 256 1.595 BF 13 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 14 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 15 Shortcut Layer: 12, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 16 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 17 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 18 Shortcut Layer: 15, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 19 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 20 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 21 Shortcut Layer: 18, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 22 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 23 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 24 Shortcut Layer: 21, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 25 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 26 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 27 Shortcut Layer: 24, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 28 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 29 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 30 Shortcut Layer: 27, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 31 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 32 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 33 Shortcut Layer: 30, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 34 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 35 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 36 Shortcut Layer: 33, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF 37 conv 512 3 x 3/ 2 52 x 52 x 256 -> 26 x 26 x 512 1.595 BF 38 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 39 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 40 Shortcut Layer: 37, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 41 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 42 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 43 Shortcut Layer: 40, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 44 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 45 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 46 Shortcut Layer: 43, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 47 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 48 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 49 Shortcut Layer: 46, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 50 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 51 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 52 Shortcut Layer: 49, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 53 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 54 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 55 Shortcut Layer: 52, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 56 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 57 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 58 Shortcut Layer: 55, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 59 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 60 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 61 Shortcut Layer: 58, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF 62 conv 1024 3 x 3/ 2 26 x 26 x 512 -> 13 x 13 x1024 1.595 BF 63 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF 64 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 65 Shortcut Layer: 62, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF 66 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF 67 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 68 Shortcut Layer: 65, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF 69 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF 70 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 71 Shortcut Layer: 68, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF 72 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF 73 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 74 Shortcut Layer: 71, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF 75 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF 76 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 77 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF 78 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 79 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF 80 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 81 conv 255 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 255 0.088 BF 82 yolo [yolo] params: iou loss: mse (2), iou_norm: 0.75, cls_norm: 1.00, scale_x_y: 1.00 83 route 79 -> 13 x 13 x 512 84 conv 256 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 256 0.044 BF 85 upsample 2x 13 x 13 x 256 -> 26 x 26 x 256 86 route 85 61 -> 26 x 26 x 768 87 conv 256 1 x 1/ 1 26 x 26 x 768 -> 26 x 26 x 256 0.266 BF 88 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 89 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 90 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 91 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF 92 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF 93 conv 255 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 255 0.177 BF 94 yolo [yolo] params: iou loss: mse (2), iou_norm: 0.75, cls_norm: 1.00, scale_x_y: 1.00 95 route 91 -> 26 x 26 x 256 96 conv 128 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 128 0.044 BF 97 upsample 2x 26 x 26 x 128 -> 52 x 52 x 128 98 route 97 36 -> 52 x 52 x 384 99 conv 128 1 x 1/ 1 52 x 52 x 384 -> 52 x 52 x 128 0.266 BF 100 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 101 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 102 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 103 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF 104 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF 105 conv 255 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 255 0.353 BF 106 yolo [yolo] params: iou loss: mse (2), iou_norm: 0.75, cls_norm: 1.00, scale_x_y: 1.00 Total BFLOPS 65.879 avg_outputs = 532444 Allocate additional workspace_size = 52.43 MB Loading weights from ./yolov3.weights... seen 64, trained: 32013 K-images (500 Kilo-batches_64) Done! Loaded 107 layers from weights-file ./data/dog.jpg: Predicted in 57.593000 milli-seconds. bicycle: 99% dog: 100% truck: 94%
Docker 사용하기
$ docker pull votiethuy/tensorflow1.12-base
$ docker run -it --rm -v /c/TensorFlow/DW2TF:/dw2tf votiethuy/tensorflow1.12-base # python main.py --cfg 'data/yolov3.cfg' --weights 'data/yolov3.weights' --output 'data/'
'ML' 카테고리의 다른 글
COCO Dataset (0) | 2023.08.16 |
---|---|
Pascal VOC(Visual Object Classes) Challenges (0) | 2023.08.15 |
분류 모델의 성능평가지표 Accuracy, Recall, Precision, F1-score (0) | 2022.12.19 |