Commit 483be903 authored by mihaivanea's avatar mihaivanea
Browse files

Trying to get a rectangular box approximation from an elipse

parent 825e971e
......@@ -15,7 +15,16 @@ with tf.Session() as sess:
model = facenet.create_mtcnn(sess)
img = imread(path)
#box, pts = facenet.detect_face(img,10, *model, threshold=[0.25, 0.25, 0.25], factor=0.5)
box = [[123.583300, 85.549500, 1.265839, 269.693400]]
#box = [[123.583300, 85.549500, 1.265839, 269.693400, 161.781200]]
major_r = 123.583300
minor_r = 85.549500
c_x = 269.693400
c_y = 161.781200
x1 = c_x - major_r
y1 = c_y - minor_r
x2 = c_x + major_r
y2 = c_y + minor_r
box = [[x1, y1, x2, y2]]
pts = []
out = facenet.add_labels(img, box, pts)
imsave("out.jpg",out)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment