[mlpack-git] [mlpack/mlpack] edge_boxes: feature extraction updated, tests added (#696)

Marcus Edel notifications at github.com
Wed Jun 15 14:36:38 EDT 2016


> +
> +      pos_loc = arma::shuffle(pos_loc);
> +      neg_loc = arma::shuffle(neg_loc);
> +
> +      arma::umat loc(n_patches_per_gt * 2, 2);
> +      //cout << "pos_loc size: " << arma::size(pos_loc) << " neg_loc size: " << arma::size(neg_loc) << endl;
> +      //cout << "n_patches_per_gt = " << n_patches_per_gt << endl;
> +      for(size_t i = 0; i < n_patches_per_gt; ++i)
> +      {
> +        loc.row(i) = arma::ind2sub(arma::size(dis.n_rows, dis.n_cols), pos_loc(i) ).t();
> +        //cout << "pos_loc: " << loc(i, 0) << ", " << loc(i, 1) << endl;
> +      }
> +
> +      for(size_t i = n_patches_per_gt; i < 2 * n_patches_per_gt; ++i)
> +      {
> +        loc.row(i) = arma::ind2sub(arma::size(dis.n_rows, dis.n_cols), neg_loc(i) ).t();

Regarding how to make sure, ``pos_loc`` does contain ``n_patches_per_gt`` number of locations. You have to check the length of:

``arma::uvec pos_loc = arma::find( (dis < g_rad) % mask );``

if it's less then n_patches_per_gt you should adapt ``n_patches_per_gt`` respectively.



---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/696/files/b38b688edfc4c2ee8bf461240f8384a70575d3a4#r67219609
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160615/940a43b5/attachment.html>


More information about the mlpack-git mailing list