Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cv2.estimateRigidTransform deprecated #2

Open
DajaDaja opened this issue Jun 28, 2019 · 2 comments
Open

cv2.estimateRigidTransform deprecated #2

DajaDaja opened this issue Jun 28, 2019 · 2 comments

Comments

@DajaDaja
Copy link

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!

@emrecan-s
Copy link

Hi ,
Uninstall the opencv version you have and install the following one.
pip install opencv-python==3.4.2.16
Than it would work

@ankitvirla
Copy link

Thanku @emrecan-s for this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants