资源简介
.YOLOV3darknet.-master...YOLOV3,目标检测算法,目前速度比较快的算法
代码片段和文件信息
#!python3
“““
Python 3 wrapper for identifying objects in images
Requires DLL compilation
Both the GPU and no-GPU version should be compiled; the no-GPU version should be renamed “yolo_cpp_dll_nogpu.dll“.
On a GPU system you can force CPU evaluation by any of:
- Set global variable DARKNET_FORCE_CPU to True
- Set environment variable CUDA_VISIBLE_DEVICES to -1
- Set environment variable “FORCE_CPU“ to “true“
To use either run performDetect() after import or modify the end of this file.
See the docstring of performDetect() for parameters.
Directly viewing or returning bounding-boxed images requires scikit-image to be installed (‘pip install scikit-image‘)
Original *nix 2.7: https://github.com/pjreddie/darknet/blob/0f110834f4e18b30d5f101bf8f1724c34b7b83db/python/darknet.py
Windows Python 2.7 version: https://github.com/AlexeyAB/darknet/blob/fc496d52bf22a0bb257300d3c79be9cd80e722cb/build/darknet/x64/darknet.py
@author: Philip Kahn
@date: 20180503
“““
#pylint: disable=R W0401 W0614 W0703
from ctypes import *
import math
import random
import os
def sample(probs):
s = sum(probs)
probs = [a/s for a in probs]
r = random.uniform(0 1)
for i in range(len(probs)):
r = r - probs[i]
if r <= 0:
return i
return len(probs)-1
def c_array(ctype values):
arr = (ctype*len(values))()
arr[:] = values
return arr
class BOX(Structure):
_fields_ = [(“x“ c_float)
(“y“ c_float)
(“w“ c_float)
(“h“ c_float)]
class DETECTION(Structure):
_fields_ = [(“bbox“ BOX)
(“classes“ c_int)
(“prob“ POINTER(c_float))
(“mask“ POINTER(c_float))
(“objectness“ c_float)
(“sort_class“ c_int)]
class IMAGE(Structure):
_fields_ = [(“w“ c_int)
(“h“ c_int)
(“c“ c_int)
(“data“ POINTER(c_float))]
class metaDATA(Structure):
_fields_ = [(“classes“ c_int)
(“names“ POINTER(c_char_p))]
#lib = CDLL(“/home/pjreddie/documents/darknet/libdarknet.so“ RTLD_GLOBAL)
#lib = CDLL(“darknet.so“ RTLD_GLOBAL)
hasGPU = True
if os.name == “nt“:
cwd = os.path.dirname(__file__)
os.environ[‘PATH‘] = cwd + ‘;‘ + os.environ[‘PATH‘]
winGPUdll = os.path.join(cwd “yolo_cpp_dll.dll“)
winNoGPUdll = os.path.join(cwd “yolo_cpp_dll_nogpu.dll“)
envKeys = list()
for k v in os.environ.items():
envKeys.append(k)
try:
try:
tmp = os.environ[“FORCE_CPU“].lower()
if tmp in [“1“ “true“ “yes“ “on“]:
raise ValueError(“ForceCPU“)
else:
print(“Flag value ‘“+tmp+“‘ not forcing CPU mode“)
except KeyError:
# We never set the flag
if ‘CUDA_VISIBLE_DEVICES‘ in envKeys:
if int(os.environ[‘CUDA_VISIBLE_DEVICES‘]) < 0:
raise ValueError(“ForceCPU“)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-10-13 21:20 darknet-master\
目录 0 2018-10-13 21:20 darknet-master\.circleci\
文件 500 2018-10-13 21:20 darknet-master\.circleci\config.yml
文件 271 2018-10-13 21:20 darknet-master\.gitignore
目录 0 2018-10-13 21:20 darknet-master\3rdparty\
目录 0 2018-10-13 21:20 darknet-master\3rdparty\dll\
目录 0 2018-10-13 21:20 darknet-master\3rdparty\dll\x64\
文件 185976 2018-10-13 21:20 darknet-master\3rdparty\dll\x64\pthreadGC2.dll
文件 82944 2018-10-13 21:20 darknet-master\3rdparty\dll\x64\pthreadVC2.dll
目录 0 2018-10-13 21:20 darknet-master\3rdparty\dll\x86\
文件 119888 2018-10-13 21:20 darknet-master\3rdparty\dll\x86\pthreadGC2.dll
文件 121953 2018-10-13 21:20 darknet-master\3rdparty\dll\x86\pthreadGCE2.dll
文件 55808 2018-10-13 21:20 darknet-master\3rdparty\dll\x86\pthreadVC2.dll
文件 61952 2018-10-13 21:20 darknet-master\3rdparty\dll\x86\pthreadVCE2.dll
文件 57344 2018-10-13 21:20 darknet-master\3rdparty\dll\x86\pthreadVSE2.dll
目录 0 2018-10-13 21:20 darknet-master\3rdparty\include\
文件 42499 2018-10-13 21:20 darknet-master\3rdparty\include\pthread.h
文件 4995 2018-10-13 21:20 darknet-master\3rdparty\include\sched.h
文件 4563 2018-10-13 21:20 darknet-master\3rdparty\include\semaphore.h
目录 0 2018-10-13 21:20 darknet-master\3rdparty\lib\
目录 0 2018-10-13 21:20 darknet-master\3rdparty\lib\x64\
文件 93692 2018-10-13 21:20 darknet-master\3rdparty\lib\x64\libpthreadGC2.a
文件 29738 2018-10-13 21:20 darknet-master\3rdparty\lib\x64\pthreadVC2.lib
目录 0 2018-10-13 21:20 darknet-master\3rdparty\lib\x86\
文件 93480 2018-10-13 21:20 darknet-master\3rdparty\lib\x86\libpthreadGC2.a
文件 93486 2018-10-13 21:20 darknet-master\3rdparty\lib\x86\libpthreadGCE2.a
文件 30334 2018-10-13 21:20 darknet-master\3rdparty\lib\x86\pthreadVC2.lib
文件 30460 2018-10-13 21:20 darknet-master\3rdparty\lib\x86\pthreadVCE2.lib
文件 30460 2018-10-13 21:20 darknet-master\3rdparty\lib\x86\pthreadVSE2.lib
文件 515 2018-10-13 21:20 darknet-master\LICENSE
文件 4543 2018-10-13 21:20 darknet-master\Makefile
............此处省略1909个文件信息
相关资源
- 目标检测.pdf
- 用于目标检测和深度学习的飞机图像
- 基于opencv2.4.3、VS2010的背景差分法目标
- 基于光流法的运动目标检测与跟踪技
- opencv运动目标检测与跟踪源代码
- 基于OpenCV的红外运动目标检测与跟踪
- RCNN目标检测论文
- 数字图像目标检测与识别理论与实践
- opencv学习---运动目标前景检测
- 目标检测总结
- 雷达自动检测与恒虚警处理
- 目标检测方法概述.pdf
- 运动目标检测算法测试视频
- 基于SSD神经网络目标检测的交通标志
- 视频中背景建模目标检测综述(北京
- 基于深度学习目标检测算法综述
- [2011 IROS]People detection in RGB-D data
-
[2010 PAMI] ob
ject Detection with Discrimin - rcnn、fast rcnn、faster rcnn和yolo的算法原
- opencv运动目标检测帧差法
- 雷达目标检测
- SAR影像舰船目标检测
- 动态背景目标检测
- 红外图像的目标检测_识别与跟踪技术
- 基于深度学习的目标检测研究进展
- SSD基于深度学习的目标检测
- yolo算法讲解ppt
- 目标检测评价指标
- 深度学习网络-目标检测
- NMS-gpu和Cython非极大值抑制在windows上的
评论
共有 条评论