zhreshold / mxnet-ssd

MXNet port of SSD: Single Shot MultiBox Object Detector. Reimplementation of https://github.com/weiliu89/caffe/tree/ssd
MIT License
764 stars 337 forks source link

How to use HARD_EXAMPLE in mxnet ssd? #140

Open zt706 opened 6 years ago

zt706 commented 6 years ago

Hi: I want to use HARD_EXAMPLE mining, what should I do? Does it only support MAX_NEGATIVE now?

davsol commented 6 years ago

Look at symbol/symbol_builder.py it calls the next function which is the answer for all your questions


mx.contrib.symbol.MultiBoxTarget( *[anchor_boxes, label, cls_preds], overlap_threshold=.5, \ ignore_label=-1, negative_mining_ratio=3, minimum_negative_samples=0, \ negative_mining_thresh=.5, variances=(0.1, 0.1, 0.2, 0.2), name="multibox_target")


You can see the documentation here: http://mxnet.incubator.apache.org/api/python/symbol/contrib.html#mxnet.symbol.contrib.MultiBoxDetection