[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14058: add backgroud class in box_nms

2019-03-10 Thread GitBox
arcadiaphy commented on issue #14058: add backgroud class in box_nms
URL: https://github.com/apache/incubator-mxnet/pull/14058#issuecomment-471387717
 
 
   @zhreshold OK to go now.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14058: add backgroud class in box_nms

2019-03-07 Thread GitBox
arcadiaphy commented on issue #14058: add backgroud class in box_nms
URL: https://github.com/apache/incubator-mxnet/pull/14058#issuecomment-470430361
 
 
   @zhreshold My PR is complementary to improvements of @ptrendx on cuda 
kernels. After combining all three PRs, `box_nms` is close to the original 
`MultiBoxDetection` operator.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14058: add backgroud class in box_nms

2019-03-06 Thread GitBox
arcadiaphy commented on issue #14058: add backgroud class in box_nms
URL: https://github.com/apache/incubator-mxnet/pull/14058#issuecomment-470061829
 
 
   @zhreshold Sometimes the validation time of SSD_512 on voc dataset is more 
than half an hour before, much longer than training time.
   
   I have written a simple script to show benchmark:
   ```
   import mxnet as mx
   import numpy as np
   import time
   
   np.random.seed(0)
   ctx = mx.gpu(0)
   
   def test_nms(background_ratio):
   batch_size = 32
   prior_number = 10  # SSD_512 has more than 100k prior boxes
   background_number = int(prior_number * background_ratio)
   data = np.zeros((batch_size, prior_number, 6))
   data[:, :, 0] = 0
   data[:, :background_number, 0] = -1
   data[:, :, 1] = np.random.random((batch_size, prior_number))
   
   xmin = np.random.random((batch_size, prior_number))
   ymin = np.random.random((batch_size, prior_number))
   width = np.random.random((batch_size, prior_number))
   height = np.random.random((batch_size, prior_number))
   data[:, :, 2] = xmin
   data[:, :, 3] = ymin
   data[:, :, 4] = xmin + width
   data[:, :, 5] = ymin + height
   
   mx_data = mx.nd.array(data, ctx=ctx)
   start = time.time()
   rv = mx.nd.contrib.box_nms(mx_data, overlap_thresh=0.5, valid_thresh=0, 
topk=400, id_index=0, score_index=1, coord_start=2, background_id=-1)
   mx.nd.waitall()
   print 'background ratio {} process time: {} s'.format(background_ratio, 
time.time() - start)
   
   
   test_nms(0)
   test_nms(0.5)
   test_nms(0.9)
   test_nms(0.99)
   ```
   
   The output:
   ```
   background ratio 0 process time: 22.8679060936 s
   background ratio 0.5 process time: 10.5633630753 s
   background ratio 0.9 process time: 1.97785997391 s
   background ratio 0.99 process time: 0.20063495636 s
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14058: add backgroud class in box_nms

2019-03-06 Thread GitBox
arcadiaphy commented on issue #14058: add backgroud class in box_nms
URL: https://github.com/apache/incubator-mxnet/pull/14058#issuecomment-470011391
 
 
   @zhreshold Currently there are no background_id logic in box_nms operator on 
prefiltering or nms step, so a lot of time is wasted in processing background 
boxes.
   
   To keep operator unchanged, background boxes need to be removed in NDArray 
input.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14058: add backgroud class in box_nms

2019-03-05 Thread GitBox
arcadiaphy commented on issue #14058: add backgroud class in box_nms
URL: https://github.com/apache/incubator-mxnet/pull/14058#issuecomment-469982602
 
 
   @wkcn CI seems OK now, ready for merge.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services