Giter Site home page Giter Site logo

georgegach / face-average Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 7.0 99.36 MB

Averages faces from the input using OpenCV and Dlib

License: MIT License

Python 100.00%
averageface averaging delaunay-triangulation dlib face facelandmarkdetect opencv

face-average's Introduction

Hello there ๐Ÿ‘‹

I'm @Giorgi a Data Architect and Platform Engineer from Tbilisi, Georgia ๐Ÿ‡ฌ๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

๐Ÿšฉ Open to full-time and consulting opportunities as a Data Architect.
๐Ÿ“ซ You can reach me on Facebook or LinkedIn whether it's business or just to chat.

Signed, 

+--[ED25519 256]--+
|          o..    |
|o  . .   . +     |
|oo. +   . o .    |
|oo.+ = + . =     |
|o.o * * S = E    |
| . = X + * = o   |
|  o X * o o      |
| .   * o         |
|      o          |
+----[SHA256]-----+

Giorgi Gachechiladze
AAAAC3NzaC1lZDI1NTE5AAAAIBjKMtNdIL1d6Tyq9mai523QlVTPxb2llcZez4Nfv05g

face-average's People

Contributors

georgegach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

face-average's Issues

cv2.estimateRigidTransform deprecated

Dear George,

many thanks for sharing your face averaging project here!
When trying to run

python ./run.py -i "datasets/us-mp/president" -w -wt 200

I encountered the following error:

Namespace(ext=None, height=400, input='datasets/us-mp/president', noCaching=False, noWarps=False, output=None, template=None, width=300, window=True, windowTime=200)
Faces detected: 1 in ...-regan.jpg: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 6/6 [00:00<00:00, 1262.08it/s]
Loading: ...ident/ronald-regan.jpg: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 7/7 [00:00<00:00, 13.68it/s]
Warping: ...ident/bill-clinton.jpg:   0%|                                                                                  | 0/7 [00:00<?, ?it/s]Traceback (most recent call last):
  File "./run.py", line 27, in <module>
    Averager(width=options.width, height=options.height).run(path=options.input, ext=ext, window=options.window, showWarps=not options.noWarps, windowTime=options.windowTime, useCaching=not options.noCaching, template=options.template).save(name=options.output)
  File "./src/faceAverage.py", line 99, in run
    tform = self.similarityTransform(eyecornerSrc, eyecornerDst)
  File "./src/faceAverage.py", line 234, in similarityTransform
    tform = cv2.estimateRigidTransform(np.array([inPts]), np.array([outPts]), False)
AttributeError: module 'cv2' has no attribute 'estimateRigidTransform'

It seems like estimateRigidTransform was deprecated.

Are you planning to update the project? It would be fantastic to be able to use the tool.
Best wishes!

TypeError: Expected Ptr<cv::UMat> for argument 'M'

Dear George,

Thank you for sharing your face average project!

When trying to run:

python ./run.py -i "datasets/us-mp/president" -w -wt 200

I encountered the following error:

Namespace(ext=None, height=400, input='datasets/us-mp/president', noCaching=False, noWarps=False, output=None, template=None, width=300, window=True, windowTime=200) Faces detected: 1 in ...-regan.jpg: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 6/6 [00:00<00:00, 1238.66it/s] Loading: ...ident\ronald-regan.jpg: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 7/7 [00:00<00:00, 22.77it/s] Warping: ...sident\barak-obama.jpg: 0%| | 0/7 [00:01<?, ?it/s] Traceback (most recent call last): File "./run.py", line 27, in <module> Averager(width=options.width, height=options.height).run(path=options.input, ext=ext, window=options.window, showWarps=not options.noWarps, windowTime=options.windowTime, useCaching=not options.noCaching, template=options.template).save(name=options.output) File "./src\faceAverage.py", line 103, in run img = cv2.warpAffine(images[i], tform, (w,h)) TypeError: Expected Ptr<cv::UMat> for argument 'M'

I'm not entirely sure what's causing this to happen - anyways, regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.