necesito que se carguen multiples imagenes de referencia, no solo una, y que me salga el…
- User
necesito que se carguen multiples imagenes de referencia, no solo una, y que me salga el resultado mas cercano segun el nombre de la imagen, las imagenes estaran en la carpeta images: #include <dlib/dnn.h> #include <dlib/gui_widgets.h> #include <dlib/clustering.h> #include <dlib/string.h> #include <dlib/image_io.h> #include <dlib/image_processing/frontal_face_detector.h>
using namespace dlib; using namespace std;
template <template <int,templateclass,int,typename> class block, int N, templateclass BN, typename SUBNET> using residual = add_prev1<block<N,BN,1,tag1>>;
template <template <int,templateclass,int,typename> class block, int N, templateclass BN, typename SUBNET> using residual_down = add_prev2<avg_pool<2,2,2,2,skip1<tag2<block<N,BN,2,tag1>>>>>;
template <int N, template class BN, int stride, typename SUBNET> using block = BN<con<N,3,3,1,1,relu<BN<con<N,3,3,stride,stride,SUBNET>>>>>;
template <int N, typename SUBNET> using ares = relu<residual<block,N,affine,SUBNET>>; template <int N, typename SUBNET> using ares_down = relu<residual_down<block,N,affine,SUBNET>>;
template using alevel0 = ares_down<256,SUBNET>; template using alevel1 = ares<256,ares<256,ares_down<256,SUBNET>>>; template using alevel2 = ares<128,ares<128,ares_down<128,SUBNET>>>; template using alevel3 = ares<64,ares<64,ares<64,ares_down<64,SUBNET>>>>; template using alevel4 = ares<32,ares<32,ares<32,SUBNET>>>;
using anet_type = loss_metric<fc_no_bias<128,avg_pool_everything< alevel0< alevel1< alevel2< alevel3< alevel4< max_pool<3,3,2,2,relu<affine<con<32,7,7,2,2, input_rgb_image_sized<150>
;
// ----------------------------------------------------------------------------------------
std::vector<matrix<rgb_pixel>> jitter_image( const matrix<rgb_pixel>& img );
// ----------------------------------------------------------------------------------------
int main(int argc, char** argv) try { if (argc != 2) { cout << “Run this example by invoking it like this: " << endl; cout << " ./dnn_face_recognition_ex faces/bald_guys.jpg” << endl; cout << endl; cout << "You will also need to get the face landmarking model file as well as " << endl; cout << "the face recognition model file. Download and then decompress these files from: " << endl; cout << “http://dlib.net/files/shape_predictor_5_face_landmarks.dat.bz2” << endl; cout << “ << endl; cout << endl; return 1; }
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.