Facenet: problems in installation

Created on 28 Mar 2017  Â·  13Comments  Â·  Source: davidsandberg/facenet

after installation, the python site-packages directory appears "src" "test" dirs, so the "import facenet" does not work. Only "from src import facenet" works.

All 13 comments

@vaxin
I encountered the same problem. I think this is related to the environment or the system, you can choose the code to run the normal.

The package should either be valid or not be an option.

I think this fixes the package issue:

  • rename src to facenet
  • Edit setup.py
#!/usr/bin/env python

from distutils.core import setup

setup(name='facenet',
      version='0.1',
      description='Face Recognition using Tensorflow',
      author='David Sandberg',
      author_email='[email protected]',
      url='https://github.com/davidsandberg/facenet/',
      packages=['facenet','facenet.align','facenet.models'],
      package_data={
        'facenet.align': ['*.npy'],
      },
     )
  • pip wheel .
  • pip install facenet-*.whl
  • from facenet.align import detect_face

EDIT: Fixed setup.py to include npy files

@davidsandberg It would be great if you could upload it to pypi so we can install it without having to git clone and mess with the path

@hamstah I would rather not upload it to pypi since it would send the signal that this repo is a finalized application rather than a framework to simplify your own research in the face recognition area.

I see. Would you be open to make the changes to the setup file to make it
easier to package it?
I can make a or if you're ok with the idea.

Thanks!

On 8 May 2017 8:16 am, "David Sandberg" notifications@github.com wrote:

@hamstah https://github.com/hamstah I would rather not upload it to
pypi since it would send the signal that this repo is a finalized
application rather than a framework to simplify your own research in the
face recognition area.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/davidsandberg/facenet/issues/222#issuecomment-299791363,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALfjg42LvlUwphaoRvn7wdQueRazVJ_ks5r3sFogaJpZM4MrPDR
.

If you make a PR on setup.py I will be happy to merge it.

Great. to get it to work, src has to be renamed to facenet. It's a bigger
change than just the setup.py. I might need your help to double check
documentation etc to make sure all paths are updated.

Let me know if you're ok with that change, I understand if it's too big for
now.

On 8 May 2017 8:28 am, "David Sandberg" notifications@github.com wrote:

If you make a PR on setup.py I will be happy to merge it.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/davidsandberg/facenet/issues/222#issuecomment-299793314,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALfjkV2HbAGuQ9WX9h6OP8Hdbcab7dTks5r3sQjgaJpZM4MrPDR
.

Hi my name is Edgar Acosta. I want to run Facenet, detect face, the name of the person, and emotions. I download TensorFlow (Using container), I have python 2.7, and also iPython and Jupyter as my interactive editor. I need some advice:

To clone Facenet: Do I need to clone inside Tensor Flow directory?.
Do you believe my setup is OK, or do I need to install something else.?
Is there any instructions to make it up and running with my WEB Cam?

Thank you very basic questions but I am very new to this Fascinating field.

My email address is : [email protected]

I would rather not upload it to PyPI since it would send the signal that this repo is a finalized application rather than a framework to simplify your own research in the face recognition area.

@davidsandberg Could we add a WARNING message in PyPI package to let users know the package is not finalized but only a package installer for convenience?

Hi my name is Yash Khandehediya. I've cloned facenet code and tried to run it. Actually I am executing this code in small snippets for better understanding of code but problem I encountered is that, at this part of the code
""
nrof_preprocess_threads = 4
images_and_labels = []
for _ in range(nrof_preprocess_threads):
filenames, label = input_queue.dequeue()
images = []
for filename in tf.unstack(filenames):
file_contents = tf.read_file(filename)
image = tf.image.decode_image(file_contents, channels=3)
if args.random_rotate:
image = tf.py_func(facenet.random_rotate_image, [image], tf.uint8)
if args.random_crop:
image = tf.random_crop(image, [args.image_size, args.image_size, 3])
else:
image = tf.image.resize_image_with_crop_or_pad(image, args.image_size, args.image_size)
if args.random_flip:
image = tf.image.random_flip_left_right(image)

        #pylint: disable=no-member
        image.set_shape((args.image_size, args.image_size, 3))
        images.append(tf.image.per_image_standardization(image))
    images_and_labels.append([images, label])

""
my system hangs and shows no response for hours and days. So I want to ask that do loops make tensorflow slower? if yes or not what can be the solution to this problem. I also tried by using small batch size and less epoch size.

Thank you.

my email id is: [email protected]

can I now use pip install to use facenet?
pip install facenet?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RaviRaaja picture RaviRaaja  Â·  3Comments

arunxz98 picture arunxz98  Â·  3Comments

kuaikuaikim picture kuaikuaikim  Â·  3Comments

MaartenBloemen picture MaartenBloemen  Â·  3Comments

ouyangbei picture ouyangbei  Â·  4Comments