MAIN_QTHREAD(int, argc, char **, argv)
{
try
{
cout << "Start\n";
string conffname = "/home/cmogilko/eblearn/demos/mnist/mnist.conf";
configuration conf(conffname, true, true, false); // configuration file
conf.set("run_type", "detect"); // tell conf that we are in train mode
conf.resolve();
if (!conf.exists("root2") || !conf.exists("current_dir"))
{
conf.set("root2", "/home/cmogilko/eblearn/demos/minst");
conf.set("current_dir", "/home/cmogilko/eblearn/demos/minst");
}
bool sync = conf.exists_true("sync_outputs");
mutex out_mutex;
detection_thread<float> *dt = new detection_thread<float>(conf, &out_mutex, NULL, NULL, sync);
dt->start();
string ffname("/home/cmogilko/eblearn/tools/data/mnist/3.ppm");
string fname("2");
bool res = dt->set_data(ffname, fname, 1);
cout << "set data = " << res << endl;
bboxes bb;
idx<ubyte> detframe;
uint total_saved = 0;
string processed_fname;
uint processed_id = 0;
svector<midx<float> > samples;
bboxes bbsamples;
bool skipped = false;
bool updated = dt->get_data(bb, detframe, total_saved, processed_fname, &processed_id, &samples, &bbsamples, &skipped);
cout << updated << endl;
if (!dt->finished())
dt->stop();
delete dt;
}
eblcatch();
return 0;
}
But after set_data always appears Segmentation fault and get_data never invokes. And if I comment set_data-get_data sections, it will be dt->start(); dt->stop(); It will never terminates, it freezes before stop().
What is wrong?
--
You received this message because you are subscribed to the Google Groups "eblearn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eblearn+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.