Giter Site home page Giter Site logo

Comments (6)

speeding-motor avatar speeding-motor commented on May 24, 2024

why need to make a distinction between coord_mask, conf_mask, and class_mask , use the y_true[..., 4] directly is work well ,right?

hope to receive you reply, thanks in advance

from keras-yolo2.

speeding-motor avatar speeding-motor commented on May 24, 2024

the code :

class_wt = tf.ones(num_classes)
class_mask = y_true[..., 4] * tf.gather(self.class_wt, true_box_class)     

is total equals to :
class_mask = y_true[..., 4]
so why still have to do like this, is there other detail I have oversight? it's very appreciate to have any help , thanks in advance

from keras-yolo2.

speeding-motor avatar speeding-motor commented on May 24, 2024

why need to make a distinction between coord_mask, conf_mask, and class_mask , use the y_true[..., 4] directly is work well ,right?

hope to receive you reply, thanks in advance

no, it's not right to use y_true[..., 0] directly, if we do that it more like to random choice some cell to compute the conf_loss, not relative to the y_pred, so it's wrong

from keras-yolo2.

speeding-motor avatar speeding-motor commented on May 24, 2024

maybe use tf.exp(tf.sofrmax(pred[..., 2:4])) instead of tf.exp(pred[..., 2:4]) ?

because tf.exp(pred[..., 2:4]) is always NAN in training

from keras-yolo2.

chhluo avatar chhluo commented on May 24, 2024

I m very confused with this, I still read know the loss_code but still don't know why,
what directly different with this,

conf_mask = conf_mask + tf.to_float(best_ious < 0.6) * (1 - y_true[..., 4])
conf_mask = conf_mask + y_true[..., 4] (forget to multiply best_ious >0.6 ? )

here compute the pred_box and true_box iou in each picture, and get the best anchor for each per cell prod anchor_box,
1、iou_scores shape = [batch_size, grid_w, grid_h, anchor_num, max_box_per_image],
2、and then use,best_iou = tf.reduce_max(iou_scores, axis=4), get each best iou for each cell,
shape =[batch_size, grid_w, grid_h, anchor_num]
3、if the iou <0.6, it means the iou is not enough, so conf_mask[I]=0,
if iou >0.6, if means here probability have box, so conf_mask[i]=1

why still need to calculate the conf_mask but not use y_ture[...,4], just like the coord_mask, it's not easy to got is , every little help is very appreciate, thank in advance
@experiencor @hobson @mrshu @sirotenko @usatenko

I have the same quesion, please tell me that if you solve the problem.

from keras-yolo2.

speeding-motor avatar speeding-motor commented on May 24, 2024

I m very confused with this, I still read know the loss_code but still don't know why,
what directly different with this,

conf_mask = conf_mask + tf.to_float(best_ious < 0.6) * (1 - y_true[..., 4])
conf_mask = conf_mask + y_true[..., 4] (forget to multiply best_ious >0.6 ? )

here compute the pred_box and true_box iou in each picture, and get the best anchor for each per cell prod anchor_box,
1、iou_scores shape = [batch_size, grid_w, grid_h, anchor_num, max_box_per_image],
2、and then use,best_iou = tf.reduce_max(iou_scores, axis=4), get each best iou for each cell,
shape =[batch_size, grid_w, grid_h, anchor_num]
3、if the iou <0.6, it means the iou is not enough, so conf_mask[I]=0,
if iou >0.6, if means here probability have box, so conf_mask[i]=1
why still need to calculate the conf_mask but not use y_ture[...,4], just like the coord_mask, it's not easy to got is , every little help is very appreciate, thank in advance
@experiencor @hobson @mrshu @sirotenko @usatenko

I have the same quesion, please tell me that if you solve the problem.

I stil not got this

from keras-yolo2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.