goodspb / pdlib

PHP extension for Dlib.
MIT License
70 stars 19 forks source link

Request to add pdlib to PECL. #56

Open apoorv569 opened 1 year ago

apoorv569 commented 1 year ago

I am using Nextcloud-AIO and want to install the Face Recognition app which requires this extension as a dependency. Please add this to PECL so me and anybody else can use this.

I got recommended to request this here, https://github.com/nextcloud/all-in-one/discussions/1551

Csantos88 commented 1 year ago

+1 Vote for add pdlib in PECL PHP Repos

goodspb commented 1 year ago

@matiasdelellis really grand that you could help with this. thanks.

I have written to PECL but never got feedback. I don't know why and don't know how to proceed. >.<

boboche commented 11 months ago

+1, its 2023, there's no open source DAM with SIMPLE install, automatic AI object tagging / classification that simply installs and work out of the box without having to fight with some docker-fu or configuration headaches. Nextcloud is a super nice package and has everything in place to go next level.

But what should be a simple add-on from the app store + some simple post-config (i.e. select which model to download/apply + add. cfg, so that it doesn't make a huge VM or initial download for people who don't need it in the first place) is a in-shell php/snap/scripting snafu. Great and "normal" for coders, unfortunately not for the intended target audience tho.

szaimen commented 11 months ago

Hi, I just wanted to mention that AiO has this now: https://github.com/nextcloud/all-in-one/tree/main/community-containers#how-to-add-containers. So the community could potentially add the facerecognition container as additional container there. Feel free to ping me if you should need help on this!

PrivatHomeServer commented 11 months ago

Hello Simon, I have watched your activities regarding the community containers on Friday. Looks very promising. I'm not the absolute IT expert - so I went the way of @sunnyd24 and finished part 1 with the memory allocation. Now encouraged by your post @szaimen I wanted to look at what we need to do to get community docker for "facerecognition". For the other json files, I looked once. "image ".../..." --> is missing in this case since we always run a build (docker build -t facerecognition https://github.com/matiasdelellis/facerecognition-external-model.git)

What do we need to do to make it a community docker here now? For me still the only issue with Nextcloud AOI, because the "regognize" solution is not usable for faces.

I would like to see a way here.

szaimen commented 11 months ago

"image ".../..." --> is missing in this case since we always run a build (docker build -t facerecognition https://github.com/matiasdelellis/facerecognition-external-model.git)

What do we need to do to make it a community docker here now?

Indeed someone would need to create an image out of it and publish it on docker hub.

For that you might have a look at https://github.com/szaimen/aio-fail2ban/blob/main/.github/workflows/docker-build.yml and submit such a workflow at https://github.com/matiasdelellis/facerecognition-external-model.git


Regarding the json, I just leave this here as an example:

{
    "aio_services_v1": [
        {
            "container_name": "nextcloud-aio-facerecognition",
            "display_name": "Computing container for facerecognition",
            "documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/facerecognition",
            "image": "matiasdelellis/aio-facerecognition",
            "image_tag": "v1",
            "internal_port": "5000",
            "restart": "unless-stopped",
            "environment": [
                "TZ=%TIMEZONE%",
                "API_KEY=some-super-secret-api-key"
            ],
            "aio_variables": [
                "nextcloud_memory_limit=4096M"
            ],
            "nextcloud_exec_commands": [
                "php /var/www/html/occ app:install facerecognition",
                "php /var/www/html/occ config:system:set facerecognition.external_model_url --value nextcloud-aio-facerecognition:5000",
                "php /var/www/html/occ config:system:set facerecognition.external_model_api_key --value some-super-secret-api-key",
                "php /var/www/html/occ face:setup -m 5",
                "php /var/www/html/occ face:setup -M 4G",
                "php /var/www/html/occ occ face:background_job &"
            ]
        }
    ]
}
PrivatHomeServer commented 11 months ago

@szaimen thank you very much for your comments. Superficially I have understood the topic. However, I am too little IT-person to be able to really implement it. Unfortunately.

From my point of view, this add-on is essential for the photo application to stand out against solutions like immich.

benji0522 commented 9 months ago

wanted

marcselis commented 9 months ago

+1

Sven286 commented 9 months ago

Because it all took more than a year to even have a glimph of face recognition feature. In the mean time a lot of development happened at Immich. I switched back to there. Good luck with nextcloud. /unsubscribe

elvismercado commented 9 months ago

+1

gabglus commented 8 months ago

+1

otola commented 8 months ago

+1

nbluemer commented 8 months ago

I also need pdlib in order to run face recognition on Nextcloud AIO.

rastographics commented 8 months ago

Because it all took more than a year to even have a glimph of face recognition feature. In the mean time a lot of development happened at Immich. I switched back to there. Good luck with nextcloud. /unsubscribe

After following this issue for a year, this is exactly the same reply I came here to make before unsubscribing from this issue.

Immich is amazing. You can point it at your nextcloud photos directory too, and just use it for read-only browsing of your files while still using nextcloud to manage the file organization and syncing.

szaimen commented 8 months ago

Actually there is some progress already in https://github.com/matiasdelellis/facerecognition-external-model/pull/7 but I am waiting for @matiasdelellis to review the PR.

szaimen commented 8 months ago

After https://github.com/matiasdelellis/facerecognition-external-model/pull/7 is merged, mainly only https://github.com/nextcloud/all-in-one/pull/3999 is missing now :)

szaimen commented 8 months ago

mainly only nextcloud/all-in-one#3999 is missing now :)

This is now released with v7.10.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel and https://github.com/nextcloud/all-in-one/tree/main/community-containers/facerecognition

luzfcb commented 8 months ago

@matiasdelellis @szaimen I started testing v7.10.0 Beta. Is there any way to improve performance of facerecognition-external-model? For me, it analyzes 1 image every 16 seconds. My server runs on Ryzen 5600G, 32 GB of RAM, and Nvidia GTX 1650, so I suppose it's more than enough to have a very good performance.

Well, this comment is completely offtopic of this issue. Is there somewhere we could continue discussions?

szaimen commented 8 months ago

Well, this comment is completely offtopic of this issue. Is there somewhere we could continue discussions?

I suppose here? https://github.com/matiasdelellis/facerecognition/discussions

matiasdelellis commented 8 months ago

Hi @luzfcb

My server runs on Ryzen 5600G, 32 GB of RAM, and Nvidia GTX 1650, so I suppose it's more than enough to have a very good performance.

Mainly it's great that you have an Nvidia GTX 1650 😬 , but the docker container is not compiled to use cuda. You should install CUDA on your host, and build the container to make use of it. 😉 It will be much faster. 😬 It shouldn't be complicated, but I can't help you because I never had a video card. 😞

On the other hand, you can reduce the size of temporary images on settings. By default this container is in 4Mpx, and with 2Mps you will get it will be 50% faster and you will get practically the same result.

I left 4mpx as the default because the larger the images, the more likely you are to find all your faces, but in practice, you don't get more than 10% new faces.

Finally no matter how long the process takes, it is designed to do the job progressively. We try not to take shortcuts but do better.

p.s: Not even Google gives you the results so quickly when you upload many images... 😅 Let's be pacient.. 😉

szaimen commented 8 months ago

Lets continue here: https://github.com/matiasdelellis/facerecognition/discussions/716