So nach ein paar Wochen, ich endlich geschafft, Dlib installiert zu bekommen, und sofort lief ein anderes Problem.Arbeiten mit großen (über 2000x2000) Bilder in Dlib, und sie passen nicht in meinen Bildschirm
Ich heruntergeladen und lief ihr Gesicht Wahrzeichen dector: http://dlib.net/face_landmark_detection.py.html und während das eigentliche Programm funktioniert gut, wenn ich versuche, es auf große Bilder zu laufen:
Die Bilder auf meinem Bildschirm nicht passen :
der Code für die eigentliche keymark Extraktor ist hier:
win = dlib.image_window()
for f in glob.glob(os.path.join(faces_folder_path, "*.jpg")):
print("Processing file: {}".format(f))
img = io.imread(f)
win.clear_overlay()
win.set_image(img)
# Ask the detector to find the bounding boxes of each face. The 1 in the
# second argument indicates that we should upsample the image 1 time. This
# will make everything bigger and allow us to detect more faces.
dets = detector(img, 1)
print("Number of faces detected: {}".format(len(dets)))
for k, d in enumerate(dets):
print("Detection {}: Left: {} Top: {} Right: {} Bottom: {}".format(
k, d.left(), d.top(), d.right(), d.bottom()))
# Get the landmarks/parts for the face in box d.
shape = predictor(img, d)
print("Part 0: {}, Part 1: {} ...".format(shape.part(0),
shape.part(1)))
# Draw the face landmarks on the screen.
win.add_overlay(shape)
Und trotz Durchforsten der Dlib-Dokumentation wird die Fenstergröße in ghe win.set_image()
oder die win.add_overlay()
-Funktionen nicht erwähnt.
Wie würde ich das Fenster verkleinern?
Nein, ich weiß, dass ich es bewegen kann. Ich möchte die tatsächliche Bildgröße ändern. – Rich
So verkleinern Sie mit dem Mausrad –
Ich habe kein Mausrad. – Rich