Darknet/YOLO v3.0-149-gb11c9d5
Object Detection Framework
 
Loading...
Searching...
No Matches
darknet_internal.hpp File Reference

Classes

struct  box_label
 
struct  boxabs
 
struct  contrastive_params
 
struct  Darknet::Output_Object
 This is used to help keep some state between calls to functions fill_network_boxes(), get_yolo_detections(), etc. More...
 
struct  data
 
struct  det_num_pair
 
struct  dxrep
 
struct  ious
 
struct  load_args
 Used when a secondary thread is created to load things, such as images. More...
 
struct  matrix
 
struct  update_args
 

Namespaces

namespace  Darknet
 The namespace for the C++ Darknet API.
 

Macros

#define DARKNET_INCLUDE_ORIGINAL_API
 If you're using some old software that expects the original C API in the Darknet library, then make sure you "#define DARKNET_INCLUDE_ORIGINAL_API" before you include darknet.h.
 
#define SECRET_NUM   -1234
 

Typedefs

typedef struct box_label box_label
 
typedef struct boxabs boxabs
 
typedef struct contrastive_params contrastive_params
 
typedef struct data data
 
typedef struct det_num_pair det_num_pair
 
typedef struct dxrep dxrep
 
typedef struct ious ious
 
typedef struct load_args load_args
 Used when a secondary thread is created to load things, such as images.
 
typedef struct matrix matrix
 
using Darknet::Output_Object_Cache = std::list< Output_Object >
 
typedef struct det_num_pairpdet_num_pair
 
typedef struct update_args update_args
 
using Darknet::VThreads = std::vector< std::thread >
 

Enumerations

enum  ACTIVATION {
  LOGISTIC ,
  RELU ,
  RELU6 ,
  RELIE ,
  LINEAR ,
  RAMP ,
  TANH ,
  PLSE ,
  REVLEAKY ,
  LEAKY ,
  ELU ,
  LOGGY ,
  STAIR ,
  HARDTAN ,
  LHTAN ,
  SELU ,
  GELU ,
  SWISH ,
  MISH ,
  HARD_MISH ,
  NORM_CHAN ,
  NORM_CHAN_SOFTMAX ,
  NORM_CHAN_SOFTMAX_MAXVAL
}
 
enum  BINARY_ACTIVATION {
  MULT ,
  ADD ,
  SUB ,
  DIV
}
 
enum  COST_TYPE {
  SSE ,
  MASKED ,
  L1 ,
  SEG ,
  SMOOTH ,
  WGAN
}
 
enum  data_type {
  DETECTION_DATA ,
  IMAGE_DATA ,
  LETTERBOX_DATA
}
 Things that we can do on a secondary thread. More...
 
enum  IMTYPE {
  PNG ,
  BMP ,
  TGA ,
  JPG
}
 
enum  IOU_LOSS {
  IOU ,
  GIOU ,
  MSE ,
  DIOU ,
  CIOU
}
 
enum  learning_rate_policy {
  CONSTANT ,
  STEP ,
  EXP ,
  POLY ,
  STEPS ,
  SIG ,
  RANDOM ,
  SGDR
}
 
enum  UNUSED_ENUM_TYPE { UNUSED_DEF_VAL }
 
enum  WEIGHTS_NORMALIZATION_T {
  NO_NORMALIZATION ,
  RELU_NORMALIZATION ,
  SOFTMAX_NORMALIZATION
}
 
enum  WEIGHTS_TYPE_T {
  NO_WEIGHTS ,
  PER_FEATURE ,
  PER_CHANNEL
}
 
enum  YOLO_POINT {
  YOLO_CENTER = 1 << 0 ,
  YOLO_LEFT_TOP = 1 << 1 ,
  YOLO_RIGHT_BOTTOM = 1 << 2
}
 

Functions

void * cuda_get_context ()
 
void cuda_pull_array (float *x_gpu, float *x, size_t n)
 
void cuda_pull_array_async (float *x_gpu, float *x, size_t n)
 
void cuda_set_device (int n)
 
void free_layer (Darknet::Layer &l)
 
void free_layer_custom (Darknet::Layer &l, int keep_cudnn_desc)
 
void free_ptrs (void **ptrs, int n)
 
int get_yolo_detections_v3 (Darknet::Network *net, int w, int h, int netw, int neth, float thresh, int *map, int relative, Darknet::Detection *dets, int letter, Darknet::Output_Object_Cache &cache)
 
void init_cpu ()
 
void top_k (float *a, int n, int k, int *index)
 
int yolo_num_detections_v3 (Darknet::Network *net, const int index, const float thresh, Darknet::Output_Object_Cache &cache)
 

Macro Definition Documentation

◆ DARKNET_INCLUDE_ORIGINAL_API

#define DARKNET_INCLUDE_ORIGINAL_API

If you're using some old software that expects the original C API in the Darknet library, then make sure you "#define DARKNET_INCLUDE_ORIGINAL_API" before you include darknet.h.

Internally, Darknet still uses the old C V2 API which is why it is defined in darknet_internal.hpp.

◆ SECRET_NUM

#define SECRET_NUM   -1234
Todo:
V2 what is SECRET_NUM? And/or move to a different header.

Typedef Documentation

◆ box_label

typedef struct box_label box_label

◆ boxabs

typedef struct boxabs boxabs

◆ contrastive_params

◆ data

typedef struct data data

◆ det_num_pair

typedef struct det_num_pair det_num_pair

◆ dxrep

typedef struct dxrep dxrep

◆ ious

typedef struct ious ious

◆ load_args

typedef struct load_args load_args

Used when a secondary thread is created to load things, such as images.

See also
Darknet::load_single_image_data()
data_type

◆ matrix

typedef struct matrix matrix

◆ pdet_num_pair

typedef struct det_num_pair * pdet_num_pair

◆ update_args

typedef struct update_args update_args

Enumeration Type Documentation

◆ ACTIVATION

enum ACTIVATION
Enumerator
LOGISTIC 
RELU 
RELU6 
RELIE 
LINEAR 
RAMP 
TANH 
PLSE 
REVLEAKY 
LEAKY 
ELU 
LOGGY 
STAIR 
HARDTAN 
LHTAN 
SELU 
GELU 
SWISH 
MISH 
HARD_MISH 
NORM_CHAN 
NORM_CHAN_SOFTMAX 
NORM_CHAN_SOFTMAX_MAXVAL 

◆ BINARY_ACTIVATION

Enumerator
MULT 
ADD 
SUB 
DIV 

◆ COST_TYPE

enum COST_TYPE
Enumerator
SSE 
MASKED 
L1 
SEG 
SMOOTH 
WGAN 

◆ data_type

enum data_type

Things that we can do on a secondary thread.

See also
Darknet::load_single_image_data()
load_args::type
Enumerator
DETECTION_DATA 
IMAGE_DATA 

causes Darknet::load_image() and Darknet::resize_image() to be called

LETTERBOX_DATA 

causes Darknet::load_image() and Darknet::letterbox_image() to be called

◆ IMTYPE

enum IMTYPE
Enumerator
PNG 
BMP 
TGA 
JPG 

◆ IOU_LOSS

enum IOU_LOSS
Enumerator
IOU 
GIOU 
MSE 
DIOU 
CIOU 

◆ learning_rate_policy

Enumerator
CONSTANT 
STEP 
EXP 
POLY 
STEPS 
SIG 
RANDOM 
SGDR 

◆ UNUSED_ENUM_TYPE

Todo:
V3 Need to get rid of UNUSED_ENUM_TYPE. And/or move to a different header.
Enumerator
UNUSED_DEF_VAL 

◆ WEIGHTS_NORMALIZATION_T

Enumerator
NO_NORMALIZATION 
RELU_NORMALIZATION 
SOFTMAX_NORMALIZATION 

◆ WEIGHTS_TYPE_T

Enumerator
NO_WEIGHTS 
PER_FEATURE 
PER_CHANNEL 

◆ YOLO_POINT

enum YOLO_POINT
Enumerator
YOLO_CENTER 
YOLO_LEFT_TOP 
YOLO_RIGHT_BOTTOM 

Function Documentation

◆ cuda_get_context()

void * cuda_get_context ( )

◆ cuda_pull_array()

void cuda_pull_array ( float *  x_gpu,
float *  x,
size_t  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cuda_pull_array_async()

void cuda_pull_array_async ( float *  x_gpu,
float *  x,
size_t  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cuda_set_device()

void cuda_set_device ( int  n)
Here is the caller graph for this function:

◆ free_layer()

void free_layer ( Darknet::Layer l)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_layer_custom()

void free_layer_custom ( Darknet::Layer l,
int  keep_cudnn_desc 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_ptrs()

void free_ptrs ( void **  ptrs,
int  n 
)
Here is the caller graph for this function:

◆ get_yolo_detections_v3()

int get_yolo_detections_v3 ( Darknet::Network net,
int  w,
int  h,
int  netw,
int  neth,
float  thresh,
int *  map,
int  relative,
Darknet::Detection dets,
int  letter,
Darknet::Output_Object_Cache cache 
)
Todo:
V3 JAZZ 74 milliseconds
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_cpu()

void init_cpu ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ top_k()

void top_k ( float *  a,
int  n,
int  k,
int *  index 
)
Here is the caller graph for this function:

◆ yolo_num_detections_v3()

int yolo_num_detections_v3 ( Darknet::Network net,
const int  index,
const float  thresh,
Darknet::Output_Object_Cache cache 
)
Todo:
V3 JAZZ 687 milliseconds
Here is the caller graph for this function: