Giter Site home page Giter Site logo

piwigo-tag-recognition's Introduction

Piwigo logo

Manage your photo library. Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals.

screenshot

The piwigo.org website introduces you to Piwigo. You'll find a demo, forums, wiki and news.

Requirements

  • A webserver (Apache or nginx recommended)
  • PHP 7.4+. Piwigo can run with PHP 7.0+ but these end-of-life versions are no longer maintained and may expose your site to security vulnerabilities.
  • MySQL 5 or greater or MariaDB equivalent
  • ImageMagick (recommended) or PHP GD

Quick start install

NetInstall

More information

Manual

More information

If you do not have your own server, consider the piwigo.com hosting solution.

Contributing

Piwigo is widely driven by its community; if you want to improve the code, fork this repo and submit your changes to the master branch. See our Contribution guide.

License

Piwigo is released under the GPL v2 license. See our Copying details.

piwigo-tag-recognition's People

Contributors

piwigo-translationteam avatar zacharieg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

piwigo-tag-recognition's Issues

there is a problem with the API

hello

I installed the plugin under piwigo 13.8.0 with the piwigo-tag-recognition plugin with registrations on IMAGGA . I'm on Debian 12 with PHP7.4 under nginx.

when I make a Tags request I get the message: there is a problem with the API.

Thank you for your help .

vlsoft

Erreur1 Erreur2

"hacking attempt!"

Bonjour,
J'utilise la dernière version de piwigo 12.1 et j'ai installé votre plugin piwigo-tag-recognition et lorsque je vais sur configuration une page souvre avec le mesage " Hacking attempt! "
Merci de m'aider


Hello,
I use the latest version of Piwigo 12.1 and I installed your Piwigo-Tag-Recognition plugin and when I go on configuration a page opens with the "hacking attempt!"
Thank you for helping me

API extension for CompreFace

Great plugin!! :)
I extended it to also work with CompreFace which is a facial recognition algorithm that can run locally. Below the code. It will need to be refined a bit here and there (I am far from a professional) and I am more than happy to help doing so. I can also write a tutorial or something if needed.
Best, J

`<?php

class CompreFace extends API {

function getInfo() : array
{
    return [
        "icon" => 'https://user-images.githubusercontent.com/3736126/147130206-17234c47-8d40-490f-8d93-57014fa6d87e.png',
        "site" => 'https://exadel.com/solutions/compreface/',
        "info" => `
        CompreFace is an open-source face recognition service that can be run on premises
        `,
    ];
}

function getConfParams() : array
{
    return [
        'ENDPOINT' => 'API Endpoint', 
        'KEY'=> 'API Key'
    ];
}

function generateTags($conf, $params) : array
{
    global $logger;
    $file_path = $this->getFileName($params['imageId']);

         
    $url ='http://'.$conf["ENDPOINT"].'/api/v1/recognition/recognize?limit=0&det_prob_threshold=0.6&prediction_count=1&face_plugins=landmarks,%20gender,%20age,%20calculator&status=true';

    $curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => $url,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS => array('file'=> new CURLFILE($file_path)),
        CURLOPT_HTTPHEADER => array(
            'Content-Type: multipart/form-data',
            'x-api-key: '.$conf["KEY"]
        ),
    ));
    
    if (curl_errno($curl)) 
    {
        return [curl_error($curl)];
    }
    
    $response = curl_exec($curl);

    curl_close($curl);

    $json_response = json_decode($response);
    
    $tags = [];

    $json_result = $json_response->result;

    foreach ($json_result as $result) {

        if($result->subjects[0]->similarity > 0.65)
            array_push($tags,$result->subjects[0]->subject);
        $logger->info("Found " . $result->subjects[0]->subject);
    }
  
    return $tags;
}

}`

Open source local provider

Hi @Zacharieg,

Thank you for writing this extension! I'm going to run Piwigo and face tag is a must have.
I have Azure and could use that but I'm always for the most secure option and that's running is peace of software myself.

I'm looking to use deepface or compreface. Both supply a simple REST api. I'm going to run one of these two in a docker container like piwigo itself.

What do you think? Could we work together to implement one of these products and there api for a self-hosted solution?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.