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

CNN Face Detection with tensor as input #21

Open
hamedato opened this issue Sep 11, 2019 · 0 comments
Open

CNN Face Detection with tensor as input #21

hamedato opened this issue Sep 11, 2019 · 0 comments

Comments

@hamedato
Copy link

I am generating some face images using Conv2DTranspose. I'd like to output the 68 landmarks as the final output rather than the generated image. So, I used lambda layer to define my custom function. However, cnn_face_detection_model_v1 says it only accepts either list or array and not tensors. How Can I bring cnn_face_detection_model_v1 into my custom function? Here's the full error description:

TypeError: call(): incompatible function arguments. The following argument types are supported:
1. (self: dlib.cnn_face_detection_model_v1, imgs: list, upsample_num_times: int=0, batch_size: int=128) -> std::vector<std::vector<dlib::mmod_rect,std::allocatordlib::mmod_rect >,std::allocator<std::vector<dlib::mmod_rect,std::allocatordlib::mmod_rect > > >
2. (self: dlib.cnn_face_detection_model_v1, img: array, upsample_num_times: int=0) -> std::vector<dlib::mmod_rect,std::allocatordlib::mmod_rect >

Invoked with: <dlib.cnn_face_detection_model_v1 object at 0x000001D00FC0FF48>, <tf.Tensor 'conv2d/BiasAdd:0' shape=(?, 160, 160, 3) dtype=float32>, 1

Did you forget to #include <pybind11/stl.h>? Or <pybind11/complex.h>,
<pybind11/functional.h>, <pybind11/chrono.h>, etc. Some automatic
conversions are optional and require extra headers to be included
when compiling your pybind11 module.

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