我想在图像的迷你批次中一次处理std :: vector中的许多图像,例如n,并在DLib中获得更好的并行性。我正在寻找这样的东西:-please refer to the code here
vector<matrix<rgb_pixel>> batch;
matrix<rgb_pixel> img1, img2;
batch.push_back(img1);
batch.push_back(img2);
auto dets = net(batch);
/* further processing/code */
而不是一次传递一张图像:-
for(i=0;i<2;i++)
auto dets = net(img[i]);
/* further processing/code */