immich
immich copied to clipboard
OpenVino: facial detection is broken with 1.99.0
The bug
When I try launching the face detection, whatever model I use, I get the following error:
immich_machine_learning | [03/23/24 22:46:05] INFO Setting 'buffalo_l' execution providers to
immich_machine_learning | ['OpenVINOExecutionProvider',
immich_machine_learning | 'CPUExecutionProvider'], in descending order of
immich_machine_learning | preference
immich_machine_learning | [03/23/24 22:46:05] INFO Loading facial recognition model 'buffalo_l' to
immich_machine_learning | memory
immich_machine_learning | [03/23/24 22:46:08] ERROR Exception in ASGI application
immich_machine_learning |
immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮
immich_machine_learning | │ /usr/src/app/main.py:118 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 115 │ │
immich_machine_learning | │ 116 │ model = await load(await model_cache. │
immich_machine_learning | │ ttl=settings.model_ttl, **kwargs)) │
immich_machine_learning | │ 117 │ model.configure(**kwargs) │
immich_machine_learning | │ ❱ 118 │ outputs = await run(model.predict, in │
immich_machine_learning | │ 119 │ return ORJSONResponse(outputs) │
immich_machine_learning | │ 120 │
immich_machine_learning | │ 121 │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:125 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 122 async def run(func: Callable[..., Any], i │
immich_machine_learning | │ 123 │ if thread_pool is None: │
immich_machine_learning | │ 124 │ │ return func(inputs) │
immich_machine_learning | │ ❱ 125 │ return await asyncio.get_running_loop │
immich_machine_learning | │ 126 │
immich_machine_learning | │ 127 │
immich_machine_learning | │ 128 async def load(model: InferenceModel) -> │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/lib/python3.10/concurrent/futures/thread.p │
immich_machine_learning | │ y:58 in run │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/base.py:59 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 56 │ │ self.load() │
immich_machine_learning | │ 57 │ │ if model_kwargs: │
immich_machine_learning | │ 58 │ │ │ self.configure(**model_kwargs │
immich_machine_learning | │ ❱ 59 │ │ return self._predict(inputs) │
immich_machine_learning | │ 60 │ │
immich_machine_learning | │ 61 │ @abstractmethod │
immich_machine_learning | │ 62 │ def _predict(self, inputs: Any) -> An │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/facial_recognition.py:49 in │
immich_machine_learning | │ _predict │
immich_machine_learning | │ │
immich_machine_learning | │ 46 │ │ else: │
immich_machine_learning | │ 47 │ │ │ decoded_image = image │
immich_machine_learning | │ 48 │ │ assert is_ndarray(decoded_image, n │
immich_machine_learning | │ ❱ 49 │ │ bboxes, kpss = self.det_model.dete │
immich_machine_learning | │ 50 │ │ if bboxes.size == 0: │
immich_machine_learning | │ 51 │ │ │ return [] │
immich_machine_learning | │ 52 │ │ assert is_ndarray(kpss, np.float32 │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │
immich_machine_learning | │ ace/model_zoo/retinaface.py:224 in detect │
immich_machine_learning | │ │
immich_machine_learning | │ 221 │ │ det_img = np.zeros( (input_size[1 │
immich_machine_learning | │ 222 │ │ det_img[:new_height, :new_width, │
immich_machine_learning | │ 223 │ │ │
immich_machine_learning | │ ❱ 224 │ │ scores_list, bboxes_list, kpss_li │
immich_machine_learning | │ 225 │ │ │
immich_machine_learning | │ 226 │ │ scores = np.vstack(scores_list) │
immich_machine_learning | │ 227 │ │ scores_ravel = scores.ravel() │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │
immich_machine_learning | │ ace/model_zoo/retinaface.py:152 in forward │
immich_machine_learning | │ │
immich_machine_learning | │ 149 │ │ kpss_list = [] │
immich_machine_learning | │ 150 │ │ input_size = tuple(img.shape[0:2] │
immich_machine_learning | │ 151 │ │ blob = cv2.dnn.blobFromImage(img, │
immich_machine_learning | │ (self.input_mean, self.input_mean, self.i │
immich_machine_learning | │ ❱ 152 │ │ net_outs = self.session.run(self. │
immich_machine_learning | │ 153 │ │ │
immich_machine_learning | │ 154 │ │ input_height = blob.shape[2] │
immich_machine_learning | │ 155 │ │ input_width = blob.shape[3] │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │
immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:22 │
immich_machine_learning | │ 0 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 217 │ │ if not output_names: │
immich_machine_learning | │ 218 │ │ │ output_names = [output.name │
immich_machine_learning | │ 219 │ │ try: │
immich_machine_learning | │ ❱ 220 │ │ │ return self._sess.run(output │
immich_machine_learning | │ 221 │ │ except C.EPFail as err: │
immich_machine_learning | │ 222 │ │ │ if self._enable_fallback: │
immich_machine_learning | │ 223 │ │ │ │ print(f"EP Error: {err!s │
immich_machine_learning | ╰─────────────────────────────────────────────────╯
immich_machine_learning | RuntimeException: [ONNXRuntimeError] : 6 :
immich_machine_learning | RUNTIME_EXCEPTION : Encountered unknown exception
immich_machine_learning | in Run()
immich_microservices | [Nest] 7 - 03/23/2024, 10:46:08 PM ERROR [JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | [Nest] 7 - 03/23/2024, 10:46:08 PM ERROR [JobService] Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | at MachineLearningRepository.predict (/usr/src/app/dist/infra/repositories/machine-learning.repository.js:23:19)
immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices | at async PersonService.handleDetectFaces (/usr/src/app/dist/domain/person/person.service.js:248:23)
immich_microservices | at async /usr/src/app/dist/domain/job/job.service.js:137:36
immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_microservices | [Nest] 7 - 03/23/2024, 10:46:08 PM ERROR [JobService] Object:
immich_microservices | {
immich_microservices | "id": "9e1d4bbf-84c2-40dd-9aec-c913e5a1a662"
immich_microservices | }
immich_microservices |
Regular Smart Search proceeds without issue.
The OS that Immich Server is running on
Proxmox 8.1 (6.5 Linux Kernel)
Version of Immich Server
1.99.0
Version of Immich Mobile App
1.99.0
Platform with the issue
- [X] Server
- [ ] Web
- [ ] Mobile
Your docker-compose.yml content
#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
command: [ "start.sh", "immich" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /mount/op11:/usr/src/app/external
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- 2283:3001
depends_on:
- redis
- database
restart: always
immich-microservices:
container_name: immich_microservices
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
extends:
file: hwaccel.transcoding.yml
service: quicksync # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
command: [ "start.sh", "microservices" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /mount/op11:/usr/src/app/external
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
depends_on:
- redis
- database
restart: always
immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:main-openvino
extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
file: hwaccel.ml.yml
service: openvino # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
redis:
container_name: immich_redis
image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
restart: always
database:
container_name: immich_postgres
image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- pgdata:/var/lib/postgresql/data
restart: always
volumes:
pgdata:
model-cache:
Your .env content
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release
# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=(redacted)
# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
Reproduction steps
1. docker compose up
2. --> Jobs
3. --> Click Face Detection: All
...
Additional information
My processor is an Intel N100. Previously to 1.99.0, the face detection was working, but I had issues with the smart search, so I guess it's hard to get all of it with OpenVino haha.
Thank you for the gigantic work up to now! Leo
Can you check if setting the concurrency to 1 and restarting helps? And if that doesn't work, deleting the model cache and restarting?
Setting the concurrency to 1, I almost get immediately a similar error:
immich_redis | 1:M 24 Mar 2024 00:46:41.343 * Background saving terminated with success
immich_machine_learning | [03/24/24 00:46:43] INFO Setting 'buffalo_l' execution providers to
immich_machine_learning | ['OpenVINOExecutionProvider',
immich_machine_learning | 'CPUExecutionProvider'], in descending order of
immich_machine_learning | preference
immich_machine_learning | [03/24/24 00:46:43] INFO Loading facial recognition model 'buffalo_l' to
immich_machine_learning | memory
immich_machine_learning | [03/24/24 00:46:45] ERROR Exception in ASGI application
immich_machine_learning |
immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮
immich_machine_learning | │ /usr/src/app/main.py:118 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 115 │ │
immich_machine_learning | │ 116 │ model = await load(await model_cache. │
immich_machine_learning | │ ttl=settings.model_ttl, **kwargs)) │
immich_machine_learning | │ 117 │ model.configure(**kwargs) │
immich_machine_learning | │ ❱ 118 │ outputs = await run(model.predict, in │
immich_machine_learning | │ 119 │ return ORJSONResponse(outputs) │
immich_machine_learning | │ 120 │
immich_machine_learning | │ 121 │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:125 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 122 async def run(func: Callable[..., Any], i │
immich_machine_learning | │ 123 │ if thread_pool is None: │
immich_machine_learning | │ 124 │ │ return func(inputs) │
immich_machine_learning | │ ❱ 125 │ return await asyncio.get_running_loop │
immich_machine_learning | │ 126 │
immich_machine_learning | │ 127 │
immich_machine_learning | │ 128 async def load(model: InferenceModel) -> │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/lib/python3.10/concurrent/futures/thread.p │
immich_machine_learning | │ y:58 in run │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/base.py:59 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 56 │ │ self.load() │
immich_machine_learning | │ 57 │ │ if model_kwargs: │
immich_machine_learning | │ 58 │ │ │ self.configure(**model_kwargs │
immich_machine_learning | │ ❱ 59 │ │ return self._predict(inputs) │
immich_machine_learning | │ 60 │ │
immich_machine_learning | │ 61 │ @abstractmethod │
immich_machine_learning | │ 62 │ def _predict(self, inputs: Any) -> An │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/facial_recognition.py:49 in │
immich_machine_learning | │ _predict │
immich_machine_learning | │ │
immich_machine_learning | │ 46 │ │ else: │
immich_machine_learning | │ 47 │ │ │ decoded_image = image │
immich_machine_learning | │ 48 │ │ assert is_ndarray(decoded_image, n │
immich_machine_learning | │ ❱ 49 │ │ bboxes, kpss = self.det_model.dete │
immich_machine_learning | │ 50 │ │ if bboxes.size == 0: │
immich_machine_learning | │ 51 │ │ │ return [] │
immich_machine_learning | │ 52 │ │ assert is_ndarray(kpss, np.float32 │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │
immich_machine_learning | │ ace/model_zoo/retinaface.py:224 in detect │
immich_machine_learning | │ │
immich_machine_learning | │ 221 │ │ det_img = np.zeros( (input_size[1 │
immich_machine_learning | │ 222 │ │ det_img[:new_height, :new_width, │
immich_machine_learning | │ 223 │ │ │
immich_machine_learning | │ ❱ 224 │ │ scores_list, bboxes_list, kpss_li │
immich_machine_learning | │ 225 │ │ │
immich_machine_learning | │ 226 │ │ scores = np.vstack(scores_list) │
immich_machine_learning | │ 227 │ │ scores_ravel = scores.ravel() │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │
immich_machine_learning | │ ace/model_zoo/retinaface.py:152 in forward │
immich_machine_learning | │ │
immich_machine_learning | │ 149 │ │ kpss_list = [] │
immich_machine_learning | │ 150 │ │ input_size = tuple(img.shape[0:2] │
immich_machine_learning | │ 151 │ │ blob = cv2.dnn.blobFromImage(img, │
immich_machine_learning | │ (self.input_mean, self.input_mean, self.i │
immich_machine_learning | │ ❱ 152 │ │ net_outs = self.session.run(self. │
immich_machine_learning | │ 153 │ │ │
immich_machine_learning | │ 154 │ │ input_height = blob.shape[2] │
immich_machine_learning | │ 155 │ │ input_width = blob.shape[3] │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │
immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:22 │
immich_machine_learning | │ 0 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 217 │ │ if not output_names: │
immich_machine_learning | │ 218 │ │ │ output_names = [output.name │
immich_machine_learning | │ 219 │ │ try: │
immich_machine_learning | │ ❱ 220 │ │ │ return self._sess.run(output │
immich_machine_learning | │ 221 │ │ except C.EPFail as err: │
immich_machine_learning | │ 222 │ │ │ if self._enable_fallback: │
immich_machine_learning | │ 223 │ │ │ │ print(f"EP Error: {err!s │
immich_machine_learning | ╰─────────────────────────────────────────────────╯
immich_machine_learning | RuntimeException: [ONNXRuntimeError] : 6 :
immich_machine_learning | RUNTIME_EXCEPTION : Encountered unknown exception
immich_machine_learning | in Run()
immich_microservices | [Nest] 7 - 03/24/2024, 12:46:45 AM ERROR [JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | [Nest] 7 - 03/24/2024, 12:46:45 AM ERROR [JobService] Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | at MachineLearningRepository.predict (/usr/src/app/dist/infra/repositories/machine-learning.repository.js:23:19)
immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices | at async PersonService.handleDetectFaces (/usr/src/app/dist/domain/person/person.service.js:248:23)
immich_microservices | at async /usr/src/app/dist/domain/job/job.service.js:137:36
immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_microservices | [Nest] 7 - 03/24/2024, 12:46:45 AM ERROR [JobService] Object:
immich_microservices | {
immich_microservices | "id": "9e1d4bbf-84c2-40dd-9aec-c913e5a1a662"
immich_microservices | }
immich_microservices |
Deleting the model cache did not help neither.
Can you try again with these env variables set?
ORT_OPENVINO_ENABLE_CI_LOG=1
ORT_OPENVINO_ENABLE_DEBUG=1
OPENVINO_LOG_LEVEL=5
LOG_LEVEL=debug
This will help get more info on what's causing the error.
I have the same issue with the N100 too. I tried changing the model to see if that was a workaround but I'm still getting the issue. After adding those variables I got this:
Complete logs
In the OpenVINO EP
Model is fully supported on OpenVINO
CreateNgraphFunc
In the OpenVINO EP
Model is fully supported on OpenVINO
CreateNgraphFunc
[03/24/24 06:07:37] ERROR Exception in ASGI application
╭─────── Traceback (most recent call last) ───────╮
│ /usr/src/app/main.py:118 in predict │
│ │
│ 115 │ │
│ 116 │ model = await load(await model_cache. │
│ ttl=settings.model_ttl, **kwargs)) │
│ 117 │ model.configure(**kwargs) │
│ ❱ 118 │ outputs = await run(model.predict, in │
│ 119 │ return ORJSONResponse(outputs) │
│ 120 │
│ 121 │
│ │
│ ╭────────────────── locals ───────────────────╮ │
│ │ image = UploadFile(filename='blob', │ │
│ │ size=212656, │ │
│ │ headers=Headers({'content-dis… │ │
│ │ 'form-data; name="image"; │ │
│ │ filename="blob"', │ │
│ │ 'content-type': │ │
│ │ 'application/octet-stream'})) │ │
│ │ inputs = b'\xff\xd8\xff\xe2\x01\xf0ICC… │ │
│ │ \x00\x00mntrRGB XYZ │ │
│ │ \x07\xe2\x00\x03\x00\x14\x00\… │ │
│ │ kwargs = { │ │
│ │ │ 'minScore': 0.7, │ │
│ │ │ 'maxDistance': 0.5, │ │
│ │ │ 'minFaces': 3 │ │
│ │ } │ │
│ │ model = <app.models.facial_recognitio… │ │
│ │ object at 0x7fe1f2e98be0> │ │
│ │ model_name = 'antelopev2' │ │
│ │ model_type = <ModelType.FACIAL_RECOGNITION: │ │
│ │ 'facial-recognition'> │ │
│ │ options = '{"minScore":0.7,"maxDistance… │ │
│ │ text = None │ │
│ ╰─────────────────────────────────────────────╯ │
│ │
│ /usr/src/app/main.py:125 in run │
│ │
│ 122 async def run(func: Callable[..., Any], i │
│ 123 │ if thread_pool is None: │
│ 124 │ │ return func(inputs) │
│ ❱ 125 │ return await asyncio.get_running_loop │
│ 126 │
│ 127 │
│ 128 async def load(model: InferenceModel) -> │
│ │
│ ╭────────────────── locals ───────────────────╮ │
│ │ func = <bound method │ │
│ │ InferenceModel.predict of │ │
│ │ <app.models.facial_recognition.Fa… │ │
│ │ object at 0x7fe1f2e98be0>> │ │
│ │ inputs = b'\xff\xd8\xff\xe2\x01\xf0ICC_PRO… │ │
│ │ \x00\x00mntrRGB XYZ │ │
│ │ \x07\xe2\x00\x03\x00\x14\x00\t\x0… │ │
│ ╰─────────────────────────────────────────────╯ │
│ │
│ /usr/lib/python3.10/concurrent/futures/thread.p │
│ y:58 in run │
│ │
│ /usr/src/app/models/base.py:59 in predict │
│ │
│ 56 │ │ self.load() │
│ 57 │ │ if model_kwargs: │
│ 58 │ │ │ self.configure(**model_kwargs │
│ ❱ 59 │ │ return self._predict(inputs) │
│ 60 │ │
│ 61 │ @abstractmethod │
│ 62 │ def _predict(self, inputs: Any) -> An │
│ │
│ ╭────────────────── locals ───────────────────╮ │
│ │ inputs = b'\xff\xd8\xff\xe2\x01\xf0I… │ │
│ │ \x00\x00mntrRGB XYZ │ │
│ │ \x07\xe2\x00\x03\x00\x14\x0… │ │
│ │ model_kwargs = {} │ │
│ │ self = <app.models.facial_recognit… │ │
│ │ object at 0x7fe1f2e98be0> │ │
│ ╰─────────────────────────────────────────────╯ │
│ │
│ /usr/src/app/models/facial_recognition.py:49 in │
│ _predict │
│ │
│ 46 │ │ else: │
│ 47 │ │ │ decoded_image = image │
│ 48 │ │ assert is_ndarray(decoded_image, n │
│ ❱ 49 │ │ bboxes, kpss = self.det_model.dete │
│ 50 │ │ if bboxes.size == 0: │
│ 51 │ │ │ return [] │
│ 52 │ │ assert is_ndarray(kpss, np.float32 │
│ │
│ ╭────────────────── locals ───────────────────╮ │
│ │ decoded_image = array([[[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ [[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ [[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ ..., │ │
│ │ │ │ │
│ │ │ [[ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 10, 10, 4], │ │
│ │ │ │ [ 10, 10, 4], │ │
│ │ │ │ [ 10, 10, 4]], │ │
│ │ │ │ │
│ │ │ [[ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3]], │ │
│ │ │ │ │
│ │ │ [[ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3]]], │ │
│ │ dtype=uint8) │ │
│ │ image = b'\xff\xd8\xff\xe2\x01\xf0… │ │
│ │ \x00\x00mntrRGB XYZ │ │
│ │ \x07\xe2\x00\x03\x00\x14\x… │ │
│ │ self = <app.models.facial_recogni… │ │
│ │ object at 0x7fe1f2e98be0> │ │
│ ╰─────────────────────────────────────────────╯ │
│ │
│ /opt/venv/lib/python3.10/site-packages/insightf │
│ ace/model_zoo/retinaface.py:224 in detect │
│ │
│ 221 │ │ det_img = np.zeros( (input_size[1 │
│ 222 │ │ det_img[:new_height, :new_width, │
│ 223 │ │ │
│ ❱ 224 │ │ scores_list, bboxes_list, kpss_li │
│ 225 │ │ │
│ 226 │ │ scores = np.vstack(scores_list) │
│ 227 │ │ scores_ravel = scores.ravel() │
│ │
│ ╭────────────────── locals ───────────────────╮ │
│ │ det_img = array([[[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ ..., │ │
│ │ │ │ │
│ │ │ [[ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]]], │ │
│ │ dtype=uint8) │ │
│ │ det_scale = 0.3333333333333333 │ │
│ │ im_ratio = 1.3333333333333333 │ │
│ │ img = array([[[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ [[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ [[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ ..., │ │
│ │ │ │ │
│ │ │ [[ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 10, 10, 4], │ │
│ │ │ │ [ 10, 10, 4], │ │
│ │ │ │ [ 10, 10, 4]], │ │
│ │ │ │ │
│ │ │ [[ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3]], │ │
│ │ │ │ │
│ │ │ [[ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3]]], │ │
│ │ dtype=uint8) │ │
│ │ input_size = (640, 640) │ │
│ │ max_num = 0 │ │
│ │ metric = 'default' │ │
│ │ model_ratio = 1.0 │ │
│ │ new_height = 640 │ │
│ │ new_width = 480 │ │
│ │ resized_img = array([[[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ [[217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ [[217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ ..., │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116], │ │
│ │ │ │ [227, 154, 116]], │ │
│ │ │ │ │
│ │ │ ..., │ │
│ │ │ │ │
│ │ │ [[ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 11, 11, 5], │ │
│ │ │ │ [ 11, 11, 5], │ │
│ │ │ │ [ 11, 11, 5]], │ │
│ │ │ │ │
│ │ │ [[ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 10, 10, 4], │ │
│ │ │ │ [ 10, 10, 4], │ │
│ │ │ │ [ 10, 10, 4]], │ │
│ │ │ │ │
│ │ │ [[ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3], │ │
│ │ │ │ [ 9, 9, 3]]], │ │
│ │ dtype=uint8) │ │
│ │ self = <insightface.model_zoo.retin… │ │
│ │ object at 0x7fe1f2e9bc10> │ │
│ ╰─────────────────────────────────────────────╯ │
│ │
│ /opt/venv/lib/python3.10/site-packages/insightf │
│ ace/model_zoo/retinaface.py:152 in forward │
│ │
│ 149 │ │ kpss_list = [] │
│ 150 │ │ input_size = tuple(img.shape[0:2] │
│ 151 │ │ blob = cv2.dnn.blobFromImage(img, │
│ (self.input_mean, self.input_mean, self.i │
│ ❱ 152 │ │ net_outs = self.session.run(self. │
│ 153 │ │ │
│ 154 │ │ input_height = blob.shape[2] │
│ 155 │ │ input_width = blob.shape[3] │
│ │
│ ╭────────────────── locals ───────────────────╮ │
│ │ bboxes_list = [] │ │
│ │ blob = array([[[[-0.18359375, │ │
│ │ -0.18359375, -0.18359375, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.17578125, │ │
│ │ -0.17578125, -0.17578125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.17578125, │ │
│ │ -0.17578125, -0.17578125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ ..., │ │
│ │ │ │ [-0.83984375, │ │
│ │ -0.83984375, -0.83984375, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.82421875, │ │
│ │ -0.82421875, -0.82421875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.83203125, │ │
│ │ -0.83203125, -0.83203125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375]], │ │
│ │ │ │ │ │
│ │ │ │ [[ 0.09765625, │ │
│ │ 0.09765625, 0.09765625, ..., │ │
│ │ -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.10546875, │ │
│ │ 0.10546875, 0.10546875, ..., │ │
│ │ -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.10546875, │ │
│ │ 0.10546875, 0.10546875, ..., │ │
│ │ -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ ..., │ │
│ │ │ │ [-0.78515625, │ │
│ │ -0.78515625, -0.78515625, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.76953125, │ │
│ │ -0.76953125, -0.76953125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.77734375, │ │
│ │ -0.77734375, -0.77734375, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375]], │ │
│ │ │ │ │ │
│ │ │ │ [[ 0.69140625, │ │
│ │ 0.69140625, 0.69140625, ..., │ │
│ │ -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.69921875, │ │
│ │ 0.69921875, 0.69921875, ..., │ │
│ │ -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.69921875, │ │
│ │ 0.69921875, 0.69921875, ..., │ │
│ │ -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ ..., │ │
│ │ │ │ [-0.64453125, │ │
│ │ -0.64453125, -0.64453125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.62890625, │ │
│ │ -0.62890625, -0.62890625, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.63671875, │ │
│ │ -0.63671875, -0.63671875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375]]]], │ │
│ │ dtype=float32) │ │
│ │ img = array([[[216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ [216, 140, 104], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ [217, 141, 105], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ ..., │ │
│ │ │ │ │
│ │ │ [[ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ [ 45, 27, 20], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ [ 47, 29, 22], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]], │ │
│ │ │ │ │
│ │ │ [[ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ [ 46, 28, 21], │ │
│ │ │ │ ..., │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0], │ │
│ │ │ │ [ 0, 0, 0]]], │ │
│ │ dtype=uint8) │ │
│ │ input_size = (640, 640) │ │
│ │ kpss_list = [] │ │
│ │ scores_list = [] │ │
│ │ self = <insightface.model_zoo.retin… │ │
│ │ object at 0x7fe1f2e9bc10> │ │
│ │ threshold = 0.7 │ │
│ ╰─────────────────────────────────────────────╯ │
│ │
│ /opt/venv/lib/python3.10/site-packages/onnxrunt │
│ ime/capi/onnxruntime_inference_collection.py:22 │
│ 0 in run │
│ │
│ 217 │ │ if not output_names: │
│ 218 │ │ │ output_names = [output.name │
│ 219 │ │ try: │
│ ❱ 220 │ │ │ return self._sess.run(output │
│ 221 │ │ except C.EPFail as err: │
│ 222 │ │ │ if self._enable_fallback: │
│ 223 │ │ │ │ print(f"EP Error: {err!s │
│ │
│ ╭────────────────── locals ───────────────────╮ │
│ │ input_feed = { │ │
│ │ │ 'input.1': │ │
│ │ array([[[[-0.18359375, │ │
│ │ -0.18359375, -0.18359375, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.17578125, │ │
│ │ -0.17578125, -0.17578125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.17578125, │ │
│ │ -0.17578125, -0.17578125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ ..., │ │
│ │ │ │ [-0.83984375, │ │
│ │ -0.83984375, -0.83984375, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.82421875, │ │
│ │ -0.82421875, -0.82421875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.83203125, │ │
│ │ -0.83203125, -0.83203125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375]], │ │
│ │ │ │ │ │
│ │ │ │ [[ 0.09765625, │ │
│ │ 0.09765625, 0.09765625, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.10546875, │ │
│ │ 0.10546875, 0.10546875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.10546875, │ │
│ │ 0.10546875, 0.10546875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ ..., │ │
│ │ │ │ [-0.78515625, │ │
│ │ -0.78515625, -0.78515625, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.76953125, │ │
│ │ -0.76953125, -0.76953125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.77734375, │ │
│ │ -0.77734375, -0.77734375, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375]], │ │
│ │ │ │ │ │
│ │ │ │ [[ 0.69140625, │ │
│ │ 0.69140625, 0.69140625, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.69921875, │ │
│ │ 0.69921875, 0.69921875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [ 0.69921875, │ │
│ │ 0.69921875, 0.69921875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ ..., │ │
│ │ │ │ [-0.64453125, │ │
│ │ -0.64453125, -0.64453125, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.62890625, │ │
│ │ -0.62890625, -0.62890625, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375], │ │
│ │ │ │ [-0.63671875, │ │
│ │ -0.63671875, -0.63671875, │ │
│ │ ..., -0.99609375, │ │
│ │ │ │ -0.99609375, │ │
│ │ -0.99609375]]]], │ │
│ │ dtype=float32) │ │
│ │ } │ │
│ │ output_names = [ │ │
│ │ │ '448', │ │
│ │ │ '471', │ │
│ │ │ '494', │ │
│ │ │ '451', │ │
│ │ │ '474', │ │
│ │ │ '497', │ │
│ │ │ '454', │ │
│ │ │ '477', │ │
│ │ │ '500' │ │
│ │ ] │ │
│ │ run_options = None │ │
│ │ self = <onnxruntime.capi.onnxrunti… │ │
│ │ object at 0x7fe1f2e9b700> │ │
│ ╰─────────────────────────────────────────────╯ │
╰─────────────────────────────────────────────────╯
RuntimeException: [ONNXRuntimeError] : 6 :
RUNTIME_EXCEPTION : Encountered unknown exception
in Run()
Hope this helps!
Here are my logs, I think very similar:
immich_machine_learning | [03/24/24 16:17:42] DEBUG Available ORT providers:
immich_machine_learning | {'OpenVINOExecutionProvider',
immich_machine_learning | 'CPUExecutionProvider'}
immich_machine_learning | [03/24/24 16:17:42] DEBUG Available OpenVINO devices: ['CPU', 'GPU']
immich_machine_learning | [03/24/24 16:17:42] INFO Setting 'buffalo_l' execution providers to
immich_machine_learning | ['OpenVINOExecutionProvider',
immich_machine_learning | 'CPUExecutionProvider'], in descending order of
immich_machine_learning | preference
immich_machine_learning | [03/24/24 16:17:42] DEBUG Setting execution provider options to
immich_machine_learning | [{'device_type': 'GPU_FP32', 'cache_dir':
immich_machine_learning | '/cache/facial-recognition/buffalo_l/openvino'},
immich_machine_learning | {'arena_extend_strategy': 'kSameAsRequested'}]
immich_machine_learning | [03/24/24 16:17:42] DEBUG Setting execution_mode to ORT_SEQUENTIAL
immich_machine_learning | [03/24/24 16:17:42] DEBUG Setting inter_op_num_threads to 0
immich_machine_learning | [03/24/24 16:17:42] DEBUG Setting intra_op_num_threads to 0
immich_machine_learning | [03/24/24 16:17:42] DEBUG Setting preferred runtime to onnx
immich_machine_learning | [03/24/24 16:17:42] INFO Loading facial recognition model 'buffalo_l' to
immich_machine_learning | memory
immich_machine_learning | In the OpenVINO EP
immich_machine_learning | Model is fully supported on OpenVINO
immich_machine_learning | CreateNgraphFunc
immich_machine_learning | In the OpenVINO EP
immich_machine_learning | Model is fully supported on OpenVINO
immich_machine_learning | CreateNgraphFunc
immich_machine_learning | [03/24/24 16:17:44] ERROR Exception in ASGI application
immich_machine_learning |
immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮
immich_machine_learning | │ /usr/src/app/main.py:118 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 115 │ │
immich_machine_learning | │ 116 │ model = await load(await model_cache. │
immich_machine_learning | │ ttl=settings.model_ttl, **kwargs)) │
immich_machine_learning | │ 117 │ model.configure(**kwargs) │
immich_machine_learning | │ ❱ 118 │ outputs = await run(model.predict, in │
immich_machine_learning | │ 119 │ return ORJSONResponse(outputs) │
immich_machine_learning | │ 120 │
immich_machine_learning | │ 121 │
immich_machine_learning | │ │
immich_machine_learning | │ ╭────────────────── locals ───────────────────╮ │
immich_machine_learning | │ │ image = UploadFile(filename='blob', │ │
immich_machine_learning | │ │ size=591599, │ │
immich_machine_learning | │ │ headers=Headers({'content-dis… │ │
immich_machine_learning | │ │ 'form-data; name="image"; │ │
immich_machine_learning | │ │ filename="blob"', │ │
immich_machine_learning | │ │ 'content-type': │ │
immich_machine_learning | │ │ 'application/octet-stream'})) │ │
immich_machine_learning | │ │ inputs = b'\xff\xd8\xff\xe2\x01\xf0ICC… │ │
immich_machine_learning | │ │ \x00\x00mntrRGB XYZ │ │
immich_machine_learning | │ │ \x07\xe2\x00\x03\x00\x14\x00\… │ │
immich_machine_learning | │ │ kwargs = { │ │
immich_machine_learning | │ │ │ 'minScore': 0.7, │ │
immich_machine_learning | │ │ │ 'maxDistance': 0.5, │ │
immich_machine_learning | │ │ │ 'minFaces': 3 │ │
immich_machine_learning | │ │ } │ │
immich_machine_learning | │ │ model = <app.models.facial_recognitio… │ │
immich_machine_learning | │ │ object at 0x7ab23c362fe0> │ │
immich_machine_learning | │ │ model_name = 'buffalo_l' │ │
immich_machine_learning | │ │ model_type = <ModelType.FACIAL_RECOGNITION: │ │
immich_machine_learning | │ │ 'facial-recognition'> │ │
immich_machine_learning | │ │ options = '{"minScore":0.7,"maxDistance… │ │
immich_machine_learning | │ │ text = None │ │
immich_machine_learning | │ ╰─────────────────────────────────────────────╯ │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:125 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 122 async def run(func: Callable[..., Any], i │
immich_machine_learning | │ 123 │ if thread_pool is None: │
immich_machine_learning | │ 124 │ │ return func(inputs) │
immich_machine_learning | │ ❱ 125 │ return await asyncio.get_running_loop │
immich_machine_learning | │ 126 │
immich_machine_learning | │ 127 │
immich_machine_learning | │ 128 async def load(model: InferenceModel) -> │
immich_machine_learning | │ │
immich_machine_learning | │ ╭────────────────── locals ───────────────────╮ │
immich_machine_learning | │ │ func = <bound method │ │
immich_machine_learning | │ │ InferenceModel.predict of │ │
immich_machine_learning | │ │ <app.models.facial_recognition.Fa… │ │
immich_machine_learning | │ │ object at 0x7ab23c362fe0>> │ │
immich_machine_learning | │ │ inputs = b'\xff\xd8\xff\xe2\x01\xf0ICC_PRO… │ │
immich_machine_learning | │ │ \x00\x00mntrRGB XYZ │ │
immich_machine_learning | │ │ \x07\xe2\x00\x03\x00\x14\x00\t\x0… │ │
immich_machine_learning | │ ╰─────────────────────────────────────────────╯ │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/lib/python3.10/concurrent/futures/thread.p │
immich_machine_learning | │ y:58 in run │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/base.py:59 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 56 │ │ self.load() │
immich_machine_learning | │ 57 │ │ if model_kwargs: │
immich_machine_learning | │ 58 │ │ │ self.configure(**model_kwargs │
immich_machine_learning | │ ❱ 59 │ │ return self._predict(inputs) │
immich_machine_learning | │ 60 │ │
immich_machine_learning | │ 61 │ @abstractmethod │
immich_machine_learning | │ 62 │ def _predict(self, inputs: Any) -> An │
immich_machine_learning | │ │
immich_machine_learning | │ ╭────────────────── locals ───────────────────╮ │
immich_machine_learning | │ │ inputs = b'\xff\xd8\xff\xe2\x01\xf0I… │ │
immich_machine_learning | │ │ \x00\x00mntrRGB XYZ │ │
immich_machine_learning | │ │ \x07\xe2\x00\x03\x00\x14\x0… │ │
immich_machine_learning | │ │ model_kwargs = {} │ │
immich_machine_learning | │ │ self = <app.models.facial_recognit… │ │
immich_machine_learning | │ │ object at 0x7ab23c362fe0> │ │
immich_machine_learning | │ ╰─────────────────────────────────────────────╯ │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/facial_recognition.py:49 in │
immich_machine_learning | │ _predict │
immich_machine_learning | │ │
immich_machine_learning | │ 46 │ │ else: │
immich_machine_learning | │ 47 │ │ │ decoded_image = image │
immich_machine_learning | │ 48 │ │ assert is_ndarray(decoded_image, n │
immich_machine_learning | │ ❱ 49 │ │ bboxes, kpss = self.det_model.dete │
immich_machine_learning | │ 50 │ │ if bboxes.size == 0: │
immich_machine_learning | │ 51 │ │ │ return [] │
immich_machine_learning | │ 52 │ │ assert is_ndarray(kpss, np.float32 │
immich_machine_learning | │ │
immich_machine_learning | │ ╭────────────────── locals ───────────────────╮ │
immich_machine_learning | │ │ decoded_image = array([[[ 0, 17, 34], │ │
immich_machine_learning | │ │ │ │ [ 0, 17, 34], │ │
immich_machine_learning | │ │ │ │ [ 0, 18, 35], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 8, 7, 9], │ │
immich_machine_learning | │ │ │ │ [ 14, 13, 15], │ │
immich_machine_learning | │ │ │ │ [ 19, 18, 20]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 0, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 2, 20, 37], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 7, 6, 8], │ │
immich_machine_learning | │ │ │ │ [ 14, 13, 15], │ │
immich_machine_learning | │ │ │ │ [ 20, 19, 21]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 2, 22, 39], │ │
immich_machine_learning | │ │ │ │ [ 4, 22, 39], │ │
immich_machine_learning | │ │ │ │ [ 4, 22, 39], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 5, 4, 6], │ │
immich_machine_learning | │ │ │ │ [ 14, 13, 15], │ │
immich_machine_learning | │ │ │ │ [ 22, 21, 23]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 32, 56, 86], │ │
immich_machine_learning | │ │ │ │ [ 36, 60, 90], │ │
immich_machine_learning | │ │ │ │ [ 42, 66, 96], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 28, 54, 71], │ │
immich_machine_learning | │ │ │ │ [ 31, 57, 74], │ │
immich_machine_learning | │ │ │ │ [ 36, 62, 79]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 37, 59, 87], │ │
immich_machine_learning | │ │ │ │ [ 43, 65, 93], │ │
immich_machine_learning | │ │ │ │ [ 53, 75, 103], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 27, 53, 70], │ │
immich_machine_learning | │ │ │ │ [ 28, 54, 71], │ │
immich_machine_learning | │ │ │ │ [ 32, 58, 75]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 44, 66, 94], │ │
immich_machine_learning | │ │ │ │ [ 50, 72, 100], │ │
immich_machine_learning | │ │ │ │ [ 61, 83, 111], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 27, 53, 70], │ │
immich_machine_learning | │ │ │ │ [ 25, 51, 68], │ │
immich_machine_learning | │ │ │ │ [ 27, 53, 70]]], │ │
immich_machine_learning | │ │ dtype=uint8) │ │
immich_machine_learning | │ │ image = b'\xff\xd8\xff\xe2\x01\xf0… │ │
immich_machine_learning | │ │ \x00\x00mntrRGB XYZ │ │
immich_machine_learning | │ │ \x07\xe2\x00\x03\x00\x14\x… │ │
immich_machine_learning | │ │ self = <app.models.facial_recogni… │ │
immich_machine_learning | │ │ object at 0x7ab23c362fe0> │ │
immich_machine_learning | │ ╰─────────────────────────────────────────────╯ │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │
immich_machine_learning | │ ace/model_zoo/retinaface.py:224 in detect │
immich_machine_learning | │ │
immich_machine_learning | │ 221 │ │ det_img = np.zeros( (input_size[1 │
immich_machine_learning | │ 222 │ │ det_img[:new_height, :new_width, │
immich_machine_learning | │ 223 │ │ │
immich_machine_learning | │ ❱ 224 │ │ scores_list, bboxes_list, kpss_li │
immich_machine_learning | │ 225 │ │ │
immich_machine_learning | │ 226 │ │ scores = np.vstack(scores_list) │
immich_machine_learning | │ 227 │ │ scores_ravel = scores.ravel() │
immich_machine_learning | │ │
immich_machine_learning | │ ╭────────────────── locals ───────────────────╮ │
immich_machine_learning | │ │ det_img = array([[[ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 3, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 0, 13, 31], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 6, 24, 41], │ │
immich_machine_learning | │ │ │ │ [ 6, 22, 39], │ │
immich_machine_learning | │ │ │ │ [ 1, 15, 33], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 3, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 0, 14, 32], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 40, 67, 101], │ │
immich_machine_learning | │ │ │ │ [ 28, 55, 89], │ │
immich_machine_learning | │ │ │ │ [ 33, 60, 94], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 35, 60, 92], │ │
immich_machine_learning | │ │ │ │ [ 33, 58, 90], │ │
immich_machine_learning | │ │ │ │ [ 43, 68, 100], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 43, 65, 93], │ │
immich_machine_learning | │ │ │ │ [ 69, 91, 119], │ │
immich_machine_learning | │ │ │ │ [ 64, 86, 114], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]]], │ │
immich_machine_learning | │ │ dtype=uint8) │ │
immich_machine_learning | │ │ det_scale = 0.3333333333333333 │ │
immich_machine_learning | │ │ im_ratio = 1.3333333333333333 │ │
immich_machine_learning | │ │ img = array([[[ 0, 17, 34], │ │
immich_machine_learning | │ │ │ │ [ 0, 17, 34], │ │
immich_machine_learning | │ │ │ │ [ 0, 18, 35], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 8, 7, 9], │ │
immich_machine_learning | │ │ │ │ [ 14, 13, 15], │ │
immich_machine_learning | │ │ │ │ [ 19, 18, 20]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 0, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 2, 20, 37], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 7, 6, 8], │ │
immich_machine_learning | │ │ │ │ [ 14, 13, 15], │ │
immich_machine_learning | │ │ │ │ [ 20, 19, 21]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 2, 22, 39], │ │
immich_machine_learning | │ │ │ │ [ 4, 22, 39], │ │
immich_machine_learning | │ │ │ │ [ 4, 22, 39], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 5, 4, 6], │ │
immich_machine_learning | │ │ │ │ [ 14, 13, 15], │ │
immich_machine_learning | │ │ │ │ [ 22, 21, 23]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 32, 56, 86], │ │
immich_machine_learning | │ │ │ │ [ 36, 60, 90], │ │
immich_machine_learning | │ │ │ │ [ 42, 66, 96], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 28, 54, 71], │ │
immich_machine_learning | │ │ │ │ [ 31, 57, 74], │ │
immich_machine_learning | │ │ │ │ [ 36, 62, 79]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 37, 59, 87], │ │
immich_machine_learning | │ │ │ │ [ 43, 65, 93], │ │
immich_microservices | [Nest] 7 - 03/24/2024, 4:17:44 PM ERROR [JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | [Nest] 7 - 03/24/2024, 4:17:44 PM ERROR [JobService] Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | at MachineLearningRepository.predict (/usr/src/app/dist/infra/repositories/machine-learning.repository.js:23:19)
immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices | at async PersonService.handleDetectFaces (/usr/src/app/dist/domain/person/person.service.js:248:23)
immich_microservices | at async /usr/src/app/dist/domain/job/job.service.js:137:36
immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_microservices | [Nest] 7 - 03/24/2024, 4:17:44 PM ERROR [JobService] Object:
immich_microservices | {
immich_microservices | "id": "ea7fe00a-068b-46d3-8ae1-61dd6146286f"
immich_microservices | }
immich_microservices |
immich_machine_learning | │ │ │ │ [ 53, 75, 103], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 27, 53, 70], │ │
immich_machine_learning | │ │ │ │ [ 28, 54, 71], │ │
immich_machine_learning | │ │ │ │ [ 32, 58, 75]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 44, 66, 94], │ │
immich_machine_learning | │ │ │ │ [ 50, 72, 100], │ │
immich_machine_learning | │ │ │ │ [ 61, 83, 111], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 27, 53, 70], │ │
immich_machine_learning | │ │ │ │ [ 25, 51, 68], │ │
immich_machine_learning | │ │ │ │ [ 27, 53, 70]]], │ │
immich_machine_learning | │ │ dtype=uint8) │ │
immich_machine_learning | │ │ input_size = (640, 640) │ │
immich_machine_learning | │ │ max_num = 0 │ │
immich_machine_learning | │ │ metric = 'default' │ │
immich_machine_learning | │ │ model_ratio = 1.0 │ │
immich_machine_learning | │ │ new_height = 640 │ │
immich_machine_learning | │ │ new_width = 480 │ │
immich_machine_learning | │ │ resized_img = array([[[ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 3, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 0, 13, 31], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 2, 1, 3], │ │
immich_machine_learning | │ │ │ │ [ 2, 1, 3], │ │
immich_machine_learning | │ │ │ │ [ 14, 13, 15]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 6, 24, 41], │ │
immich_machine_learning | │ │ │ │ [ 6, 22, 39], │ │
immich_machine_learning | │ │ │ │ [ 1, 15, 33], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 1], │ │
immich_machine_learning | │ │ │ │ [ 4, 3, 5], │ │
immich_machine_learning | │ │ │ │ [ 16, 15, 17]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 3, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 0, 14, 32], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 2, 1, 3], │ │
immich_machine_learning | │ │ │ │ [ 2, 1, 3], │ │
immich_machine_learning | │ │ │ │ [ 18, 17, 19]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 40, 67, 101], │ │
immich_machine_learning | │ │ │ │ [ 28, 55, 89], │ │
immich_machine_learning | │ │ │ │ [ 33, 60, 94], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 49, 75, 92], │ │
immich_machine_learning | │ │ │ │ [ 37, 63, 80], │ │
immich_machine_learning | │ │ │ │ [ 32, 58, 75]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 35, 60, 92], │ │
immich_machine_learning | │ │ │ │ [ 33, 58, 90], │ │
immich_machine_learning | │ │ │ │ [ 43, 68, 100], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 29, 55, 72], │ │
immich_machine_learning | │ │ │ │ [ 33, 59, 76], │ │
immich_machine_learning | │ │ │ │ [ 33, 59, 76]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 43, 65, 93], │ │
immich_machine_learning | │ │ │ │ [ 69, 91, 119], │ │
immich_machine_learning | │ │ │ │ [ 64, 86, 114], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 27, 53, 70], │ │
immich_machine_learning | │ │ │ │ [ 30, 56, 73], │ │
immich_machine_learning | │ │ │ │ [ 28, 54, 71]]], │ │
immich_machine_learning | │ │ dtype=uint8) │ │
immich_machine_learning | │ │ self = <insightface.model_zoo.retin… │ │
immich_machine_learning | │ │ object at 0x7ab23c362dd0> │ │
immich_machine_learning | │ ╰─────────────────────────────────────────────╯ │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │
immich_machine_learning | │ ace/model_zoo/retinaface.py:152 in forward │
immich_machine_learning | │ │
immich_machine_learning | │ 149 │ │ kpss_list = [] │
immich_machine_learning | │ 150 │ │ input_size = tuple(img.shape[0:2] │
immich_machine_learning | │ 151 │ │ blob = cv2.dnn.blobFromImage(img, │
immich_machine_learning | │ (self.input_mean, self.input_mean, self.i │
immich_machine_learning | │ ❱ 152 │ │ net_outs = self.session.run(self. │
immich_machine_learning | │ 153 │ │ │
immich_machine_learning | │ 154 │ │ input_height = blob.shape[2] │
immich_machine_learning | │ 155 │ │ input_width = blob.shape[3] │
immich_machine_learning | │ │
immich_machine_learning | │ ╭────────────────── locals ───────────────────╮ │
immich_machine_learning | │ │ bboxes_list = [] │ │
immich_machine_learning | │ │ blob = array([[[[-0.71484375, │ │
immich_machine_learning | │ │ -0.71484375, -0.75390625, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.67578125, │ │
immich_machine_learning | │ │ -0.69140625, -0.73828125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.71484375, │ │
immich_machine_learning | │ │ -0.71484375, -0.74609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [-0.20703125, │ │
immich_machine_learning | │ │ -0.30078125, -0.26171875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.27734375, │ │
immich_machine_learning | │ │ -0.29296875, -0.21484375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.26953125, │ │
immich_machine_learning | │ │ -0.06640625, -0.10546875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375]], │ │
immich_machine_learning | │ │ │ │ │ │
immich_machine_learning | │ │ │ │ [[-0.84765625, │ │
immich_machine_learning | │ │ -0.84765625, -0.89453125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.80859375, │ │
immich_machine_learning | │ │ -0.82421875, -0.87890625, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.84765625, │ │
immich_machine_learning | │ │ -0.84765625, -0.88671875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [-0.47265625, │ │
immich_machine_learning | │ │ -0.56640625, -0.52734375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.52734375, │ │
immich_machine_learning | │ │ -0.54296875, -0.46484375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.48828125, │ │
immich_machine_learning | │ │ -0.28515625, -0.32421875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375]], │ │
immich_machine_learning | │ │ │ │ │ │
immich_machine_learning | │ │ │ │ [[-0.98828125, │ │
immich_machine_learning | │ │ -0.97265625, -0.99609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.94921875, │ │
immich_machine_learning | │ │ -0.94921875, -0.98828125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.98828125, │ │
immich_machine_learning | │ │ -0.97265625, -0.99609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [-0.68359375, │ │
immich_machine_learning | │ │ -0.77734375, -0.73828125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.72265625, │ │
immich_machine_learning | │ │ -0.73828125, -0.66015625, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.66015625, │ │
immich_machine_learning | │ │ -0.45703125, -0.49609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375]]]], │ │
immich_machine_learning | │ │ dtype=float32) │ │
immich_machine_learning | │ │ img = array([[[ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 3, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 0, 13, 31], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 6, 24, 41], │ │
immich_machine_learning | │ │ │ │ [ 6, 22, 39], │ │
immich_machine_learning | │ │ │ │ [ 1, 15, 33], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 1, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 3, 19, 36], │ │
immich_machine_learning | │ │ │ │ [ 0, 14, 32], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 40, 67, 101], │ │
immich_machine_learning | │ │ │ │ [ 28, 55, 89], │ │
immich_machine_learning | │ │ │ │ [ 33, 60, 94], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 35, 60, 92], │ │
immich_machine_learning | │ │ │ │ [ 33, 58, 90], │ │
immich_machine_learning | │ │ │ │ [ 43, 68, 100], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]], │ │
immich_machine_learning | │ │ │ │ │
immich_machine_learning | │ │ │ [[ 43, 65, 93], │ │
immich_machine_learning | │ │ │ │ [ 69, 91, 119], │ │
immich_machine_learning | │ │ │ │ [ 64, 86, 114], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0], │ │
immich_machine_learning | │ │ │ │ [ 0, 0, 0]]], │ │
immich_machine_learning | │ │ dtype=uint8) │ │
immich_machine_learning | │ │ input_size = (640, 640) │ │
immich_machine_learning | │ │ kpss_list = [] │ │
immich_machine_learning | │ │ scores_list = [] │ │
immich_machine_learning | │ │ self = <insightface.model_zoo.retin… │ │
immich_machine_learning | │ │ object at 0x7ab23c362dd0> │ │
immich_machine_learning | │ │ threshold = 0.7 │ │
immich_machine_learning | │ ╰─────────────────────────────────────────────╯ │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │
immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:22 │
immich_machine_learning | │ 0 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 217 │ │ if not output_names: │
immich_machine_learning | │ 218 │ │ │ output_names = [output.name │
immich_machine_learning | │ 219 │ │ try: │
immich_machine_learning | │ ❱ 220 │ │ │ return self._sess.run(output │
immich_machine_learning | │ 221 │ │ except C.EPFail as err: │
immich_machine_learning | │ 222 │ │ │ if self._enable_fallback: │
immich_machine_learning | │ 223 │ │ │ │ print(f"EP Error: {err!s │
immich_machine_learning | │ │
immich_machine_learning | │ ╭────────────────── locals ───────────────────╮ │
immich_machine_learning | │ │ input_feed = { │ │
immich_machine_learning | │ │ │ 'input.1': │ │
immich_machine_learning | │ │ array([[[[-0.71484375, │ │
immich_machine_learning | │ │ -0.71484375, -0.75390625, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.67578125, │ │
immich_machine_learning | │ │ -0.69140625, -0.73828125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.71484375, │ │
immich_machine_learning | │ │ -0.71484375, -0.74609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [-0.20703125, │ │
immich_machine_learning | │ │ -0.30078125, -0.26171875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.27734375, │ │
immich_machine_learning | │ │ -0.29296875, -0.21484375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.26953125, │ │
immich_machine_learning | │ │ -0.06640625, -0.10546875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375]], │ │
immich_machine_learning | │ │ │ │ │ │
immich_machine_learning | │ │ │ │ [[-0.84765625, │ │
immich_machine_learning | │ │ -0.84765625, -0.89453125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.80859375, │ │
immich_machine_learning | │ │ -0.82421875, -0.87890625, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.84765625, │ │
immich_machine_learning | │ │ -0.84765625, -0.88671875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [-0.47265625, │ │
immich_machine_learning | │ │ -0.56640625, -0.52734375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.52734375, │ │
immich_machine_learning | │ │ -0.54296875, -0.46484375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.48828125, │ │
immich_machine_learning | │ │ -0.28515625, -0.32421875, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375]], │ │
immich_machine_learning | │ │ │ │ │ │
immich_machine_learning | │ │ │ │ [[-0.98828125, │ │
immich_machine_learning | │ │ -0.97265625, -0.99609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.94921875, │ │
immich_machine_learning | │ │ -0.94921875, -0.98828125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.98828125, │ │
immich_machine_learning | │ │ -0.97265625, -0.99609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ ..., │ │
immich_machine_learning | │ │ │ │ [-0.68359375, │ │
immich_machine_learning | │ │ -0.77734375, -0.73828125, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.72265625, │ │
immich_machine_learning | │ │ -0.73828125, -0.66015625, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375], │ │
immich_machine_learning | │ │ │ │ [-0.66015625, │ │
immich_machine_learning | │ │ -0.45703125, -0.49609375, │ │
immich_machine_learning | │ │ ..., -0.99609375, │ │
immich_machine_learning | │ │ │ │ -0.99609375, │ │
immich_machine_learning | │ │ -0.99609375]]]], │ │
immich_machine_learning | │ │ dtype=float32) │ │
immich_machine_learning | │ │ } │ │
immich_machine_learning | │ │ output_names = [ │ │
immich_machine_learning | │ │ │ '448', │ │
immich_machine_learning | │ │ │ '471', │ │
immich_machine_learning | │ │ │ '494', │ │
immich_machine_learning | │ │ │ '451', │ │
immich_machine_learning | │ │ │ '474', │ │
immich_machine_learning | │ │ │ '497', │ │
immich_machine_learning | │ │ │ '454', │ │
immich_machine_learning | │ │ │ '477', │ │
immich_machine_learning | │ │ │ '500' │ │
immich_machine_learning | │ │ ] │ │
immich_machine_learning | │ │ run_options = None │ │
immich_machine_learning | │ │ self = <onnxruntime.capi.onnxrunti… │ │
immich_machine_learning | │ │ object at 0x7ab23c362b00> │ │
immich_machine_learning | │ ╰─────────────────────────────────────────────╯ │
immich_machine_learning | ╰─────────────────────────────────────────────────╯
immich_machine_learning | RuntimeException: [ONNXRuntimeError] : 6 :
immich_machine_learning | RUNTIME_EXCEPTION : Encountered unknown exception
immich_machine_learning | in Run()
immich_machine_learning | [03/24/24 16:17:48] DEBUG Checking for inactivity...
I made an upstream issue for this based on the info here. Let's wait for their response.
I am having this problem too.
I'm having the same issue in 1.100.0 too.
For future reference, it's better to leave a thumbs up for issues if they affect you. Leaving a comment notifies every participant in the issue, so it should be reserved for comments that drive the issue forward.
same issue in 1.100.0 too. on wsl2,my config is immich-machine-learning: container_name: immich_machine_learning restart: always image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino devices: - /dev/dri:/dev/dri - /dev/dxg:/dev/dxg volumes: - D:\Immich\cache:/cache - /dev/bus/usb:/dev/bus/usb - /usr/lib/wsl:/usr/lib/wsl env_file: - .env
I am also facing this issue. It runs fine on my laptop which has i5-1145G7 but doesn't work on my immich desktop which has i3-12100.
Can we provide an option to disable OpenVINO runtime for where it fails only for the facial recognition model? Because the smart search models work fine.
The i5-1145G7 has Iris graphics, same with the CPU I tested with. It seems to be that UHD graphics doesn't work, but Iris does.
same here with 1.101.0 on i5 Gen 7 was perfectly working on older releases
similar here with smart search. 1.102.3 on N5095. sadly the smart search nerver works for me.
good news, when change from immich-machine-learning:${IMMICH_VERSION}-openvino to immich-machine-learning:${IMMICH_VERSION}, it works! (related https://github.com/immich-app/immich/issues/8918)
same error on 1.102.3, was working until 1.099
immich_machine_learning | [04/29/24 12:59:22] INFO Setting 'buffalo_l' execution providers to immich_machine_learning | ['OpenVINOExecutionProvider', immich_machine_learning | 'CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [04/29/24 12:59:22] INFO Loading facial recognition model 'buffalo_l' to immich_machine_learning | memory immich_machine_learning | [04/29/24 12:59:29] ERROR Exception in ASGI application immich_machine_learning | immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮ immich_machine_learning | │ /usr/src/app/main.py:118 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 115 │ │ immich_machine_learning | │ 116 │ model = await load(await model_cache. │ immich_machine_learning | │ ttl=settings.model_ttl, **kwargs)) │ immich_machine_learning | │ 117 │ model.configure(**kwargs) │ immich_machine_learning | │ ❱ 118 │ outputs = await run(model.predict, in │ immich_machine_learning | │ 119 │ return ORJSONResponse(outputs) │ immich_machine_learning | │ 120 │ immich_machine_learning | │ 121 │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/main.py:125 in run │ immich_machine_learning | │ │ immich_machine_learning | │ 122 async def run(func: Callable[..., Any], i │ immich_machine_learning | │ 123 │ if thread_pool is None: │ immich_machine_learning | │ 124 │ │ return func(inputs) │ immich_machine_learning | │ ❱ 125 │ return await asyncio.get_running_loop │ immich_machine_learning | │ 126 │ immich_machine_learning | │ 127 │ immich_machine_learning | │ 128 async def load(model: InferenceModel) -> │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/lib/python3.10/concurrent/futures/thread.p │ immich_machine_learning | │ y:58 in run │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/models/base.py:59 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 56 │ │ self.load() │ immich_machine_learning | │ 57 │ │ if model_kwargs: │ immich_machine_learning | │ 58 │ │ │ self.configure(**model_kwargs │ immich_machine_learning | │ ❱ 59 │ │ return self._predict(inputs) │ immich_machine_learning | │ 60 │ │ immich_machine_learning | │ 61 │ @abstractmethod │ immich_machine_learning | │ 62 │ def _predict(self, inputs: Any) -> An │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/models/facial_recognition.py:49 in │ immich_machine_learning | │ _predict │ immich_machine_learning | │ │ immich_machine_learning | │ 46 │ │ else: │ immich_machine_learning | │ 47 │ │ │ decoded_image = image │ immich_machine_learning | │ 48 │ │ assert is_ndarray(decoded_image, n │ immich_machine_learning | │ ❱ 49 │ │ bboxes, kpss = self.det_model.dete │ immich_machine_learning | │ 50 │ │ if bboxes.size == 0: │ immich_machine_learning | │ 51 │ │ │ return [] │ immich_machine_learning | │ 52 │ │ assert is_ndarray(kpss, np.float32 │ immich_machine_learning | │ │ immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │ immich_machine_learning | │ ace/model_zoo/retinaface.py:224 in detect │ immich_machine_learning | │ │ immich_machine_learning | │ 221 │ │ det_img = np.zeros( (input_size[1 │ immich_machine_learning | │ 222 │ │ det_img[:new_height, :new_width, │ immich_machine_learning | │ 223 │ │ │ immich_machine_learning | │ ❱ 224 │ │ scores_list, bboxes_list, kpss_li │ immich_machine_learning | │ 225 │ │ │ immich_machine_learning | │ 226 │ │ scores = np.vstack(scores_list) │ immich_machine_learning | │ 227 │ │ scores_ravel = scores.ravel() │ immich_machine_learning | │ │ immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/insightf │ immich_machine_learning | │ ace/model_zoo/retinaface.py:152 in forward │ immich_machine_learning | │ │ immich_machine_learning | │ 149 │ │ kpss_list = [] │ immich_machine_learning | │ 150 │ │ input_size = tuple(img.shape[0:2] │ immich_machine_learning | │ 151 │ │ blob = cv2.dnn.blobFromImage(img, │ immich_machine_learning | │ (self.input_mean, self.input_mean, self.i │ immich_machine_learning | │ ❱ 152 │ │ net_outs = self.session.run(self. │ immich_machine_learning | │ 153 │ │ │ immich_machine_learning | │ 154 │ │ input_height = blob.shape[2] │ immich_machine_learning | │ 155 │ │ input_width = blob.shape[3] │ immich_machine_learning | │ │ immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │ immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:22 │ immich_machine_learning | │ 0 in run │ immich_machine_learning | │ │ immich_machine_learning | │ 217 │ │ if not output_names: │ immich_machine_learning | │ 218 │ │ │ output_names = [output.name │ immich_machine_learning | │ 219 │ │ try: │ immich_machine_learning | │ ❱ 220 │ │ │ return self._sess.run(output │ immich_machine_learning | │ 221 │ │ except C.EPFail as err: │ immich_machine_learning | │ 222 │ │ │ if self._enable_fallback: │ immich_machine_learning | │ 223 │ │ │ │ print(f"EP Error: {err!s │ immich_machine_learning | ╰─────────────────────────────────────────────────╯ immich_machine_learning | RuntimeException: [ONNXRuntimeError] : 6 : immich_machine_learning | RUNTIME_EXCEPTION : Encountered unknown exception immich_machine_learning | in Run() immich_microservices | [Nest] 7 - 04/29/2024, 12:59:29 PM ERROR [JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request for facial recognition failed with status 500: Internal Server Error immich_microservices | [Nest] 7 - 04/29/2024, 12:59:29 PM ERROR [JobService] Error: Machine learning request for facial recognition failed with status 500: Internal Server Error immich_microservices | at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:23:19) immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_microservices | at async PersonService.handleDetectFaces (/usr/src/app/dist/services/person.service.js:268:23) immich_microservices | at async /usr/src/app/dist/services/job.service.js:149:36 immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) immich_microservices | [Nest] 7 - 04/29/2024, 12:59:29 PM ERROR [JobService] Object: immich_microservices | { immich_microservices | "id": "541c6706-c6bd-43e0-bf74-d8bbc4d1b664" immich_microservices | } immich_microservices |
me too
Same problem in new version 1.103.1
`[05/02/24 07:05:03] INFO Setting 'antelopev2' execution providers to ['OpenVINOExecutionProvider', 'CPUExecutionProvider'], in descending order of preference [05/02/24 07:05:03] INFO Loading facial recognition model 'antelopev2' to memory [05/02/24 07:05:11] ERROR Exception in ASGI application
╭─────── Traceback (most recent call last) ───────╮
│ /usr/src/app/main.py:118 in predict │
│ │
│ 115 │ │
│ 116 │ model = await load(await model_cache. │
│ ttl=settings.model_ttl, **kwargs)) │
│ 117 │ model.configure(**kwargs) │
│ ❱ 118 │ outputs = await run(model.predict, in │
│ 119 │ return ORJSONResponse(outputs) │
│ 120 │
│ 121 │
│ │
│ /usr/src/app/main.py:125 in run │
│ │
│ 122 async def run(func: Callable[..., Any], i │
│ 123 │ if thread_pool is None: │
│ 124 │ │ return func(inputs) │
│ ❱ 125 │ return await asyncio.get_running_loop │
│ 126 │
│ 127 │
│ 128 async def load(model: InferenceModel) -> │
│ │
│ /usr/lib/python3.10/concurrent/futures/thread.p │
│ y:58 in run │
│ │
│ /usr/src/app/models/base.py:59 in predict │
│ │
│ 56 │ │ self.load() │
│ 57 │ │ if model_kwargs: │
│ 58 │ │ │ self.configure(**model_kwargs │
│ ❱ 59 │ │ return self._predict(inputs) │
│ 60 │ │
│ 61 │ @abstractmethod │
│ 62 │ def _predict(self, inputs: Any) -> An │
│ │
│ /usr/src/app/models/facial_recognition.py:49 in │
│ _predict │
│ │
│ 46 │ │ else: │
│ 47 │ │ │ decoded_image = image │
│ 48 │ │ assert is_ndarray(decoded_image, n │
│ ❱ 49 │ │ bboxes, kpss = self.det_model.dete │
│ 50 │ │ if bboxes.size == 0: │
│ 51 │ │ │ return [] │
│ 52 │ │ assert is_ndarray(kpss, np.float32 │
│ │
│ /opt/venv/lib/python3.10/site-packages/insightf │
│ ace/model_zoo/retinaface.py:224 in detect │
│ │
│ 221 │ │ det_img = np.zeros( (input_size[1 │
│ 222 │ │ det_img[:new_height, :new_width, │
│ 223 │ │ │
│ ❱ 224 │ │ scores_list, bboxes_list, kpss_li │
│ 225 │ │ │
│ 226 │ │ scores = np.vstack(scores_list) │
│ 227 │ │ scores_ravel = scores.ravel() │
│ │
│ /opt/venv/lib/python3.10/site-packages/insightf │
│ ace/model_zoo/retinaface.py:152 in forward │
│ │
│ 149 │ │ kpss_list = [] │
│ 150 │ │ input_size = tuple(img.shape[0:2] │
│ 151 │ │ blob = cv2.dnn.blobFromImage(img, │
│ (self.input_mean, self.input_mean, self.i │
│ ❱ 152 │ │ net_outs = self.session.run(self. │
│ 153 │ │ │
│ 154 │ │ input_height = blob.shape[2] │
│ 155 │ │ input_width = blob.shape[3] │
│ │
│ /opt/venv/lib/python3.10/site-packages/onnxrunt │
│ ime/capi/onnxruntime_inference_collection.py:22 │
│ 0 in run │
│ │
│ 217 │ │ if not output_names: │
│ 218 │ │ │ output_names = [output.name │
│ 219 │ │ try: │
│ ❱ 220 │ │ │ return self._sess.run(output │
│ 221 │ │ except C.EPFail as err: │
│ 222 │ │ │ if self._enable_fallback: │
│ 223 │ │ │ │ print(f"EP Error: {err!s │
╰─────────────────────────────────────────────────╯
RuntimeException: [ONNXRuntimeError] : 6 :
RUNTIME_EXCEPTION : Encountered unknown exception
in Run()`
@plmsuper8
Thanks for the hint and "workaround". But now it obviously uses the CPU instead of the GPU ;) - so the problem still exists.
still not working in 1.104.0 will there be a solution for openvino use ?
I was going to try downgrading onnxruntime to 2024.1 (from the current 2024.3) in the immich-machine-learning Dockerfile. The last version to have working openvino was .98 which used 2024.1. I was going to do a build and test it, but I haven't had time yet.
Edit: nope, not that simple if you try to edit the Dockerfile and change just the onnxruntime version unfortunately.
logs
immich_microservices | [Nest] 6 - 05/14/2024, 6:24:58 PM LOG [ImmichMicroservices] [MediaService] Successfully generated WEBP image thumbnail for asset b5bd0dc0-d6c7-4133-8a6c-59fd9dfe7e4c
immich_machine_learning | [05/14/24 18:24:58] INFO Setting 'ViT-B-32__openai' execution providers to
immich_machine_learning | ['OpenVINOExecutionProvider',
immich_machine_learning | 'CPUExecutionProvider'], in descending order of
immich_machine_learning | preference
immich_machine_learning | [05/14/24 18:24:58] INFO Setting 'buffalo_l' execution providers to
immich_machine_learning | ['OpenVINOExecutionProvider',
immich_machine_learning | 'CPUExecutionProvider'], in descending order of
immich_machine_learning | preference
immich_machine_learning | [05/14/24 18:24:58] INFO Loading clip model 'ViT-B-32__openai' to memory
immich_machine_learning | 2024-05-14 18:24:59.955630642 [E:onnxruntime:, inference_session.cc:1985 Initialize] Encountered unknown exception in Initialize()
immich_machine_learning | [05/14/24 18:24:59] ERROR Exception in ASGI application
immich_machine_learning |
immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮
immich_machine_learning | │ /usr/src/app/main.py:116 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 113 │ except orjson.JSONDecodeError: │
immich_machine_learning | │ 114 │ │ raise HTTPException(400, f"Invali │
immich_machine_learning | │ 115 │ │
immich_machine_learning | │ ❱ 116 │ model = await load(await model_cache. │
immich_machine_learning | │ ttl=settings.model_ttl, **kwargs)) │
immich_machine_learning | │ 117 │ model.configure(**kwargs) │
immich_machine_learning | │ 118 │ outputs = await run(model.predict, in │
immich_machine_learning | │ 119 │ return ORJSONResponse(outputs) │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:137 in load │
immich_machine_learning | │ │
immich_machine_learning | │ 134 │ │ │ model.load() │
immich_machine_learning | │ 135 │ │
immich_machine_learning | │ 136 │ try: │
immich_machine_learning | │ ❱ 137 │ │ await run(_load, model) │
immich_machine_learning | │ 138 │ │ return model │
immich_machine_learning | │ 139 │ except (OSError, InvalidProtobuf, Bad │
immich_machine_learning | │ 140 │ │ log.warning( │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:125 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 122 async def run(func: Callable[..., Any], i │
immich_machine_learning | │ 123 │ if thread_pool is None: │
immich_machine_learning | │ 124 │ │ return func(inputs) │
immich_machine_learning | │ ❱ 125 │ return await asyncio.get_running_loop │
immich_machine_learning | │ 126 │
immich_machine_learning | │ 127 │
immich_machine_learning | │ 128 async def load(model: InferenceModel) -> │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/lib/python3.10/concurrent/futures/thread.p │
immich_machine_learning | │ y:58 in run │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:134 in _load │
immich_machine_learning | │ │
immich_machine_learning | │ 131 │ │
immich_machine_learning | │ 132 │ def _load(model: InferenceModel) -> N │
immich_machine_learning | │ 133 │ │ with lock: │
immich_machine_learning | │ ❱ 134 │ │ │ model.load() │
immich_machine_learning | │ 135 │ │
immich_machine_learning | │ 136 │ try: │
immich_machine_learning | │ 137 │ │ await run(_load, model) │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/base.py:52 in load │
immich_machine_learning | │ │
immich_machine_learning | │ 49 │ │ │ return │
immich_machine_learning | │ 50 │ │ self.download() │
immich_machine_learning | │ 51 │ │ log.info(f"Loading {self.model_ty │
immich_machine_learning | │ to memory") │
immich_machine_learning | │ ❱ 52 │ │ self._load() │
immich_machine_learning | │ 53 │ │ self.loaded = True │
immich_machine_learning | │ 54 │ │
immich_machine_learning | │ 55 │ def predict(self, inputs: Any, **mode │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/clip.py:146 in _load │
immich_machine_learning | │ │
immich_machine_learning | │ 143 │ │ super().__init__(clean_name(model │
immich_machine_learning | │ 144 │ │
immich_machine_learning | │ 145 │ def _load(self) -> None: │
immich_machine_learning | │ ❱ 146 │ │ super()._load() │
immich_machine_learning | │ 147 │ │ self._load_tokenizer() │
immich_machine_learning | │ 148 │ │ │
immich_machine_learning | │ 149 │ │ size: list[int] | int = self.prep │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/clip.py:41 in _load │
immich_machine_learning | │ │
immich_machine_learning | │ 38 │ │ │
immich_machine_learning | │ 39 │ │ if self.mode == "vision" or self. │
immich_machine_learning | │ 40 │ │ │ log.debug(f"Loading clip visi │
immich_machine_learning | │ ❱ 41 │ │ │ self.vision_model = self._mak │
immich_machine_learning | │ 42 │ │ │ log.debug(f"Loaded clip visio │
immich_machine_learning | │ 43 │ │
immich_machine_learning | │ 44 │ def _predict(self, image_or_text: Ima │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/base.py:117 in │
immich_machine_learning | │ _make_session │
immich_machine_learning | │ │
immich_machine_learning | │ 114 │ │ │ case ".armnn": │
immich_machine_learning | │ 115 │ │ │ │ session = AnnSession(mode │
immich_machine_learning | │ 116 │ │ │ case ".onnx": │
immich_machine_learning | │ ❱ 117 │ │ │ │ session = ort.InferenceSe │
immich_machine_learning | │ 118 │ │ │ │ │ model_path.as_posix() │
immich_machine_learning | │ 119 │ │ │ │ │ sess_options=self.ses │
immich_machine_learning | │ 120 │ │ │ │ │ providers=self.provid │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │
immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:41 │
immich_machine_learning | │ 9 in __init__ │
immich_machine_learning | │ │
immich_machine_learning | │ 416 │ │ disabled_optimizers = kwargs["di │
immich_machine_learning | │ kwargs else None │
immich_machine_learning | │ 417 │ │ │
immich_machine_learning | │ 418 │ │ try: │
immich_machine_learning | │ ❱ 419 │ │ │ self._create_inference_sessi │
immich_machine_learning | │ disabled_optimizers) │
immich_machine_learning | │ 420 │ │ except (ValueError, RuntimeError │
immich_machine_learning | │ 421 │ │ │ if self._enable_fallback: │
immich_machine_learning | │ 422 │ │ │ │ try: │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │
immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:48 │
immich_machine_learning | │ 3 in _create_inference_session │
immich_machine_learning | │ │
immich_machine_learning | │ 480 │ │ │ disabled_optimizers = set(di │
immich_machine_learning | │ 481 │ │ │
immich_machine_learning | │ 482 │ │ # initialize the C++ InferenceSe │
immich_machine_learning | │ ❱ 483 │ │ sess.initialize_session(provider │
immich_machine_learning | │ 484 │ │ │
immich_machine_learning | │ 485 │ │ self._sess = sess │
immich_machine_learning | │ 486 │ │ self._sess_options = self._sess. │
immich_machine_learning | ╰─────────────────────────────────────────────────╯
immich_machine_learning | RuntimeException: [ONNXRuntimeError] : 6 :
immich_machine_learning | RUNTIME_EXCEPTION : Encountered unknown exception
immich_machine_learning | in Initialize()
immich_machine_learning | [05/14/24 18:24:59] INFO Loading facial recognition model 'buffalo_l' to
immich_machine_learning | memory
immich_microservices | [Nest] 6 - 05/14/2024, 6:25:00 PM ERROR [ImmichMicroservices] [JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request for clip failed with status 500: Internal Server Error
immich_microservices | [Nest] 6 - 05/14/2024, 6:25:00 PM ERROR [ImmichMicroservices] [JobService] Error: Machine learning request for clip failed with status 500: Internal Server Error
immich_microservices | at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:23:19)
immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices | at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:85:31)
immich_microservices | at async /usr/src/app/dist/services/job.service.js:149:36
immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_microservices | [Nest] 6 - 05/14/2024, 6:25:00 PM ERROR [ImmichMicroservices] [JobService] Object:
immich_microservices | {
immich_microservices | "id": "b5bd0dc0-d6c7-4133-8a6c-59fd9dfe7e4c",
immich_microservices | "source": "upload"
immich_microservices | }
immich_microservices |
immich_machine_learning | 2024-05-14 18:25:00.970047176 [E:onnxruntime:, inference_session.cc:1985 Initialize] Encountered unknown exception in Initialize()
immich_machine_learning | [05/14/24 18:25:00] ERROR Exception in ASGI application
immich_machine_learning |
immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮
immich_machine_learning | │ /usr/src/app/main.py:116 in predict │
immich_machine_learning | │ │
immich_machine_learning | │ 113 │ except orjson.JSONDecodeError: │
immich_machine_learning | │ 114 │ │ raise HTTPException(400, f"Invali │
immich_machine_learning | │ 115 │ │
immich_machine_learning | │ ❱ 116 │ model = await load(await model_cache. │
immich_machine_learning | │ ttl=settings.model_ttl, **kwargs)) │
immich_machine_learning | │ 117 │ model.configure(**kwargs) │
immich_machine_learning | │ 118 │ outputs = await run(model.predict, in │
immich_machine_learning | │ 119 │ return ORJSONResponse(outputs) │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:137 in load │
immich_machine_learning | │ │
immich_machine_learning | │ 134 │ │ │ model.load() │
immich_machine_learning | │ 135 │ │
immich_machine_learning | │ 136 │ try: │
immich_machine_learning | │ ❱ 137 │ │ await run(_load, model) │
immich_machine_learning | │ 138 │ │ return model │
immich_machine_learning | │ 139 │ except (OSError, InvalidProtobuf, Bad │
immich_machine_learning | │ 140 │ │ log.warning( │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:125 in run │
immich_machine_learning | │ │
immich_machine_learning | │ 122 async def run(func: Callable[..., Any], i │
immich_machine_learning | │ 123 │ if thread_pool is None: │
immich_machine_learning | │ 124 │ │ return func(inputs) │
immich_machine_learning | │ ❱ 125 │ return await asyncio.get_running_loop │
immich_machine_learning | │ 126 │
immich_machine_learning | │ 127 │
immich_machine_learning | │ 128 async def load(model: InferenceModel) -> │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/lib/python3.10/concurrent/futures/thread.p │
immich_machine_learning | │ y:58 in run │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/main.py:134 in _load │
immich_machine_learning | │ │
immich_machine_learning | │ 131 │ │
immich_machine_learning | │ 132 │ def _load(model: InferenceModel) -> N │
immich_machine_learning | │ 133 │ │ with lock: │
immich_machine_learning | │ ❱ 134 │ │ │ model.load() │
immich_machine_learning | │ 135 │ │
immich_machine_learning | │ 136 │ try: │
immich_machine_learning | │ 137 │ │ await run(_load, model) │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/base.py:52 in load │
immich_machine_learning | │ │
immich_machine_learning | │ 49 │ │ │ return │
immich_machine_learning | │ 50 │ │ self.download() │
immich_machine_learning | │ 51 │ │ log.info(f"Loading {self.model_ty │
immich_machine_learning | │ to memory") │
immich_machine_learning | │ ❱ 52 │ │ self._load() │
immich_machine_learning | │ 53 │ │ self.loaded = True │
immich_machine_learning | │ 54 │ │
immich_machine_learning | │ 55 │ def predict(self, inputs: Any, **mode │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/facial_recognition.py:30 in │
immich_machine_learning | │ _load │
immich_machine_learning | │ │
immich_machine_learning | │ 27 │ │ super().__init__(clean_name(model_ │
immich_machine_learning | │ 28 │ │
immich_machine_learning | │ 29 │ def _load(self) -> None: │
immich_machine_learning | │ ❱ 30 │ │ self.det_model = RetinaFace(sessio │
immich_machine_learning | │ 31 │ │ self.rec_model = ArcFaceONNX( │
immich_machine_learning | │ 32 │ │ │ self.rec_file.with_suffix(".on │
immich_machine_learning | │ 33 │ │ │ session=self._make_session(sel │
immich_machine_learning | │ │
immich_machine_learning | │ /usr/src/app/models/base.py:117 in │
immich_machine_learning | │ _make_session │
immich_machine_learning | │ │
immich_machine_learning | │ 114 │ │ │ case ".armnn": │
immich_machine_learning | │ 115 │ │ │ │ session = AnnSession(mode │
immich_machine_learning | │ 116 │ │ │ case ".onnx": │
immich_machine_learning | │ ❱ 117 │ │ │ │ session = ort.InferenceSe │
immich_machine_learning | │ 118 │ │ │ │ │ model_path.as_posix() │
immich_machine_learning | │ 119 │ │ │ │ │ sess_options=self.ses │
immich_machine_learning | │ 120 │ │ │ │ │ providers=self.provid │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │
immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:41 │
immich_machine_learning | │ 9 in __init__ │
immich_machine_learning | │ │
immich_machine_learning | │ 416 │ │ disabled_optimizers = kwargs["di │
immich_machine_learning | │ kwargs else None │
immich_machine_learning | │ 417 │ │ │
immich_machine_learning | │ 418 │ │ try: │
immich_machine_learning | │ ❱ 419 │ │ │ self._create_inference_sessi │
immich_machine_learning | │ disabled_optimizers) │
immich_machine_learning | │ 420 │ │ except (ValueError, RuntimeError │
immich_machine_learning | │ 421 │ │ │ if self._enable_fallback: │
immich_machine_learning | │ 422 │ │ │ │ try: │
immich_machine_learning | │ │
immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │
immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:48 │
immich_machine_learning | │ 3 in _create_inference_session │
immich_machine_learning | │ │
immich_machine_learning | │ 480 │ │ │ disabled_optimizers = set(di │
immich_machine_learning | │ 481 │ │ │
immich_machine_learning | │ 482 │ │ # initialize the C++ InferenceSe │
immich_machine_learning | │ ❱ 483 │ │ sess.initialize_session(provider │
immich_machine_learning | │ 484 │ │ │
immich_machine_learning | │ 485 │ │ self._sess = sess │
immich_machine_learning | │ 486 │ │ self._sess_options = self._sess. │
immich_machine_learning | ╰─────────────────────────────────────────────────╯
immich_machine_learning | RuntimeException: [ONNXRuntimeError] : 6 :
immich_machine_learning | RUNTIME_EXCEPTION : Encountered unknown exception
immich_machine_learning | in Initialize()
immich_microservices | [Nest] 6 - 05/14/2024, 6:25:01 PM ERROR [ImmichMicroservices] [JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | [Nest] 6 - 05/14/2024, 6:25:01 PM ERROR [ImmichMicroservices] [JobService] Error: Machine learning request for facial recognition failed with status 500: Internal Server Error
immich_microservices | at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:23:19)
immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices | at async PersonService.handleDetectFaces (/usr/src/app/dist/services/person.service.js:269:23)
immich_microservices | at async /usr/src/app/dist/services/job.service.js:149:36
immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
immich_microservices | [Nest] 6 - 05/14/2024, 6:25:01 PM ERROR [ImmichMicroservices] [JobService] Object:
immich_microservices | {
immich_microservices | "id": "b5bd0dc0-d6c7-4133-8a6c-59fd9dfe7e4c",
immich_microservices | "source": "upload"
immich_microservices | }
immich_microservices |
I got it working, give me a bit to upload the image and do a writeup :) Thanks @mertalev for the help!
Want to use my image?
In your docker-compose.yml, replace
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino with
image: ghcr.io/snuupy/immich-machine-learning:v1.105.0-openvino
https://github.com/Snuupy/immich/pkgs/container/immich-machine-learning
Want to build your own image? Here's how I did it:
install poetry, change onnxruntime-openvino to target 1.15 or 1.16 in the
pyproject.tomlfile, then runpoetry lock --no-update
[tool.poetry.group.openvino.dependencies]
# onnxruntime-openvino = "^1.17.1"
onnxruntime-openvino = ">=1.15.0,<1.16.0"
In the machine-learning/Dockerfile, change the line:
FROM openvino/ubuntu22_runtime:2023.3.0@sha256:176646df619032ea6c10faf842867119c393e7497b7f88b5e307e932a0fd5aa8 as builder-openvino (v1.105.0)
to FROM openvino/ubuntu22_runtime:2023.1.0@sha256:002842a9005ba01543b7169ff6f14ecbec82287f09c4d1dd37717f0a8e8754a7 as builder-openvino (v1.98.2)
then do a
docker build --build-arg="DEVICE=openvino" -t NAMESPACE/immich-machine-learning:v1.105.0-openvino .
tested this morning seems to work, its scrapping !
Nice ! Thank you @Snuupy
@alextran1502 can you merge it into the next version, please? ;)
Nice ! Thank you @Snuupy
@alextran1502 can you merge it into the next version, please? ;)
No because it will break openvino for other users (XE/ARC) afaik
I will build 105.1 soon™️
hello, using snuppy trick did the job for facial recognition however it still stands errors on smart search :
immich_machine_learning | 2024-05-15 07:52:52.642944782 [E:onnxruntime:, sequential_executor.cc:514 ExecuteKernel] Non-zero status code returned while running OpenVINO-EP-subgraph_2 node. Name:'OpenVINOExecutionProvider_OpenVINO-EP-subgraph_2_0' Status Message: /home/onnxruntimedev/onnxruntime/onnxruntime/core/providers/openvino/ov_interface.cc:53 onnxruntime::openvino_ep::OVExeNetwork onnxruntime::openvino_ep::OVCore::LoadNetwork(const string&, std::string&, ov::AnyMap&, std::string) [OpenVINO-EP] Exception while Loading Network for graph: OpenVINOExecutionProvider_OpenVINO-EP-subgraph_2_0Check 'false' failed at src/inference/src/core.cpp:149: immich_machine_learning | invalid external data: ExternalDataInfo(data_full_path: Constant_2611_attr__value, offset: 0, data_length: 0) immich_machine_learning | immich_machine_learning | immich_machine_learning | [05/15/24 07:52:52] ERROR Exception in ASGI application immich_machine_learning | immich_machine_learning | ╭─────── Traceback (most recent call last) ───────╮ immich_machine_learning | │ /usr/src/app/main.py:118 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 115 │ │ immich_machine_learning | │ 116 │ model = await load(await model_cache. │ immich_machine_learning | │ ttl=settings.model_ttl, **kwargs)) │ immich_machine_learning | │ 117 │ model.configure(**kwargs) │ immich_machine_learning | │ ❱ 118 │ outputs = await run(model.predict, in │ immich_machine_learning | │ 119 │ return ORJSONResponse(outputs) │ immich_machine_learning | │ 120 │ immich_machine_learning | │ 121 │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/main.py:125 in run │ immich_machine_learning | │ │ immich_machine_learning | │ 122 async def run(func: Callable[..., Any], i │ immich_machine_learning | │ 123 │ if thread_pool is None: │ immich_machine_learning | │ 124 │ │ return func(inputs) │ immich_machine_learning | │ ❱ 125 │ return await asyncio.get_running_loop │ immich_machine_learning | │ 126 │ immich_machine_learning | │ 127 │ immich_machine_learning | │ 128 async def load(model: InferenceModel) -> │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/lib/python3.10/concurrent/futures/thread.p │ immich_machine_learning | │ y:58 in run │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/models/base.py:59 in predict │ immich_machine_learning | │ │ immich_machine_learning | │ 56 │ │ self.load() │ immich_machine_learning | │ 57 │ │ if model_kwargs: │ immich_machine_learning | │ 58 │ │ │ self.configure(**model_kwargs │ immich_machine_learning | │ ❱ 59 │ │ return self._predict(inputs) │ immich_machine_learning | │ 60 │ │ immich_machine_learning | │ 61 │ @abstractmethod │ immich_machine_learning | │ 62 │ def _predict(self, inputs: Any) -> An │ immich_machine_learning | │ │ immich_machine_learning | │ /usr/src/app/models/clip.py:52 in _predict │ immich_machine_learning | │ │ immich_machine_learning | │ 49 │ │ │ case Image.Image(): │ immich_machine_learning | │ 50 │ │ │ │ if self.mode == "text": │ immich_machine_learning | │ 51 │ │ │ │ │ raise TypeError("Cann │ immich_machine_learning | │ ❱ 52 │ │ │ │ outputs: NDArray[np.float │ immich_machine_learning | │ self.transform(image_or_text))[0][0] │ immich_machine_learning | │ 53 │ │ │ case str(): │ immich_machine_learning | │ 54 │ │ │ │ if self.mode == "vision": │ immich_machine_learning | │ 55 │ │ │ │ │ raise TypeError("Cann │ immich_machine_learning | │ │ immich_machine_learning | │ /opt/venv/lib/python3.10/site-packages/onnxrunt │ immich_machine_learning | │ ime/capi/onnxruntime_inference_collection.py:21 │ immich_machine_learning | │ 9 in run │ immich_machine_learning | │ │ immich_machine_learning | │ 216 │ │ if not output_names: │ immich_machine_learning | │ 217 │ │ │ output_names = [output.name f │ immich_machine_learning | │ 218 │ │ try: │ immich_machine_learning | │ ❱ 219 │ │ │ return self._sess.run(output_ │ immich_machine_learning | │ 220 │ │ except C.EPFail as err: │ immich_machine_learning | │ 221 │ │ │ if self._enable_fallback: │ immich_machine_learning | │ 222 │ │ │ │ print(f"EP Error: {str(er │ immich_machine_learning | ╰─────────────────────────────────────────────────╯ immich_machine_learning | Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero immich_machine_learning | status code returned while running immich_machine_learning | OpenVINO-EP-subgraph_2 node. immich_machine_learning | Name:'OpenVINOExecutionProvider_OpenVINO-EP-subgrap immich_machine_learning | h_2_0' Status Message: immich_machine_learning | /home/onnxruntimedev/onnxruntime/onnxruntime/core/p immich_machine_learning | roviders/openvino/ov_interface.cc:53 immich_machine_learning | onnxruntime::openvino_ep::OVExeNetwork immich_machine_learning | onnxruntime::openvino_ep::OVCore::LoadNetwork(const immich_machine_learning | string&, std::string&, ov::AnyMap&, std::string) immich_machine_learning | [OpenVINO-EP] Exception while Loading Network for immich_machine_learning | graph: immich_machine_learning | OpenVINOExecutionProvider_OpenVINO-EP-subgraph_2_0C immich_machine_learning | heck 'false' failed at immich_machine_learning | src/inference/src/core.cpp:149: immich_machine_learning | invalid external data: immich_machine_learning | ExternalDataInfo(data_full_path: immich_machine_learning | Constant_2611_attr__value, offset: 0, data_length: immich_machine_learning | 0) immich_machine_learning | immich_machine_learning | immich_microservices | [Nest] 7 - 05/15/2024, 7:52:52 AM ERROR [ImmichMicroservices] [JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request for clip failed with status 500: Internal Server Error immich_microservices | [Nest] 7 - 05/15/2024, 7:52:52 AM ERROR [ImmichMicroservices] [JobService] Error: Machine learning request for clip failed with status 500: Internal Server Error immich_microservices | at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:23:19) immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_microservices | at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:86:31) immich_microservices | at async /usr/src/app/dist/services/job.service.js:145:36 immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) immich_microservices | [Nest] 7 - 05/15/2024, 7:52:52 AM ERROR [ImmichMicroservices] [JobService] Object: immich_microservices | { immich_microservices | "id": "3f326640-2542-47db-b658-66543898ba07" immich_microservices | }
hello, using snuppy trick did the job for facial recognition however it still stands errors on smart search :
@jsapede
can you try again? made a change on Dockerfile, looks like I missed a line
https://github.com/Snuupy/immich/pkgs/container/immich-machine-learning/216456671?tag=v1.105.1-openvino is up
not sur if i understand how to test ^^
@jsapede change your docker-compose.yml under immich-machine-learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino to
image: ghcr.io/snuupy/immich-machine-learning:v1.105.1-openvino