Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Support for external taggers

オープン
#1,062 コメント 2 件 リアクション 7 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php

調査の方向性

まず、recognize が現在どのように組み込み tagger を呼び出しているか、また画像データとタグが PHP アプリ内をどのように流れているかを追跡します。そのフローを、endpoint、model、threshold の設定を含む、提案された POST リクエストと JSON レスポンスのフローと比較します。組み込み tagger を削除せずに外部サービスを選択でき、そのサービスが返したタグを使用できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement
Describe the feature you'd like to request

Given how limiting the built-in AI models can be it would be nice if it was possible to add external taggers that could be used instead of the built-in ones.

Describe the solution you'd like

A possible solution is using web requests to communicate with external web servers where the image can be sent over and the server can respond with tags that match the image. This will allow to use different models that aren't implemented in the recognize app itself and also stronger models that may not work in docker setups or the host hardware.

For example the https://github.com/AUTOMATIC1111/stable-diffusion-webui project hosts a web server that can generate images locally. Using the extension https://github.com/picobyte/stable-diffusion-webui-wd14-tagger and --api option, a user can send a POST request with any image encoded in base64 and get a json response of all tags in it including weights on how much the image matches set tags.

One the external setup is complete the process is simple:

  1. Convert the image to base64 data
  2. Craft it into a javascript object. (eg. {"image": "data:image/<type>;base64,<image data>", "model": "<model name>", "threshold": 0.35})
  3. Create a POST request to a target link (eg. "http://127.0.0.1:7860/tagger/v1/interrogate")
  4. Get a response like:
{
    "caption": {
        "tag": {
            "tag1": 0.6852931380271912,
            "tag2": 0.6729011535644531,
            "tag3": 0.46537110209465027,
            "tag4": 0.5044106245040894
        }
    }
}

I don't know any other image tagging software that can be interacted using web requests but I think it's a nice start. Even if its only for object tagging.
I wish I could provide a pull request with this option but unfortunately I'm not skilled enough to write clean PHP code with the nextcloud API.

Describe alternatives you've considered

Implementing new models into the app itself is time consuming and slow. And making them work with the limited dependencies of the nextcloud environment and docker instances is even harder.

主要言語
PHP
スター
699
フォーク
68
平均マージ
18時間 34分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/recognize のほかの issue

nextcloud/recognize の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。