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

'str' object is not callable #1

Open
jerryliu3 opened this issue Apr 4, 2018 · 0 comments
Open

'str' object is not callable #1

jerryliu3 opened this issue Apr 4, 2018 · 0 comments

Comments

@jerryliu3
Copy link

After creating a morphable model and an MMFitter and a LucasKanadeMMFitter, I want to call the _fit() or fit_from_shape() method on an image. The image has landmarks in a .pts file. I am getting an error that 'str' object is not callable, with the trace leading to inside the _prepare_image function on the line: feature_image = self.holistic_features(tmp_image). Would you have any explanation for this?

From what I know, this is an issue where it expected a different type (such as an Image class) but it got a string type instead. I also came across this error when initializing the LucasKanadeMMFitter and specifying lk_algorithm_cls = 'SimultaneousForwardAdditive' instead of leaving it as the default (SimultaneousForwardAdditive) which is of Type type instead of Type string.

I am not sure if this is the reason, but it says in the comments that _prepare_image expects a menpo.image.Image or subclass and a menpo.shape.PointCloud but for some reason when I import the images using menpo.io.import_image() and image.landmarks['PTS'] they give me objects of type menpo.image.base.Image and menpo.shape.pointcloud.PointCloud.

Any help would be greatly appreciated!

Jerry

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

1 participant