Download the PHP package ramsterhad/ddta without Composer

On this page you can find all versions of the php package ramsterhad/ddta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ddta

Deep Danbooru Tag Assist

Web-based assist application for an AI-based multi-label image classification system, based on KichangKim´s DeepDanbooru.

LIVE functional production server, login with danbooru username and API key.
PLEASE BEWARE: SELECTED & SUBMITTED TAGS ARE ADDED TO DANBOORU FOR REAL.
An API key can be created and removed on your profile page: https://danbooru.donmai.us/profile. See the danbooru API for further information: https://danbooru.donmai.us/wiki_pages/help:api.

Data availability

We precomputed the images present in [Gwern's danbooru2020 SFW dataset](https://www.gwern.net/Danbooru2020 "Gwen's danbooru 2020 SFW subset dataset") using the 4 RESNET models released by KichangKim for deepdanbooru using a threshold of 0.100. In total, 3.227.713 images were classified using the 4 models, giving 12.910.852 tag prediction strings. The data is available under releases

Installation

You can either install it by composer or by downloading the ZIP file.

Requirements

Optional

Composer

ZIP

Download the latest deepdanbooru tag assist ddta.zip package and unzip the files into the target directory of your webserver (e.g. apache: /var/www/html/).

Configuration

Deepdanbooru tag assist queries a TensorFlow model evaluator server (TFMES) accessible from https://deepdanbooru.donmai.us/. The parameters are ?url= and &min_score=, example: https://deepdanbooru.donmai.us/?url=https://cdn.donmai.us/360x360/6e/8e/6e8e3f6c38f1e9b2e2c531943547e39e.jpg&min_score=0.5 To adapt the configuration of DDTA, adapt the .env file or create .env.local so an update doesn't overwrite your configuration.

Parameter default value
danbooru_api_url https://danbooru.donmai.us/
danbooru_default_request tags=random:1+rating:g
danbooru_user empty
danbooru_pass empty
machine_learning_platform_repository_debug false
tags_min_score 0.500
picture_storage tmp
limit_for_suggested_tags 15
highlight_color_attributes red,green,blue,pink,black,silver,purple,
grey,white,brown,orange,blonde,aqua,
dark_blue,dark_green,light_blue,
light_brown,light_green,light_purple,pink,
platinum_blonde,purple,translucent,yellow
tag_suggestion_exclude_list empty
debug false

danbooru_api_url

The default API domain for the Danbooru platforms API. At this moment, only danbooru.donmai.us and its derivative domains are supported. Support for other *boorus using compatible APIs will follow in future releases. URL must end in a trailing slash. You can change the whole request URL also directly on the page in the input field on top of it. The input field overwrites the environment variable as long as the session cookie lives.

danbooru_default_request

The default request URL for the Danbooru platforms API request. During the process this string is going to be appended to the config variable danbooru_api_url: ${danbooru_api_url}.'posts.json?'.${danbooru_default_request}. For example:

You can change the whole request URL also directly on the page in the input field on top of it. The input field overwrites the environment variable as long as the session cookie lives.

danbooru_user & danbooru_pass

To be able to submit new tags to Danbooru, you need to be a registered member and provide your API credentials. To create a session you need to provide credentials in the form of your username and API key. Alternatively, credentials can be placed into the .env config file when locally hosting ddta. The API key is different from your password and can be created at your profile page at Danbooru. Please see the Authentication section at their API manual.

machine_learning_platform_repository_debug

If set to true, the actual MLP will not be called, but a defined array of example tags will be returned. This is for testing only and should not be used in production.

tags_min_score

Tags got a confidence score by the machine learning platform. From 1 to 0. The threshold 0.500 is well tested.

picture_storage

The image is downloaded from danbooru and temporarily locally stored in case it is to be forwarded to the machine learning platform (MLP). Needs write rights.

limit_for_suggested_tags

Limits the checkboxes for suggested new tags. By default, a row contains 3 columns. So a number dividable by 3 is recommended. Using the numpad, the first 9 suggested tags can be toggled on/off.

highlight_color_attributes

Highlights tags which are already present at Danbooru, but were also suggested from Deep Danbooru, but with a different color.
Example: hair_yellow <-> hair_orange

tag_suggestion_exclude_list

A whitespace separated list to exclude tags to be suggested.
Example: tag_suggestion_exclude_list=tag1 tag2 tag3

debug

Activates a logging for Post Responses, e.g. the answer from the danbooru platform.

Examples of danbooru api calls

`

Development

Debugging

Configuration for PHPStorm

Testing

Install the environment

PHPUnit

Execute all tests: vendor/bin/phpunit -c tests/Unit/phpunit.xml

Execute one test: vendor/bin/phpunit -c tests/Unit/phpunit.xml --filter testTransformJsonStringToObject

PHPUnit Debugging

Configuration for PHPStorm


All versions of ddta with dependencies

PHP Build Version
Package Version
Requires symfony/dotenv Version ^5.2
symfony/yaml Version ^5.2
symfony/dependency-injection Version ^5.3
symfony/config Version ^5.3
symfony/var-dumper Version ^5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ramsterhad/ddta contains the following files

Loading the files please wait ....