skrashevich / double-take

Unified UI and API for processing and training images for facial recognition.
https://hub.docker.com/r/skrashevich/double-take
MIT License
521 stars 25 forks source link

[BUG] dt not recognizing me in trained image #178

Closed nabheet closed 9 months ago

nabheet commented 11 months ago

Describe the bug Again, I am not sure this is a bug. More about how to use DT. I have trained it to recognize me in 3 different images. Two of the images are a close up of my face and third is a bigger body shot. It is only recognizing me in the body shot image. I would like to understand how to configure the system so it can recognized me in different situations. Or if this is even possible.

If I remove the non-closeup image from the training set, it recognizes me.

Version of Double Take 1.13.11.8

Expected behavior I would think it would recognize me in all the trained images.

Screenshots image image

Hardware

Additional context N/A

skrashevich commented 11 months ago

What recognition system do you use? Show the configuration files

nabheet commented 11 months ago

Both Codeproject.AI and Deepstack, all in one docker-compose.yaml.

---
auth: true

mqtt:
  host: m
  username: !secret mqtt_username
  password: !secret mqtt_password
  topics:
    frigate: frigate/+/person/snapshot

frigate:
  url: http://f:5000
  update_sub_labels: true
  labels:
    - face
  image:
    height: 640
  attempts:
    mqtt: true

detectors:
  deepstack:
    url: http://ds:5000
  aiserver:
    url: http://cpai:5000

Docker-compose.yaml:

  ds:
    image: deepquestai/deepstack:gpu
    environment:
      - VISION-FACE=True
      - VISION-OBJECT=True
    ports:
      - 7000:5000
    volumes:
      - deepstack_localstorage:/datastore
    healthcheck:
      test: ["CMD", "wget", "-q", "http://127.0.0.1:5000/", "-O -"]
      interval: 30s
      timeout: 1s
      retries: 10
    deploy:
      restart_policy:
        condition: any
      placement:
          constraints:
            - node.labels.webproxy == true

  cpai:
    image: codeproject/ai-server:cuda12_2
    ports:
      - 32168:32168
    volumes:
      - codeproject_ai_data:/etc/codeproject/ai
      - codeproject_ai_modules:/app/modules
    healthcheck:
      test: ["CMD", "wget", "-q", "http://127.0.0.1:32168/", "-O -"]
      interval: 30s
      timeout: 1s
      retries: 10
    deploy:
      restart_policy:
        condition: any
      placement:
          constraints:
            - node.labels.webproxy == true

  dt:
    image: skrashevich/double-take
    user: "1000"
    environment:
      - VIRTUAL_HOST=custom.domain.com
      - VIRTUAL_PORT=3000
      - LETSENCRYPT_HOST=custom.domain.com
    volumes:
      - double_take_storage:/.storage/
    ports:
      - 3000:3000
    extra_hosts:
      - host.docker.internal:host-gateway
    healthcheck:
      test: ["CMD-SHELL", "timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000'"]
      interval: 30s
      timeout: 1s
      retries: 10
    deploy:
      restart_policy:
        condition: any
      placement:
        constraints:
          - node.labels.webproxy == true
skrashevich commented 11 months ago
frigate:
  labels:
    - face # <-- I don't recommend to use this label
    - person # <-- add it
nabheet commented 11 months ago

Ok. I was testing the difference in behaviour but I have changed it back to person.

However, I am not sure that would solve the original problem though, right?

skrashevich commented 10 months ago

Probably fixed in this commit: https://github.com/skrashevich/double-take/commit/d66b68e0870d364e019373ac6d0a6bcae0201fd3 available now in "beta" image, and will be included to coming rc2 release

nwithan8 commented 7 months ago

Had the same issue, can confirm it's working in v1.13.12.0rc3 (which is the current beta tag on DockerHub)