Support for external taggers
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- php
- 領域
- api, backend, machine-learning
調査の方向性
まず、recognize が現在どのように組み込み tagger を呼び出しているか、また画像データとタグが PHP アプリ内をどのように流れているかを追跡します。そのフローを、endpoint、model、threshold の設定を含む、提案された POST リクエストと JSON レスポンスのフローと比較します。組み込み tagger を削除せずに外部サービスを選択でき、そのサービスが返したタグを使用できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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:
- Convert the image to base64 data
- Craft it into a javascript object. (eg.
{"image": "data:image/<type>;base64,<image data>", "model": "<model name>", "threshold": 0.35}) - Create a POST request to a target link (eg. "
http://127.0.0.1:7860/tagger/v1/interrogate") - 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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/recognize のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
insertDeletion looks up recognize_fs_deletions by node_id alone, which no index covers — bulk removals scan the whole table per file対応中かも @marcelklehr が 8 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
Recognize maintenance routine unnecessarily redownloads Tensorflow CPU and GPU models every time再び着手できるかも @marcelklehr が 189 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
nextcloud/recognize の issue をすべて見る
似ている issue
-
L: github:actions L: php:composer
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
dependabot/dependabot-core#16493 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
api-platform/core#8649 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
open-telemetry/opentelemetry-php#2071 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug No Code Attached Yet
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
joomla/joomla-cms#48587 ·
メンテナーはふだん 1 日以内に返信