Skip to content

Commit 818a4e1

Browse files
committed
Update README
1 parent 8888b4e commit 818a4e1

File tree

2 files changed

+54
-12
lines changed

2 files changed

+54
-12
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,16 @@ to any service that supports Docker images.
237237

238238
## Common Issues
239239

240-
##### Issue: `Illegal instruction (core dumped)` when using face_recognition or running examples.
240+
Issue: `Illegal instruction (core dumped)` when using face_recognition or running examples.
241241

242242
Solution: `dlib` is compiled with SSE4 or AVX support, but your CPU is too old and doesn't support that.
243243
You'll need to recompile `dlib` after [making the code change outlined here](https://github.com/ageitgey/face_recognition/issues/11#issuecomment-287398611).
244244

245-
##### Issue: `RuntimeError: Unsupported image type, must be 8bit gray or RGB image.` when running the webcam examples.
245+
Issue: `RuntimeError: Unsupported image type, must be 8bit gray or RGB image.` when running the webcam examples.
246246

247247
Solution: Your webcam probably isn't set up correctly with OpenCV. [Look here for more](https://github.com/ageitgey/face_recognition/issues/21#issuecomment-287779524).
248248

249-
##### Issue: `MemoryError` when running `pip2 install face_recognition`
249+
Issue: `MemoryError` when running `pip2 install face_recognition`
250250

251251
Solution: The face_recognition_models file is too big for your available pip cache memory. Instead,
252252
try `pip2 --no-cache-dir install face_recognition` to avoid the issue.

README.rst

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,27 @@ Recognize who appears in each photo.
7575
7676
results = face_recognition.compare_faces([biden_encoding], unknown_encoding)
7777
78+
You can even use this library with other Python libraries to do
79+
real-time face recognition:
80+
81+
|image7|
82+
83+
See `this
84+
example <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py>`__
85+
for the code.
86+
7887
Installation
7988
------------
8089

81-
| Python 3 / Python 2 are fully supported. Only macOS and
82-
| Linux are tested. I have no idea if this will work on Windows.
90+
Requirements:
91+
92+
- Python 3+ or Python 2.7
93+
- macOS or Linux (Windows untested)
94+
- `Also can run on a Raspberry Pi 2+ (follow these specific
95+
instructions) <https://gist.github.com/ageitgey/1ac8dbe8572f3f533df6269dab35df65>`__
96+
- A `pre-configured VM
97+
image <https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b>`__
98+
is also available.
8399

84100
Install this module from pypi using ``pip3`` (or ``pip2`` for Python 2):
85101

@@ -100,6 +116,11 @@ source <https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf>`__
100116
``pip3 install face_recognition``
101117
| again to complete your installation.
102118
119+
| If you are still having trouble installing this, you can also try out
120+
this
121+
| `pre-configured
122+
VM <https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b>`__.
123+
103124
Usage
104125
-----
105126

@@ -239,9 +260,16 @@ All the examples are available
239260
- `Find and recognize unknown faces in a photograph based on
240261
photographs of known
241262
people <https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py>`__
242-
- `Recognize faces in live video using your webcam (Requires OpenCV to
243-
be
263+
- `Recognize faces in live video using your webcam - Simple / Slower
264+
Version (Requires OpenCV to be
244265
installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam.py>`__
266+
- `Recognize faces in live video using your webcam - Faster Version
267+
(Requires OpenCV to be
268+
installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py>`__
269+
- `Recognize faces on a Raspberry Pi w/
270+
camera <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_on_raspberry_pi.py>`__
271+
- `Run a web service to recognize faces via HTTP (Requires Flask to be
272+
installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/web_service_example.py>`__
245273

246274
How Face Recognition Works
247275
--------------------------
@@ -257,27 +285,40 @@ Caveats
257285
very well on children. It tends to mix
258286
up children quite easy using the default comparison threshold of 0.6.
259287

288+
Deployment to Cloud Hosts (Heroku, AWS, etc)
289+
--------------------------------------------
290+
291+
| Since ``face_recognition`` depends on ``dlib`` which is written in
292+
C++, it can be tricky to deploy an app
293+
| using it to a cloud hosting provider like Heroku or AWS.
294+
295+
| To make things easier, there's an example Dockerfile in this repo that
296+
shows how to run an app built with
297+
| ``face_recognition`` in a `Docker <https://www.docker.com/>`__
298+
container. With that, you should be able to deploy
299+
| to any service that supports Docker images.
300+
260301
Common Issues
261302
-------------
262303

263-
Issue: ``Illegal instruction (core dumped)`` when using face\_recognition or running examples.
264-
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
304+
Issue: ``Illegal instruction (core dumped)`` when using
305+
face\_recognition or running examples.
265306

266307
| Solution: ``dlib`` is compiled with SSE4 or AVX support, but your CPU
267308
is too old and doesn't support that.
268309
| You'll need to recompile ``dlib`` after `making the code change
269310
outlined
270311
here <https://github.com/ageitgey/face_recognition/issues/11#issuecomment-287398611>`__.
271312
272-
Issue: ``RuntimeError: Unsupported image type, must be 8bit gray or RGB image.`` when running the webcam example.
273-
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
313+
Issue:
314+
``RuntimeError: Unsupported image type, must be 8bit gray or RGB image.``
315+
when running the webcam examples.
274316

275317
Solution: Your webcam probably isn't set up correctly with OpenCV. `Look
276318
here for
277319
more <https://github.com/ageitgey/face_recognition/issues/21#issuecomment-287779524>`__.
278320

279321
Issue: ``MemoryError`` when running ``pip2 install face_recognition``
280-
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
281322

282323
| Solution: The face\_recognition\_models file is too big for your
283324
available pip cache memory. Instead,
@@ -315,6 +356,7 @@ Thanks
315356
.. |image4| image:: https://cloud.githubusercontent.com/assets/896692/23625282/7f2d79dc-025d-11e7-8728-d8924596f8fa.png
316357
.. |image5| image:: https://cloud.githubusercontent.com/assets/896692/23625283/80638760-025d-11e7-80a2-1d2779f7ccab.png
317358
.. |image6| image:: https://cloud.githubusercontent.com/assets/896692/23625229/45e049b6-025d-11e7-89cc-8a71cf89e713.png
359+
.. |image7| image:: https://cloud.githubusercontent.com/assets/896692/24430398/36f0e3f0-13cb-11e7-8258-4d0c9ce1e419.gif
318360
.. |known| image:: https://cloud.githubusercontent.com/assets/896692/23582466/8324810e-00df-11e7-82cf-41515eba704d.png
319361
.. |unknown| image:: https://cloud.githubusercontent.com/assets/896692/23582465/81f422f8-00df-11e7-8b0d-75364f641f58.png
320362

0 commit comments

Comments
 (0)