pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.84k stars 21.33k forks source link

What does " float * mask " mean in struct detection? Thanks! #1291

Open srzhu97 opened 5 years ago

srzhu97 commented 5 years ago

typedef struct detection{ box bbox; int classes; float prob; float mask; float objectness; int sort_class; } detection;

Does anyone know what " float *mask" means? The definition of "detection" is in darknet.h as above. I saw it was used in "draw_detections" in image.c. But when I ran yolov2-tiny or yolov3-tiny, I found that it was always zero as it never printed "mask" as follows. So I am very curious about when will "mask" be used and what that means?

if (dets[i].mask){ printf("mask\n"); image mask = float_to_image(14, 14, 1, dets[i].mask); image resized_mask = resize_image(mask, b.wim.w, b.him.h); image tmask = threshold_image(resized_mask, .5); embed_image(tmask, im, left, top); free_image(mask); free_image(resized_mask); free_image(tmask); }

Fenix0817 commented 4 years ago

Hi @srzhu97, Did you find the answer?

Best regards.