mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
some changes, fix opencv
This commit is contained in:
parent
7520949d84
commit
8a6ba2fff3
@ -10,8 +10,8 @@
|
|||||||
#define FRAMES 1
|
#define FRAMES 1
|
||||||
|
|
||||||
#ifdef OPENCV
|
#ifdef OPENCV
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc/imgproc_c.h"
|
||||||
void convert_coco_detections(float *predictions, int classes, int num, int square, int side, int w, int h, float thresh, float **probs, box *boxes, int only_objectness);
|
void convert_coco_detections(float *predictions, int classes, int num, int square, int side, int w, int h, float thresh, float **probs, box *boxes, int only_objectness);
|
||||||
|
|
||||||
extern char *coco_classes[];
|
extern char *coco_classes[];
|
||||||
|
@ -253,6 +253,7 @@ void backward_network(network net, network_state state)
|
|||||||
int i;
|
int i;
|
||||||
float *original_input = state.input;
|
float *original_input = state.input;
|
||||||
float *original_delta = state.delta;
|
float *original_delta = state.delta;
|
||||||
|
state.workspace = net.workspace;
|
||||||
for(i = net.n-1; i >= 0; --i){
|
for(i = net.n-1; i >= 0; --i){
|
||||||
state.index = i;
|
state.index = i;
|
||||||
if(i == 0){
|
if(i == 0){
|
||||||
|
@ -199,7 +199,7 @@ void train_char_rnn(char *cfgfile, char *weightfile, char *filename, int clear,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(i%100==0){
|
if(i%1000==0){
|
||||||
char buff[256];
|
char buff[256];
|
||||||
sprintf(buff, "%s/%s_%d.weights", backup_directory, base, i);
|
sprintf(buff, "%s/%s_%d.weights", backup_directory, base, i);
|
||||||
save_weights(net, buff);
|
save_weights(net, buff);
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#ifdef OPENCV
|
#ifdef OPENCV
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui/highgui_c.h"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc/imgproc_c.h"
|
||||||
image ipl_to_image(IplImage* src);
|
image ipl_to_image(IplImage* src);
|
||||||
void convert_yolo_detections(float *predictions, int classes, int num, int square, int side, int w, int h, float thresh, float **probs, box *boxes, int only_objectness);
|
void convert_yolo_detections(float *predictions, int classes, int num, int square, int side, int w, int h, float thresh, float **probs, box *boxes, int only_objectness);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user