mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Should fix for OpenCV 3.0
This commit is contained in:
parent
7ebaec7306
commit
e625b32e06
@ -7,6 +7,9 @@
|
|||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
#include "box.h"
|
#include "box.h"
|
||||||
|
|
||||||
|
#ifdef OPENCV
|
||||||
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
char *coco_classes[] = {"person","bicycle","car","motorcycle","airplane","bus","train","truck","boat","traffic light","fire hydrant","stop sign","parking meter","bench","bird","cat","dog","horse","sheep","cow","elephant","bear","zebra","giraffe","backpack","umbrella","handbag","tie","suitcase","frisbee","skis","snowboard","sports ball","kite","baseball bat","baseball glove","skateboard","surfboard","tennis racket","bottle","wine glass","cup","fork","knife","spoon","bowl","banana","apple","sandwich","orange","broccoli","carrot","hot dog","pizza","donut","cake","chair","couch","potted plant","bed","dining table","toilet","tv","laptop","mouse","remote","keyboard","cell phone","microwave","oven","toaster","sink","refrigerator","book","clock","vase","scissors","teddy bear","hair drier","toothbrush"};
|
char *coco_classes[] = {"person","bicycle","car","motorcycle","airplane","bus","train","truck","boat","traffic light","fire hydrant","stop sign","parking meter","bench","bird","cat","dog","horse","sheep","cow","elephant","bear","zebra","giraffe","backpack","umbrella","handbag","tie","suitcase","frisbee","skis","snowboard","sports ball","kite","baseball bat","baseball glove","skateboard","surfboard","tennis racket","bottle","wine glass","cup","fork","knife","spoon","bowl","banana","apple","sandwich","orange","broccoli","carrot","hot dog","pizza","donut","cake","chair","couch","potted plant","bed","dining table","toilet","tv","laptop","mouse","remote","keyboard","cell phone","microwave","oven","toaster","sink","refrigerator","book","clock","vase","scissors","teddy bear","hair drier","toothbrush"};
|
||||||
|
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "cuda.h"
|
#include "cuda.h"
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#ifdef OPENCV
|
||||||
#include <fenv.h>
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void run_imagenet(int argc, char **argv);
|
extern void run_imagenet(int argc, char **argv);
|
||||||
extern void run_detection(int argc, char **argv);
|
extern void run_detection(int argc, char **argv);
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
#include "box.h"
|
#include "box.h"
|
||||||
|
|
||||||
|
#ifdef OPENCV
|
||||||
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
char *class_names[] = {"aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"};
|
char *class_names[] = {"aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"};
|
||||||
|
|
||||||
|
@ -3,6 +3,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef OPENCV
|
||||||
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
|
#include "opencv2/imgproc/imgproc_c.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include "stb_image.h"
|
#include "stb_image.h"
|
||||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||||
|
@ -1,18 +1,12 @@
|
|||||||
#ifndef IMAGE_H
|
#ifndef IMAGE_H
|
||||||
#define IMAGE_H
|
#define IMAGE_H
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef OPENCV
|
|
||||||
#include "opencv2/highgui/highgui_c.h"
|
|
||||||
#include "opencv2/imgproc/imgproc_c.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int h;
|
int h;
|
||||||
int w;
|
int w;
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
|
#ifdef OPENCV
|
||||||
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
void train_imagenet(char *cfgfile, char *weightfile)
|
void train_imagenet(char *cfgfile, char *weightfile)
|
||||||
{
|
{
|
||||||
data_seed = time(0);
|
data_seed = time(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user