mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
colors
This commit is contained in:
parent
52a6c30748
commit
cf32e7e9b8
@ -111,11 +111,11 @@ void draw_detections(image im, int num, float thresh, box *boxes, float **probs,
|
|||||||
if(prob > thresh){
|
if(prob > thresh){
|
||||||
int width = pow(prob, 1./2.)*10+1;
|
int width = pow(prob, 1./2.)*10+1;
|
||||||
width = 8;
|
width = 8;
|
||||||
printf("%s: %.2f\n", names[class], prob);
|
printf("%s: %.0f%%\n", names[class], prob*100);
|
||||||
int offset = class*17 % classes;
|
int offset = class*1 % classes;
|
||||||
float red = get_color(0,offset,classes);
|
float red = get_color(2,offset,classes);
|
||||||
float green = get_color(1,offset,classes);
|
float green = get_color(1,offset,classes);
|
||||||
float blue = get_color(2,offset,classes);
|
float blue = get_color(0,offset,classes);
|
||||||
float rgb[3];
|
float rgb[3];
|
||||||
rgb[0] = red;
|
rgb[0] = red;
|
||||||
rgb[1] = green;
|
rgb[1] = green;
|
||||||
|
Loading…
Reference in New Issue
Block a user