mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Replaced the raw_input() calls with a call into dlib since raw_input() isn't
available in python3.
This commit is contained in:
parent
e2680f087b
commit
e00f6f63ca
@ -58,4 +58,4 @@ for f in sys.argv[1:]:
|
||||
win.clear_overlay()
|
||||
win.set_image(img)
|
||||
win.add_overlay(dets)
|
||||
raw_input("Hit enter to continue")
|
||||
dlib.hit_enter_to_continue()
|
||||
|
@ -81,4 +81,4 @@ for f in glob.glob(os.path.join(faces_folder_path, "*.jpg")):
|
||||
win.add_overlay(shape)
|
||||
|
||||
win.add_overlay(dets)
|
||||
raw_input("Hit enter to continue")
|
||||
dlib.hit_enter_to_continue()
|
||||
|
@ -117,7 +117,7 @@ for f in glob.glob(os.path.join(faces_folder, "*.jpg")):
|
||||
win.clear_overlay()
|
||||
win.set_image(img)
|
||||
win.add_overlay(dets)
|
||||
raw_input("Hit enter to continue")
|
||||
dlib.hit_enter_to_continue()
|
||||
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ detector2 = dlib.train_simple_object_detector(images, boxes, options)
|
||||
|
||||
# Now let's look at its HOG filter!
|
||||
win_det.set_image(detector2)
|
||||
raw_input("Hit enter to continue")
|
||||
dlib.hit_enter_to_continue()
|
||||
|
||||
# Note that you don't have to use the XML based input to
|
||||
# test_simple_object_detector(). If you have already loaded your training
|
||||
|
@ -123,5 +123,5 @@ for f in glob.glob(os.path.join(faces_folder, "*.jpg")):
|
||||
win.add_overlay(shape)
|
||||
|
||||
win.add_overlay(dets)
|
||||
raw_input("Hit enter to continue")
|
||||
dlib.hit_enter_to_continue()
|
||||
|
||||
|
@ -74,6 +74,14 @@ double _assignment_cost (
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
void hit_enter_to_continue()
|
||||
{
|
||||
std::cout << "Hit enter to continue";
|
||||
std::cin.get();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
void bind_other()
|
||||
{
|
||||
using boost::python::arg;
|
||||
@ -140,5 +148,8 @@ present in the output. "
|
||||
ensures \n\
|
||||
- saves the data to the given file in libsvm format "
|
||||
);
|
||||
|
||||
def("hit_enter_to_continue", hit_enter_to_continue,
|
||||
"Asks the user to hit enter to continue and pauses until they do so.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user