exadel-inc / CompreFace

Leading free and open-source face recognition system
https://exadel.com/accelerator-showcase/compreface/
Apache License 2.0
4.91k stars 665 forks source link

Jetson gpu cuda support #519

Open alekslyse opened 3 years ago

alekslyse commented 3 years ago

As its a build that support gpu and cuda have any tried to use a nvidia jetson nano that got about 120 cuda cores?

pospielov commented 3 years ago

Hi, unfortunately, Nvidia Jetson Nano has ARM CPU which is not currently supported by CompreFace. So even CPU version won't work

SilvioGiancola commented 3 years ago

I recently tried on a Jetson TX1 (aarch64). The docker composes without displaying any issue, but http://localhost:8000/login is not reachable. Will it be supported in a future release? What are the current limitations/challenges that impede the the docker container to run on aarch64?

pospielov commented 3 years ago

There are several problems with supporting arm CPU:

  1. There is no easy way to automate such build without an arm-based computer. The first option is to find a contributor who has arm device and wants to build CompreFace for Arm. But the downside will be that we won't be able to publish Arm version if he leaves the team. The second option is Docker Buildx. As far as I know, it's in an experimental stage now, but this is the only good option. And we still need to understand how to use it.
  2. Not all libraries are built for Arm CPU. E.g. as far as I know, you can't just install Tensorflow from pip. Best case scenario - we find ready to use guide and build a fully compatible Tensorflow. Worst scenario - we build only TensorFlow lite and will probably have a separate code for arm platforms.
  3. There are lots of options to run neural networks on arm based devices. E.g. if you use Jetson Nano, you'll expect to use full Tensorflow, because you have a good CUDA accelerator. But others could want to use Google Coral, they will want to use TensorFlow Lite because this is the only option. Another option - Intel neural compute stick 2, which also could be run on Raspberry, but can use only the Intel Open Vino framework. So we need to find a way to support all of these frameworks and do not make our code too complex to support. I personally believe that in the near future arm based devices will become more popular(we already have MacBook on arm CPU) and more people spend their time expanding arm ecosystem. CompreFace will definitely support arm devices in the future, the question only - when.
SilvioGiancola commented 3 years ago

Thank you for your very detailed answer, it is very appreciated. Looking forward further development for ARM-based architectures in a (near?) future :)

marcfielding1 commented 2 years ago

For Jetson devices I have several Nano's sitting around I can run tests on, I really would like to see this for, believe it or not, a home assistant project, part of it is an internal tool called "Kane" that integrates with every device in our office(smart tv's, laptops, phones, etc) - part of it for our home shopping hub.

Re the comment on building/buildX I can try and help, just chuck me some tasks and I'll see if I can "make it work"?

marcfielding1 commented 2 years ago

I've got just under a week free by the way so I can get a good run at some research/groundwork if you guys respond quickly :-)

pospielov commented 2 years ago

We would really like to integrate with the home assistant as well, so your research would be so helpful. What I suggest to start from: The critical point here is to build compreface-core image. I think we can start building it on Jetson Nano, so we won't need to setup buildX. To build it, clone the repository and run: docker build -t embedding-calculator --build-arg SKIP_TESTS=true . I think It will fail on RUN pip --no-cache-dir install -r requirements.txt step as there won't be all libraries compiled for ARM in the pip repository. Then we need to collect the list of these libraries and think about what should we do - probably we will need to compile them ourselves. For faster response, you can send your skype (or Whatsapp, or Telegram, any other messenger) to your email: compreface.support@exadel.com

marcfielding1 commented 2 years ago

Heya, sure so I had a thought you can just the actions buildx plugin for this sorta stuff, let me pull the image though and try it locally! Obviously don't leave token as string ya want it in a secret.

I'll ping my WhatsApp there shortly!

Something like this, although this is just out of a workflow I have for a NodeJS project. I can't remember if the names of build targets are right though.

jobs:
  docker-build:
    runs-on: ubuntu-latest
    steps:
      - name: Cache dependencies
        uses: actions/cache@v2
        with:
          path: ~/.npm
          key: npm-${{ hashFiles('package-lock.json') }}
          restore-keys: npm-          
      -
        name: Login to DockerHub
        uses: docker/login-action@v1 
        with:
          username: "marcfielding1"
          password: "TOKEN"
      - uses: actions/setup-node@v2
        with:
          node-version: '14.0.0'
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1          
      -
        name: Build and push
        uses: docker/build-push-action@v2
        with:
          platforms: linux/arm,linux/arm64,linux/amd64
          push: true
          tags: repo/image:latest
marcfielding1 commented 2 years ago

Heya,

Sooo getting there, there is currently a problem with Scikit-image, I've found a solution here from the NVIDIA forums that I'm going to try out.

Build output below:

Sending build context to Docker daemon  10.91MB
Step 1/36 : ARG BASE_IMAGE
Step 2/36 : FROM ${BASE_IMAGE:-python:3.7-slim}
 ---> a1776b632fa3
Step 3/36 : RUN apt-get update && apt-get install -y build-essential cmake git wget unzip         curl yasm pkg-config libswscale-dev libtbb2 libtbb-dev libjpeg-dev         libpng-dev libtiff-dev libavformat-dev libpq-dev libfreeimage3     && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 5610457fda7b
Step 4/36 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> 5cc5df239fc2
Step 5/36 : WORKDIR /app/ml
 ---> Using cache
 ---> 3099534ddcb5
Step 6/36 : COPY requirements.txt .
 ---> Using cache
 ---> 63e0c2611094
Step 7/36 : RUN pip --no-cache-dir install -r requirements.txt
 ---> Running in 234b16d98c44
Collecting attrs==20.2.0
  Downloading attrs-20.2.0-py2.py3-none-any.whl (48 kB)
Collecting cached-property==1.5.2
  Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting colour==0.1.5
  Downloading colour-0.1.5-py2.py3-none-any.whl (23 kB)
Collecting flasgger==0.9.5
  Downloading flasgger-0.9.5-py2.py3-none-any.whl (3.8 MB)
Collecting Flask==1.1.2
  Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting gdown~=3.12
  Downloading gdown-3.13.0.tar.gz (9.3 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting Werkzeug==1.0.1
  Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting mock~=4.0.2
  Downloading mock-4.0.3-py3-none-any.whl (28 kB)
Collecting pytest~=6.1.2
  Downloading pytest-6.1.2-py3-none-any.whl (272 kB)
Collecting pytest-mock~=3.3.1
  Downloading pytest_mock-3.3.1-py3-none-any.whl (11 kB)
Collecting requests~=2.24.0
  Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting pylama~=7.7.1
  Downloading pylama-7.7.1-py2.py3-none-any.whl (35 kB)
Collecting Pillow~=8.0.1
  Downloading Pillow-8.0.1-cp37-cp37m-manylinux2014_aarch64.whl (2.1 MB)
Collecting imagecodecs~=2020.5.30
  Downloading imagecodecs-2020.5.30.tar.gz (9.0 MB)
^TCollecting numpy~=1.19.5
  Downloading numpy-1.19.5-cp37-cp37m-manylinux2014_aarch64.whl (12.4 MB)
Collecting scipy~=1.5.4
  Downloading scipy-1.5.4-cp37-cp37m-manylinux2014_aarch64.whl (24.4 MB)
Collecting opencv-python~=4.4.0
  Downloading opencv-python-4.4.0.46.tar.gz (88.9 MB)
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting scikit-learn~=0.23.2
  Downloading scikit-learn-0.23.2.tar.gz (7.2 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting scikit-image~=0.17.2
  Downloading scikit-image-0.17.2.tar.gz (29.8 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3l0blh2u/scikit-image_870a4d563b4d40359e07b1cde9c82659/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3l0blh2u/scikit-image_870a4d563b4d40359e07b1cde9c82659/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-uaakw08x
         cwd: /tmp/pip-install-3l0blh2u/scikit-image_870a4d563b4d40359e07b1cde9c82659/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-3l0blh2u/scikit-image_870a4d563b4d40359e07b1cde9c82659/setup.py", line 234, in <module>
        'build_ext': openmp_build_ext(),
      File "/tmp/pip-install-3l0blh2u/scikit-image_870a4d563b4d40359e07b1cde9c82659/setup.py", line 58, in openmp_build_ext
        from numpy.distutils.command.build_ext import build_ext
    ModuleNotFoundError: No module named 'numpy'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/54/fd/c1b0bb8f6f12ef9b4ee8d7674dac82cd482886f8b5cd165631efa533e237/scikit-image-0.17.2.tar.gz#sha256=bd954c0588f0f7e81d9763dc95e06950e68247d540476e06cb77bcbcd8c2d8b3 (from https://pypi.org/simple/scikit-image/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement scikit-image~=0.17.2 (from versions: 0.7.2, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.9.3, 0.10.0, 0.10.1, 0.11.2, 0.11.3, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.5, 0.15.0, 0.16.2, 0.17.1, 0.17.2, 0.18.0rc0, 0.18.0rc1, 0.18.0rc2, 0.18.0, 0.18.1, 0.18.2rc1, 0.18.2rc2, 0.18.2, 0.18.3)
ERROR: No matching distribution found for scikit-image~=0.17.2
The command '/bin/bash -c pip --no-cache-dir install -r requirements.txt' returned a non-zero code: 1
pospielov commented 2 years ago

this is strange because you installed the NumPy package hmm... Could you try to check if numpy is there? I mean you can do it even without docker just try to install numpy on your Jetson and check if you can import it. I think it should be like:

pip3 install numpy=1.19.5
python3
from numpy.distutils.command.build_ext import build_ext
marcfielding1 commented 2 years ago

Quick update from me the issue now imagecodecs, installing numpy manually via RUN in the dockerfile somehow fixed the problem with pip install requirements.

Just figuring out the installation packages required. Turns out imagecodecs is a bit of beast.

pospielov commented 2 years ago

https://scikit-image.org/docs/dev/install.html#id5 scikit-image has tips for arm CPU, including how to handle imagecodecs

marcfielding1 commented 2 years ago

https://scikit-image.org/docs/dev/install.html#id5 scikit-image has tips for arm CPU, including how to handle imagecodecs

Nice, thanks I was trawling through docs looking for something like that, saved me some time there!

LordNex commented 1 year ago

Any update on this? I'm currently using DoubleTake in Home Assistant tied to Frigate on a RPi4 with Coral TPU doing object recognition. When it detects a face it triggers DT to send to its detectors. I've tried DeepStack running on my Jetson Nano 4 gig as well as CompreFace on my Home Assistant Install. Even without a TPU or GPU, CompreFace consistently scores more correct matches than DeepStack on the Nano.

So my thought was to see if I could put CompreFace on the Nano and that way it can use the CUDA cores for the neural processing.

You also now have me wanting to go looking up this "Kane" you referred too.

LordNex commented 1 year ago

For Jetson devices I have several Nano's sitting around I can run tests on, I really would like to see this for, believe it or not, a home assistant project, part of it is an internal tool called "Kane" that integrates with every device in our office(smart tv's, laptops, phones, etc) - part of it for our home shopping hub.

Re the comment on building/buildX I can try and help, just chuck me some tasks and I'll see if I can "make it work"?

What's this "Kane" for home assistant your referring too. Happen to have a few links?

I would also like to see Jetson Nano support. Currently I'm running CompreFace and DoubleStack in Home Assistant with a separate VM running Frigate in Ubuntu server 20. Honestly, I'd prefer to put frigate wherever it can encode and decide streams the best and then off load the neural net to either my Jetson Nano, or a device with a Coral TPU, maybe both?

Honestly I'm fooling around with the idea of having Frigate on the Nano for encoding and decoding and basic object detection, then having a VM with a Coral TPU tied to it running CompreFace. Then tie it all together inside Home Assistant with DoubleTake

LordNex commented 1 year ago

Still very interested in the results is this. I have a Jetson Nano we could use. You'd just need to tell me what to do.

pospielov commented 1 year ago

Let's start with the instructions: https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-909354018 Let's see at what point the build will fail.

jurgenweber commented 1 year ago

Seeing this; https://github.com/exadel-inc/CompreFace/pull/1018 I figured I could install the development build and build it on my jetson nano and it would work?

So I cloned the repo, went to /dev and run start.sh.

All of the containers build, but:

*** Operational MODE: preforking ***
{"severity": "DEBUG", "message": "Falling back to TensorFlow client; we recommended you install the Cloud TPU client directly with pip install cloud-tpu-client.", "request": null, "logger": "tensorflow", "module": "tpu_cluster_resolver", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/tensorflow/python/distribute/cluster_resolver/tpu/tpu_cluster_resolver.py\", line 30, in <module>\n    from cloud_tpu_client import client  # pylint: disable=g-import-not-at-top\nModuleNotFoundError: No module named 'cloud_tpu_client'\n", "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py:98: UserWarning: unable to load libtensorflow_io_plugins.so: unable to open file: libtensorflow_io_plugins.so, from paths: ['/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so']
caused by: ["[Errno 2] The file to load file system plugin from does not exist.: '/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so'"]
  warnings.warn(f"unable to load libtensorflow_io_plugins.so: {e}")
/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py:104: UserWarning: file system plugins are not loaded: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io.so: cannot open shared object file: No such file or directory']
  warnings.warn(f"file system plugins are not loaded: {e}")
{"severity": "INFO", "message": "{'BUILD_VERSION': 'dev', 'CALCULATION_PLUGIN': 'facenet.Calculator', 'EXTRA_PLUGINS': ['facenet.LandmarksDetector', 'agegender.AgeDetector', 'agegender.GenderDetector', 'facenet.facemask.MaskDetector', 'facenet.PoseEstimator'], 'FACE_DETECTION_PLUGIN': 'facenet.FaceDetector', 'GPU_IDX': -1, 'IMG_LENGTH_LIMIT': 640, 'INTEL_OPTIMIZATION': False, 'IS_DEV_ENV': False, 'LOGGING_LEVEL_NAME': 'DEBUG', 'ML_PORT': 3000, 'RUN_MODE': True}", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating new app for WSGI", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"}
WSGI app 0 (mountpoint='') ready in 12 seconds on interpreter 0x5597b64bb0 pid: 1 (default app)

I see this in the core logs, am I going the right way here?

/login just returns an welcome to nginx page.

I inspected all the images, they are built with the right arch

    "Architecture": "arm64",
jurgenweber commented 1 year ago

What is confusing me is the doco clearly says go to /login, but it isn't handled by nginx:

https://github.com/exadel-inc/CompreFace/blob/master/ui/nginx/templates/nginx.conf.template

jurgenweber commented 1 year ago

ok, I tired again today and it worked... I have it up, created an account and some apps, hooked it up with double-take and boom.

¯_(ツ)_/¯

pospielov commented 1 year ago

Yes, https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-848057021 Recalling this comment, we solved two issues:

  1. We are creating Docker Buildx config now, so we will be able to build arm builds on x86 machines.
  2. thanks to this pull request CompreFace can run on arm devices.

We are preparing a build pipeline, so we build it and publish it on DockerHub. But one point is that only the FaceNet version was updated to run on ARM, and now it doesn't use GPU. So it will run on Jetson but won't use GPU, so we didn't solve the third problem yet. I saw somewhere a build config to build FaceNet with GPU, I need to find it. Hopefully, it will be able to use Jetson GPU.

jurgenweber commented 1 year ago

Yes, I am aware of the 3 points you have covered. I can confirm I have it on aarch64!

# uname -a
Linux warvm-hass97 4.9.253-tegra #1 SMP PREEMPT Mon Jul 26 12:13:06 PDT 2021 aarch64 aarch64 aarch64 GNU/Linux

# docker ps
CONTAINER ID   IMAGE                           COMMAND                  CREATED      STATUS      PORTS                                                                                  NAMES
99506d6792a3   compreface-fe:latest            "/docker-entrypoint.…"   5 days ago   Up 5 days   0.0.0.0:8000->80/tcp, :::8000->80/tcp                                                  compreface-ui
e89638921010   compreface-admin:latest         "sh -c 'java $ADMIN_…"   5 days ago   Up 5 days   0.0.0.0:5006->5005/tcp, :::5006->5005/tcp, 0.0.0.0:8081->8080/tcp, :::8081->8080/tcp   compreface-admin
22dddf6d58b5   compreface-api:latest           "sh -c 'java $API_JA…"   5 days ago   Up 3 days   0.0.0.0:5005->5005/tcp, :::5005->5005/tcp, 0.0.0.0:8082->8080/tcp, :::8082->8080/tcp   compreface-api
e9757bbd7eda   compreface-postgres-db:latest   "docker-entrypoint.s…"   5 days ago   Up 5 days   0.0.0.0:6432->5432/tcp, :::6432->5432/tcp                                              compreface-postgres-db
141e0d875fe6   compreface-core:arm64           "uwsgi --ini uwsgi.i…"   5 days ago   Up 5 days   0.0.0.0:3300->3000/tcp, :::3300->3000/tcp                                              compreface-core

# lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:   bionic

I think if you just build for GPU/CUDA it just works on all nvidia GPU's? ¯_(ツ)_/¯. Not sure, I am not an expert on this.

I did see this and try it; https://github.com/exadel-inc/CompreFace/blob/master/dev/docker-compose-gpu.yml#L101

but the base image is x86 only and I could not find a docker file for it anywhere.

LordNex commented 1 year ago

Sorry guys, I just started a new job and haven't had much time to mess with this. But I plan on testing with you guys as soon as I can catch up. You guys are rocking this though

With this, Frigate, Home Assistant, and DoubleTake you can build a pretty high end security system. And I work for a security company that pays through the nose for this stuff.

whitepail commented 1 year ago

I was able to start compreface on jetson TX2 with gpu support. Used nvcr.io/nvidia/l4t-cuda:10.2.460-runtime as a base gpu image installed python 3.7, libcharls2_2.2.0, mxnet 1.6.0 from https://mxnet-public.s3.us-east-2.amazonaws.com/install/jetson/1.6.0/mxnet_cu102-1.6.0-py2.py3-none-linux_aarch64.whl and several other packages, rebuilt onnx, added www-data user to video group (for GPU access)

Adding my changes to this issue plus my docker compose Build image: https://hub.docker.com/repository/docker/whitepail/compreface-core compreface.zip docker-compose.yml.txt

Please pay attention that Docker Compose must be version 1.19.0 or higher to use nvidia runtime

jurgenweber commented 1 year ago

I was able to start compreface on jetson TX2 with gpu support. Used nvcr.io/nvidia/l4t-cuda:10.2.460-runtime as a base gpu image installed python 3.7, libcharls2_2.2.0, mxnet 1.6.0 from https://mxnet-public.s3.us-east-2.amazonaws.com/install/jetson/1.6.0/mxnet_cu102-1.6.0-py2.py3-none-linux_aarch64.whl and several other packages, rebuilt onnx, added www-data user to video group (for GPU access)

Adding my changes to this issue plus my docker compose Build image: https://hub.docker.com/repository/docker/whitepail/compreface-core compreface.zip docker-compose.yml.txt

Please pay attention that Docker Compose must be version 1.19.0 or higher to use nvidia runtime

This built, but nothing detected... but it seems going back to master I now have the same problem... I actually have this problem again. Thoughts?

Seeing this; #1018 I figured I could install the development build and build it on my jetson nano and it would work?

So I cloned the repo, went to /dev and run start.sh.

All of the containers build, but:

*** Operational MODE: preforking ***
{"severity": "DEBUG", "message": "Falling back to TensorFlow client; we recommended you install the Cloud TPU client directly with pip install cloud-tpu-client.", "request": null, "logger": "tensorflow", "module": "tpu_cluster_resolver", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/tensorflow/python/distribute/cluster_resolver/tpu/tpu_cluster_resolver.py\", line 30, in <module>\n    from cloud_tpu_client import client  # pylint: disable=g-import-not-at-top\nModuleNotFoundError: No module named 'cloud_tpu_client'\n", "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating converter from %s to %s", "request": null, "logger": "h5py._conv", "module": "__init__", "traceback": null, "build_version": "dev"}
/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py:98: UserWarning: unable to load libtensorflow_io_plugins.so: unable to open file: libtensorflow_io_plugins.so, from paths: ['/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so']
caused by: ["[Errno 2] The file to load file system plugin from does not exist.: '/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io_plugins.so'"]
  warnings.warn(f"unable to load libtensorflow_io_plugins.so: {e}")
/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py:104: UserWarning: file system plugins are not loaded: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/usr/local/lib/python3.7/site-packages/tensorflow_io/python/ops/libtensorflow_io.so: cannot open shared object file: No such file or directory']
  warnings.warn(f"file system plugins are not loaded: {e}")
{"severity": "INFO", "message": "{'BUILD_VERSION': 'dev', 'CALCULATION_PLUGIN': 'facenet.Calculator', 'EXTRA_PLUGINS': ['facenet.LandmarksDetector', 'agegender.AgeDetector', 'agegender.GenderDetector', 'facenet.facemask.MaskDetector', 'facenet.PoseEstimator'], 'FACE_DETECTION_PLUGIN': 'facenet.FaceDetector', 'GPU_IDX': -1, 'IMG_LENGTH_LIMIT': 640, 'INTEL_OPTIMIZATION': False, 'IS_DEV_ENV': False, 'LOGGING_LEVEL_NAME': 'DEBUG', 'ML_PORT': 3000, 'RUN_MODE': True}", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating new app for WSGI", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"}
WSGI app 0 (mountpoint='') ready in 12 seconds on interpreter 0x5597b64bb0 pid: 1 (default app)

I see this in the core logs, am I going the right way here?

/login just returns an welcome to nginx page.

I inspected all the images, they are built with the right arch

    "Architecture": "arm64",
whitepail commented 1 year ago

This built, but nothing detected... but it seems going back to master I now have the same problem... I actually have this problem again. Thoughts?

Do you mean that whenever you start compreface-core container from whitepail/compreface-core:arm64-mobilenet-gpu image - no GPUs detected? Could you please share logs?

To make Jetson GPUs available to container: 1) Check if you run image with --runtime=nvidia and -e NVIDIA_VISIBLE_DEVICES=all (you could check my docker-compose in previous message) 2) Inside the container user www-data should be added to "video" group otherwise uwsgi process won't have access to GPUs.

jurgenweber commented 1 year ago

yeah, I am not sure what is wrong tbh. I am not even sure any of those logs are relevant. What I do know is, every face been sent to compreface is returning

{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679473394.788274-a6oqni-latest-1f5c258d-9c7f-431c-ac49-57d5edc41eaf.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/site-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/site-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functionsrule.endpoint\n File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n return f(*args, **kwargs)\n File \"./src/_endpoints.py\", line 91, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 138, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}

Where before it detected LOTS and I can not login anymore. I just have this on the front page

image

Trying again with your docker-compose file, it seems I have some other problems because the jetson nano only has 4gb of mem. I am swapping lots now.

jurgenweber commented 1 year ago

ok, I have some logs for you

# docker exec -it compreface-core /bin/bash
root@8d4e31ed4b88:~# id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data),44(video)
# docker ps
CONTAINER ID   IMAGE                                           COMMAND                  CREATED         STATUS         PORTS                                   NAMES
5eaf2012140c   compreface-fe:latest                            "/docker-entrypoint.…"   7 minutes ago   Up 7 minutes   0.0.0.0:8000->80/tcp, :::8000->80/tcp   compreface-ui
73bd3ab279a6   compreface-admin:latest                         "sh -c 'java $ADMIN_…"   7 minutes ago   Up 7 minutes                                           compreface-admin
b99f3a3a5415   compreface-api:latest                           "sh -c 'java $API_JA…"   7 minutes ago   Up 7 minutes                                           compreface-api
e61bba8931bc   compreface-postgres-db:latest                   "docker-entrypoint.s…"   8 minutes ago   Up 7 minutes   5432/tcp                                compreface-postgres-db
8d4e31ed4b88   whitepail/compreface-core:arm64-mobilenet-gpu   "uwsgi --ini uwsgi.i…"   8 minutes ago   Up 7 minutes   3000/tcp                                compreface-core
# docker logs -f compreface-core
[uWSGI] getting INI configuration from uwsgi.ini
*** Starting uWSGI 2.0.19 (64bit) on [Wed Mar 22 01:46:03 2023] ***
compiled with version: 7.5.0 on 06 March 2023 10:37:31
os: Linux-4.9.253-tegra #1 SMP PREEMPT Mon Jul 26 12:13:06 PDT 2021
nodename: 8d4e31ed4b88
machine: aarch64
clock source: unix
detected number of CPU cores: 4
current working directory: /app/ml
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
setgid() to 33
set additional group 44 (video)
setuid() to 33
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 0.0.0.0:3000 fd 3
Python version: 3.7.5 (default, Dec  9 2021, 17:04:37)  [GCC 8.4.0]
Python main interpreter initialized at 0x5566670000
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145808 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
{"severity": "INFO", "message": "{'BUILD_VERSION': 'dev', 'CALCULATION_PLUGIN': 'insightface.Calculator@arcface_mobilefacenet', 'EXTRA_PLUGINS': ['insightface.LandmarksDetector', 'insightface.GenderDetector', 'insightface.AgeDetector', 'insightface.facemask.MaskDetector', 'insightface.PoseEstimator'], 'FACE_DETECTION_PLUGIN': 'insightface.FaceDetector@retinaface_mnet025_v1', 'GPU_IDX': 0, 'IMG_LENGTH_LIMIT': 640, 'INTEL_OPTIMIZATION': False, 'IS_DEV_ENV': False, 'LOGGING_LEVEL_NAME': 'DEBUG', 'ML_PORT': 3000, 'RUN_MODE': True}", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Creating new app for WSGI", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"}
WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x5566670000 pid: 1 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 1)
spawned uWSGI worker 1 (pid: 14, cores: 1)
{"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remote_addr": "172.19.0.6"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remote_addr": "172.19.0.6"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remote_addr": "172.19.0.6"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
[01:48:08] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.2.0. Attempting to upgrade...
[01:48:08] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[01:48:08] src/engine/engine.cc:55: MXNet start using engine: ThreadedEnginePerDevice
[01:48:08] src/base.cc:80: cuDNN lib mismatch: linked-against version 8201 != compiled-against version 8000.  Set MXNET_CUDNN_LIB_CHECKING=0 to quiet this warning.
[32, 16, 8] {'32': {'SCALES': (32, 16), 'BASE_SIZE': 16, 'RATIOS': (1.0,), 'ALLOWED_BORDER': 9999}, '16': {'SCALES': (8, 4), 'BASE_SIZE': 16, 'RATIOS': (1.0,), 'ALLOWED_BORDER': 9999}, '8': {'SCALES': (2, 1), 'BASE_SIZE': 16, 'RATIOS': (1.0,), 'ALLOWED_BORDER': 9999}}
use_landmarks True
{"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=75, y_min=107, x_max=169, y_max=213, probability=0.9144365191459656, _np_landmarks=array([[ 94.3847  , 135.70493 ],\n       [129.02686 , 146.25388 ],\n       [ 90.869064, 157.00577 ],\n       [ 81.520065, 178.39548 ],\n       [106.2912  , 186.9093  ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "44c3426b-88b3-4809-9eca-b855cc2e5c8f-mqtt-4c2cf8d4-e712-4168-83d8-e5dc69cdc8da.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"}
[01:48:59] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.0.0. Attempting to upgrade...
[01:48:59] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
{"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "44c3426b-88b3-4809-9eca-b855cc2e5c8f-mqtt-4c2cf8d4-e712-4168-83d8-e5dc69cdc8da.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=126, y_min=197, x_max=314, y_max=400, probability=0.9837614893913269, _np_landmarks=array([[158.34282, 257.6136 ],\n       [232.86133, 265.72784],\n       [169.65201, 282.87625],\n       [158.09995, 335.88266],\n       [216.62791, 342.83426]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-f804c6fa-ecc8-4d5d-9ddc-dd21e10c7206.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-f804c6fa-ecc8-4d5d-9ddc-dd21e10c7206.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-a9783cb6-4fa9-496d-a471-ae7cb59ecf2c.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-b204ca71-8724-4464-b6dc-87af7d80d290.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=127, y_min=76, x_max=180, y_max=133, probability=0.8354594707489014, _np_landmarks=array([[139.7618 ,  91.0717 ],\n       [160.77344,  96.28698],\n       [142.19424, 102.25295],\n       [135.00635, 114.07473],\n       [150.9277 , 117.96715]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-6da03275-d7d3-4d3b-a2f8-2f4d79157cc3.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-6da03275-d7d3-4d3b-a2f8-2f4d79157cc3.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-c214aa4b-82f1-4504-ac40-84e64b9d2758.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-d8b9cb3c-c7d1-4e23-a4aa-4ab10d195b88.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-10a98151-7aff-4a81-8510-deec95f75ed1.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-e9fa4796-a2de-464d-8b60-f547972f66e5.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-73bfea15-34ed-4250-ab02-8b93bb7ede97.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-f350d835-c6ea-4c50-869f-f515b8768f66.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-3add346f-130b-4e66-b186-f3d383b5bfd1.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-cdf24f17-b7d7-43cd-b1b5-fd77bcd4ca29.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remote_addr": "172.19.0.6"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=22, y_min=91, x_max=99, y_max=175, probability=0.9725057482719421, _np_landmarks=array([[ 35.31655 , 118.04654 ],\n       [ 67.05827 , 118.37584 ],\n       [ 43.088284, 133.33997 ],\n       [ 38.198364, 151.40254 ],\n       [ 63.761257, 151.38004 ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "251d70d5-ffbc-4dc7-abcc-d16ab31b9ee0-mqtt-b304598c-ac4d-48b1-9a8f-af02d5a583ca.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "251d70d5-ffbc-4dc7-abcc-d16ab31b9ee0-mqtt-b304598c-ac4d-48b1-9a8f-af02d5a583ca.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=410, y_min=237, x_max=543, y_max=394, probability=0.9903636574745178, _np_landmarks=array([[426.33902, 283.59744],\n       [479.6272 , 285.01675],\n       [426.9375 , 305.7049 ],\n       [422.10367, 347.48584],\n       [463.60403, 348.26828]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-fb72b1f7-cd28-498c-881d-7c9626bb6ef4.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-fb72b1f7-cd28-498c-881d-7c9626bb6ef4.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=37, y_min=171, x_max=176, y_max=331, probability=0.9958721995353699, _np_landmarks=array([[ 55.51998 , 225.11555 ],\n       [118.90018 , 221.54378 ],\n       [ 71.2811  , 249.07097 ],\n       [ 59.907166, 287.20132 ],\n       [112.65994 , 283.8923  ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-26566bf8-3629-437f-840f-ad9fd5f41607.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-26566bf8-3629-437f-840f-ad9fd5f41607.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-53ca6743-cde2-41e8-8957-a1ade815523f.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-2a3b3734-df6d-44d7-93d3-2ef2b5b38dbc.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-eed0619c-8a45-4c09-9d02-c540c8e647e4.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-d0a08cd7-a4bf-433e-8d10-19632cbc1e17.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-6cefe7a6-0fa1-4ae5-ba32-6e6f9e0b2e2b.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-ad9d053c-a0de-4bdc-9c92-4b30f4d5b229.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-6e6988ae-4b23-4310-add6-ed3d811be044.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-ff556f46-15dd-40f0-ac96-314dcc32d57c.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-5cb68b76-ecef-411c-a86a-92c0dd20cd8e.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n    return f(*args, **kwargs)\n  File \"./src/_endpoints.py\", line 75, in find_faces_post\n    faces = _limit(faces, request.values.get(ARG.LIMIT))\n  File \"./src/_endpoints.py\", line 121, in _limit\n    raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}
{"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=104, y_min=57, x_max=154, y_max=115, probability=0.9958778619766235, _np_landmarks=array([[112.42999 ,  76.01187 ],\n       [133.65552 ,  76.55905 ],\n       [118.15546 ,  86.784706],\n       [114.340195,  98.35726 ],\n       [131.36154 ,  98.65559 ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-a78c89c6-c21e-43c4-9291-e03082991da2.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"}
{"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-a78c89c6-c21e-43c4-9291-e03082991da2.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.flask_.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}

I am unsure on how it can not find a face, I am staring into the camera. :)

whitepail commented 1 year ago

Looks like core started sucessfully and even used MXnet with gpu support.

Could you please also share logs of compreface-ui container.

ср, 22 мар. 2023 г., 13:46 Jürgen W @.***>:

ok, I have some logs for you

docker exec -it compreface-core /bin/bash

@.***:~# id www-data uid=33(www-data) gid=33(www-data) groups=33(www-data),44(video)

docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5eaf2012140c compreface-fe:latest "/docker-entrypoint.…" 7 minutes ago Up 7 minutes 0.0.0.0:8000->80/tcp, :::8000->80/tcp compreface-ui 73bd3ab279a6 compreface-admin:latest "sh -c 'java $ADMIN_…" 7 minutes ago Up 7 minutes compreface-admin b99f3a3a5415 compreface-api:latest "sh -c 'java $API_JA…" 7 minutes ago Up 7 minutes compreface-api e61bba8931bc compreface-postgres-db:latest "docker-entrypoint.s…" 8 minutes ago Up 7 minutes 5432/tcp compreface-postgres-db 8d4e31ed4b88 whitepail/compreface-core:arm64-mobilenet-gpu "uwsgi --ini uwsgi.i…" 8 minutes ago Up 7 minutes 3000/tcp compreface-core

docker logs -f compreface-core

[uWSGI] getting INI configuration from uwsgi.ini Starting uWSGI 2.0.19 (64bit) on [Wed Mar 22 01:46:03 2023] compiled with version: 7.5.0 on 06 March 2023 10:37:31 os: Linux-4.9.253-tegra #1 SMP PREEMPT Mon Jul 26 12:13:06 PDT 2021 nodename: 8d4e31ed4b88 machine: aarch64 clock source: unix detected number of CPU cores: 4 current working directory: /app/ml detected binary path: /usr/local/bin/uwsgi !!! no internal routing support, rebuild with pcre support !!! setgid() to 33 set additional group 44 (video) setuid() to 33 your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uwsgi socket 0 bound to TCP address 0.0.0.0:3000 fd 3 Python version: 3.7.5 (default, Dec 9 2021, 17:04:37) [GCC 8.4.0] Python main interpreter initialized at 0x5566670000 python threads support enabled your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 145808 bytes (142 KB) for 1 cores Operational MODE: single process {"severity": "INFO", "message": "{'BUILD_VERSION': 'dev', 'CALCULATION_PLUGIN': @._mobilefacenet', 'EXTRA_PLUGINS': ['insightface.LandmarksDetector', 'insightface.GenderDetector', 'insightface.AgeDetector', 'insightface.facemask.MaskDetector', 'insightface.PoseEstimator'], 'FACE_DETECTION_PLUGIN': @._mnet025_v1', 'GPU_IDX': 0, 'IMG_LENGTH_LIMIT': 640, 'INTEL_OPTIMIZATION': False, 'IS_DEV_ENV': False, 'LOGGING_LEVEL_NAME': 'DEBUG', 'ML_PORT': 3000, 'RUN_MODE': True}", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"} {"severity": "DEBUG", "message": "Creating new app for WSGI", "request": null, "logger": "src.app", "module": "app", "traceback": null, "build_version": "dev"} WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x5566670000 pid: 1 (default app) uWSGI is running in multiple interpreter mode spawned uWSGI master process (pid: 1) spawned uWSGI worker 1 (pid: 14, cores: 1) {"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remoteaddr": "172.19.0.6"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remoteaddr": "172.19.0.6"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remoteaddr": "172.19.0.6"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} [01:48:08] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.2.0. Attempting to upgrade... [01:48:08] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded! [01:48:08] src/engine/engine.cc:55: MXNet start using engine: ThreadedEnginePerDevice [01:48:08] src/base.cc:80: cuDNN lib mismatch: linked-against version 8201 != compiled-against version 8000. Set MXNET_CUDNN_LIB_CHECKING=0 to quiet this warning. [32, 16, 8] {'32': {'SCALES': (32, 16), 'BASE_SIZE': 16, 'RATIOS': (1.0,), 'ALLOWED_BORDER': 9999}, '16': {'SCALES': (8, 4), 'BASE_SIZE': 16, 'RATIOS': (1.0,), 'ALLOWED_BORDER': 9999}, '8': {'SCALES': (2, 1), 'BASE_SIZE': 16, 'RATIOS': (1.0,), 'ALLOWED_BORDER': 9999}} use_landmarks True {"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=75, y_min=107, x_max=169, y_max=213, probability=0.9144365191459656, _np_landmarks=array([[ 94.3847 , 135.70493 ],\n [129.02686 , 146.25388 ],\n [ 90.869064, 157.00577 ],\n [ 81.520065, 178.39548 ],\n [106.2912 , 186.9093 ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "44c3426b-88b3-4809-9eca-b855cc2e5c8f-mqtt-4c2cf8d4-e712-4168-83d8-e5dc69cdc8da.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"} [01:48:59] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.0.0. Attempting to upgrade... [01:48:59] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded! {"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "44c3426b-88b3-4809-9eca-b855cc2e5c8f-mqtt-4c2cf8d4-e712-4168-83d8-e5dc69cdc8da.jpg", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=126, y_min=197, x_max=314, y_max=400, probability=0.9837614893913269, _np_landmarks=array([[158.34282, 257.6136 ],\n [232.86133, 265.72784],\n [169.65201, 282.87625],\n [158.09995, 335.88266],\n [216.62791, 342.83426]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-f804c6fa-ecc8-4d5d-9ddc-dd21e10c7206.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-f804c6fa-ecc8-4d5d-9ddc-dd21e10c7206.jpg", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-a9783cb6-4fa9-496d-a471-ae7cb59ecf2c.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functionsrule.endpoint\n File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-b204ca71-8724-4464-b6dc-87af7d80d290.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=127, y_min=76, x_max=180, y_max=133, probability=0.8354594707489014, _np_landmarks=array([[139.7618 , 91.0717 ],\n [160.77344, 96.28698],\n [142.19424, 102.25295],\n [135.00635, 114.07473],\n [150.9277 , 117.96715]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-6da03275-d7d3-4d3b-a2f8-2f4d79157cc3.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-snapshot-6da03275-d7d3-4d3b-a2f8-2f4d79157cc3.jpg", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-c214aa4b-82f1-4504-ac40-84e64b9d2758.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-d8b9cb3c-c7d1-4e23-a4aa-4ab10d195b88.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-10a98151-7aff-4a81-8510-deec95f75ed1.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-e9fa4796-a2de-464d-8b60-f547972f66e5.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-73bfea15-34ed-4250-ab02-8b93bb7ede97.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-f350d835-c6ea-4c50-869f-f515b8768f66.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-3add346f-130b-4e66-b186-f3d383b5bfd1.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481637.173793-njx4ci-latest-cdf24f17-b7d7-43cd-b1b5-fd77bcd4ca29.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "GET", "path": "/status", "filename": "", "api_key": "", "remoteaddr": "172.19.0.6"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=22, y_min=91, x_max=99, y_max=175, probability=0.9725057482719421, _np_landmarks=array([[ 35.31655 , 118.04654 ],\n [ 67.05827 , 118.37584 ],\n [ 43.088284, 133.33997 ],\n [ 38.198364, 151.40254 ],\n [ 63.761257, 151.38004 ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "251d70d5-ffbc-4dc7-abcc-d16ab31b9ee0-mqtt-b304598c-ac4d-48b1-9a8f-af02d5a583ca.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "251d70d5-ffbc-4dc7-abcc-d16ab31b9ee0-mqtt-b304598c-ac4d-48b1-9a8f-af02d5a583ca.jpg", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=410, y_min=237, x_max=543, y_max=394, probability=0.9903636574745178, _np_landmarks=array([[426.33902, 283.59744],\n [479.6272 , 285.01675],\n [426.9375 , 305.7049 ],\n [422.10367, 347.48584],\n [463.60403, 348.26828]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-fb72b1f7-cd28-498c-881d-7c9626bb6ef4.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-fb72b1f7-cd28-498c-881d-7c9626bb6ef4.jpg", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=37, y_min=171, x_max=176, y_max=331, probability=0.9958721995353699, _np_landmarks=array([[ 55.51998 , 225.11555 ],\n [118.90018 , 221.54378 ],\n [ 71.2811 , 249.07097 ],\n [ 59.907166, 287.20132 ],\n [112.65994 , 283.8923 ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-26566bf8-3629-437f-840f-ad9fd5f41607.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-26566bf8-3629-437f-840f-ad9fd5f41607.jpg", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-53ca6743-cde2-41e8-8957-a1ade815523f.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-2a3b3734-df6d-44d7-93d3-2ef2b5b38dbc.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-eed0619c-8a45-4c09-9d02-c540c8e647e4.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-d0a08cd7-a4bf-433e-8d10-19632cbc1e17.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-6cefe7a6-0fa1-4ae5-ba32-6e6f9e0b2e2b.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-ad9d053c-a0de-4bdc-9c92-4b30f4d5b229.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-6e6988ae-4b23-4310-add6-ed3d811be044.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-ff556f46-15dd-40f0-ac96-314dcc32d57c.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(args, kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-latest-5cb68b76-ecef-411c-a86a-92c0dd20cd8e.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functions[rule.endpoint](req.viewargs)\n File \"./src/services/flask/needs_attached_file.py\", line 32, in wrapper\n return f(*args, **kwargs)\n File \"./src/_endpoints.py\", line 75, in find_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"} {"severity": "DEBUG", "message": "Found: BoundingBoxDTO(x_min=104, y_min=57, x_max=154, y_max=115, probability=0.9958778619766235, _np_landmarks=array([[112.42999 , 76.01187 ],\n [133.65552 , 76.55905 ],\n [118.15546 , 86.784706],\n [114.340195, 98.35726 ],\n [131.36154 , 98.65559 ]], dtype=float32))", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-a78c89c6-c21e-43c4-9291-e03082991da2.jpg", "api_key": "", "remote_addr": "172.19.0.4"}, "logger": "src.services.facescan.plugins.insightface.insightface", "module": "insightface", "traceback": null, "build_version": "dev"} {"severity": "INFO", "message": "200 OK", "request": {"method": "POST", "path": "/find_faces", "filename": "1679481824.59661-rp4y4p-snapshot-a78c89c6-c21e-43c4-9291-e03082991da2.jpg", "api_key": "", "remoteaddr": "172.19.0.4"}, "logger": "src.services.flask.log_response", "module": "log_response", "traceback": null, "build_version": "dev"}

— Reply to this email directly, view it on GitHub https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-1479320179, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQEBR54SGCENL5XWTA7PY3W5LKATANCNFSM44SR3V2A . You are receiving this because you commented.Message ID: @.***>

jurgenweber commented 1 year ago

It is just spamming

192.168.1.95 - - [22/Mar/2023:21:22:37 +0000] "GET /api/v1/consistence/status HTTP/1.0" 200 94 "https://mydomain.com/login?redirect=%2F" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"

Seems like it is just trying to get that status, while return 200 the front page still gives me that picture.

going directly to /api/v1/consistence/status I get

image

I see this in the api logs

2023-03-22 19:54:54.405 ERROR 7 --- [nio-8080-exec-9] c.e.f.c.h.ResponseExceptionHandler       : Undefined exception occurred
java.lang.IllegalStateException: data[667].length=128 must be equal to number of columns 512
pospielov commented 1 year ago

data[667].length=128 must be equal to number of columns 512

Is it possible that you use the database from another CompreFace build? Just an idea - the default CompreFace build gets embedding of 512 numbers from the face and mobilenet version 128 numbers.

jurgenweber commented 1 year ago

yeah, 100%. I started some months ago and just update with master when I see an update. I may have switched between 'dev' and non dev at some point also.

What is the best way to resolve? Are there some manual db migrations to run or somehting?

Just an idea - the default CompreFace build gets embedding of 512 numbers from the face and mobilenet version 128 numbers.

I am not sure what this means.

jurgenweber commented 1 year ago

ah, right. So, I started with just the arm build which I assume is default but then I am now using @whitepail build so I could use the GPU on my jetson nano, which is mobilenet looking at the image tag.

SO yeah, what should I do to resolve?

pospielov commented 1 year ago

We don't have official migration, so ideally, you need the following:

  1. Stop CompreFace
  2. Delete the volume (docker volume rm )
  3. Start CompreFace

But we have unofficial migration: Empty POST request to this endpoint: http://${FRS_HOST}/api/v1/migrate We didn't make it official, as it's not an easy process, it may fail, it would require additional UI, etc. Not sure if it even works, as we created it in the 0.6 release, and it's not a part of the regression testing process. But you can try your luck if deleting volume is not an option for you.

jurgenweber commented 1 year ago

Yeah, I thought you might say that. I tried the migrate thing but it failed. Lots of

2023-03-28 22:06:00.829  INFO 7 --- [         task-1] c.e.f.c.t.c.m.MigrationComponent         : Migrating embedding with id cd57fb3b-7ea7-4a63-8c05-313f9cf0da5b
2023-03-28 22:06:00.989 ERROR 7 --- [         task-1] c.e.f.c.t.c.m.MigrationComponent         : Error during processing embedding with id cd57fb3b-7ea7-4a63-8c05-313f9cf0da5b
feign.FeignException$BadRequest: [400 BAD REQUEST] during [POST] to [http://compreface-core:3000/find_faces] [FacesFeignClient#findFaces(MultipartFile,Integer,Double,String,Boolean)]: [{"message":"400 Bad Request: No face is found in the given image"}

but afterwards I still get:

2023-03-28 22:17:00.207 ERROR 7 --- [nio-8080-exec-2] c.e.f.c.h.ResponseExceptionHandler       : Undefined exception occurred
java.lang.IllegalStateException: data[5].length=128 must be equal to number of columns 512
jurgenweber commented 1 year ago

ok, so dumping the volume and starting again has got me goin, thanks!

pospielov commented 1 year ago

Yeah, I thought you might say that. I tried the migrate thing but it failed. Lots of

Such errors mean that the new model didn't find faces on the image. This is bad as you will need to reupload them somehow manually. However, it's not a fail of migration, I think you just need to wait until the end.

Davo-Exp4 commented 1 year ago

Hi, I have followed the @pospielov guide, cloning the dev branch and building the image as indicated on a jetson xavier nx. I have a problem, the containers come up normally but when I try to open the web interface on port 8000 I get the default nginx server page.

image

Please help me to solve this problem.

I attach the logs of the container:

root@jetson:/home/jetson# docker logs 263 /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: /etc/nginx/conf.d/default.conf is not a file or does not exist, exiting /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/nginx.conf.template to /etc/nginx/conf.d/nginx.conf /docker-entrypoint.sh: Configuration complete; ready for start up

jurgenweber commented 1 year ago

Hi, I have followed the @pospielov guide, cloning the dev branch and building the image as indicated on a jetson xavier nx. I have a problem, the containers come up normally but when I try to open the web interface on port 8000 I get the default nginx server page.

image

Please help me to solve this problem.

I attach the logs of the container:

root@jetson:/home/jetson# docker logs 263 /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: /etc/nginx/conf.d/default.conf is not a file or does not exist, exiting /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/nginx.conf.template to /etc/nginx/conf.d/nginx.conf /docker-entrypoint.sh: Configuration complete; ready for start up

Yeah, I had this problem also. It is because we started with the dev frontend bash script. Remove the dev bit out/run it manually and it works.

So, here is the dev start.sh: https://github.com/exadel-inc/CompreFace/blob/master/dev/start.sh

to start it, just run

docker-compose -f docker-compose.yml up --build &

jurgenweber commented 1 year ago

Yeah, I thought you might say that. I tried the migrate thing but it failed. Lots of

Such errors mean that the new model didn't find faces on the image. This is bad as you will need to reupload them somehow manually. However, it's not a fail of migration, I think you just need to wait until the end.

Ok, so.. Well I am using double take so I have a copy of every image and I can get it to retrain quite easily. What I found is, when using the CUDA stuff it only finds faces in about 10% of the old pictures that the CPU found faces in. So it is just not as good at 'finding' faces. Is there a way to tweak this more?

@whitepail

whitepail commented 1 year ago

Yep. I've tested mobilenet GPU model for a month and it had lots of detection errors. Today I rebuilt arcface-r50 and arcface-r100 versions for jetson.

They are much more accurate and also use different face detection (retinaface_r50_v1 instead of retinaface_mnet025_v1).

Two major problems: 1) arcface-r50 uses up to 2.5 GB GPU Mem (which is RAM actually), arcface-r100 uses up to 3 GB GPU Mem. So run only 1 UWSGI process max, no parallel execution or you will get OutOfMemory and UWSGI scripts dying!!! I've adjusted docker-compose.yml for that 2) I'm not happy with retinaface_r50_v1 model for face detection as it doesn't detect my 6-year old kid's face when he wears both glasses and a hat. For all other photos it detects quite good. Maybe will change detect model to SCRFD later.

Docker hub repo is the same. My current run: compreface-core: restart: always image: whitepail/compreface-core:arm64-arcface-r50-gpu container_name: "compreface-core" runtime: nvidia environment:

techgeek77 commented 11 months ago

Hi! What is the current status of this issue? Im thinking of getting the B01 kit which is a nano 4GB. What I'm trying to achieve is Frigate + Double-take + Compreface + Home Assistant. But I want to have a low profile machine to run all of this, hence considering the Nano. I will probably get the M.2 Coral and stick it in there for the object detection on Frigate's part before its sent to compreface. If i run the above docker command will it be sufficient or do i need to do some stuff like missing libraries or packages before i docker run?

Thanks!

whitepail commented 11 months ago

I have Frigate + Double-take + Compreface running on TX2

Main problem is insufficient memory. optimized compreface model for jetson requires >3.5 Gb GPU memory. As jetson has shared GPU/RAM - 4gB won't be enough. Better try to find TX2 second-hand or look at Jetson Orin Nano

вт, 8 авг. 2023 г. в 11:43, techgeek77 @.***>:

Hi! What is the current status of this issue? Im thinking of getting the B01 kit which is a nano 4GB. What I'm trying to achieve is Frigate + Double-take + Compreface + Home Assistant. But I want to have a low profile machine to run all of this, hence considering the Nano. I will probably get the M.2 Coral and stick it in there for the object detection on Frigate's part before its sent to compreface. If i run the above docker command will it be sufficient or do i need to do some stuff like missing libraries or packages before i docker run?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-1669183302, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQEBR22RGTSBTECAYMM2FDXUH34HANCNFSM44SR3V2A . You are receiving this because you were mentioned.Message ID: @.***>

techgeek77 commented 11 months ago

ah.Its like $300+ more. Any other budget friendly boards that will handle compreface well? All others run on a RPi4+coral. My only issue is compreface...

Thanks!

whitepail commented 11 months ago

For compreface CPU-only model can be used. You can look SBCs with AVX2 support and start mobilenet model on them. Me personally don't like mobilenet detection quality.

Second option is GPU-based detection. Besides Jetson there are also some of the Intel NUCs have Thunderbolt 3. You can use NUC with external GPU card for detection. Not sure if it will be cheaper than second-hand TX2. I got mine for less than 300$ for both module and dev board. TX2 is the best option for AI experimenting. I was able to run even StableDiffusion on it...

вт, 8 авг. 2023 г. в 13:00, techgeek77 @.***>:

ah.Its like $300+ more. Any other budget friendly boards that will handle compreface well? All others run on a RPi4+coral. My only issue is compreface...

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-1669310796, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQEBR33JRBNUXQGBMTOVJTXUIE47ANCNFSM44SR3V2A . You are receiving this because you were mentioned.Message ID: @.***>

whitepail commented 11 months ago

You can find Nvidia Jetson TX2 P3310 module for around 45$ in US and a Connect Tech Orbitty carrier board for less then 100$. Total price for working TX2 is less then 150$ which is comparable to jetson nano new module on amazon.

вт, 8 авг. 2023 г. в 13:20, Alexander Belozerov < @.***>:

For compreface CPU-only model can be used. You can look SBCs with AVX2 support and start mobilenet model on them. Me personally don't like mobilenet detection quality.

Second option is GPU-based detection. Besides Jetson there are also some of the Intel NUCs have Thunderbolt 3. You can use NUC with external GPU card for detection. Not sure if it will be cheaper than second-hand TX2. I got mine for less than 300$ for both module and dev board. TX2 is the best option for AI experimenting. I was able to run even StableDiffusion on it...

вт, 8 авг. 2023 г. в 13:00, techgeek77 @.***>:

ah.Its like $300+ more. Any other budget friendly boards that will handle compreface well? All others run on a RPi4+coral. My only issue is compreface...

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-1669310796, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQEBR33JRBNUXQGBMTOVJTXUIE47ANCNFSM44SR3V2A . You are receiving this because you were mentioned.Message ID: @.***>

techgeek77 commented 11 months ago

Im in asia, but i still have PO box in the US so I guess that would work. Any pointers to where to look? eBay/amazon or somewhere else? Search terms on eBay doesn't bring up much but the whole kits which are pretty expensive. Even pre-owned.

I also feel like GPU based detection will do better. eGPU is another option I looked into but again the cost is not looking good for me over here... I will look into more.

The other issue is that if i get this all working well, I have few interested friends who want to set it up so i need to be able to replicate it for them....

whitepail commented 11 months ago

I've checked on ebay before posting here :) Search for Jetson TX2 Connect Tech Orbitty - some of the sellers also have both module and carrier board separate lots.

вт, 8 авг. 2023 г. в 14:03, techgeek77 @.***>:

Im in asia, but i still have PO box in the US so I guess that would work. Any pointers to where to look? eBay/amazon or somewhere else? Search terms on eBay doesn't bring up much but the whole kits which are pretty expensive. Even pre-owned.

I also feel like GPU based detection will do better. eGPU is another option I looked into but again the cost is not looking good for me over here... I will look into more.

The other issue is that if i get this all working well, I have few interested friends who want to set it up so i need to be able to replicate it for them....

— Reply to this email directly, view it on GitHub https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-1669403371, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQEBR6F5ATGETSEECKO4Y3XUIMJRANCNFSM44SR3V2A . You are receiving this because you were mentioned.Message ID: @.***>

techgeek77 commented 11 months ago

Hi whitepail, Sorry for the delayed response. eBay was showing search results for my area hence why I couldn't find what you were referring to. Once I set my region to US, I found it. I'm trying to get my hands on it, hopefully it still has some mileage on it and won't die on me as its pre-owned... Might take a while to get it through my freight forwarder. I'll update here when i have more information or have follow up questions!

Thank you for your feedback and your time!

SeKa15 commented 10 months ago

Hi, I have a Jetson Orin nano with 8 GB and a couple questions for setting it up. I would like to run on the GPU.

Do I have to overwrite or extend the compreface-core part with the the part from whitepale ? Are any other changes needed ?

Thank you in advance.