Extension:MachineVision
Appearance
MachineVision Release status: beta |
|
---|---|
Implementation | Data extraction, Database |
Description | Supports retrieving, storing, and serving machine vision-generated annotations for Commons images |
Author(s) | Wikimedia Product Infrastructure and Structured Data teams |
Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.34+ |
License | GNU General Public License 2.0 or later |
Download | README.md |
Quarterly downloads | 0 |
Translate the MachineVision extension if it is available at translatewiki.net | |
Vagrant role | machinevision |
Issues | Open tasks · Report a bug |
The MachineVision extension will support collecting data about Commons images from internal and external machine vision services and storing it for on-wiki usage.
For details on the project, see Wikimedia Product/Machine vision middleware.
Functionality
MachineVision provides the following:
Get image labels of given pages
- Provides an interface to fetch image labels as prop of the given pages
- Exposes an Action API module, query+imagelabels (
action=query&prop=imagelabels&titles=File:Example.jpg
)
Get unreviewed image labels
- Provides an interface to fetch unreviewed image labels grouped by files
- Exposes an Action API module, query+unreviewedimagelabels (
action=query&generator=unreviewedimagelabels&ilstate=unreviewed&prop=imagelabels
)- Other possible parameters for this API module are:
guillimit
- default is 10uselang
- default is "en"
- Other possible parameters for this API module are:
Get Unreviewed image count
- Provides an interface to fetch the total of unreviwed images for the logged in user
- Exposes an Action API module, query+unreviewedimagecount (
action=query&meta=unreviewedimagecount
)
Review Image Labels
- Provides an interface to change the state of a given label
- Exposes an Action API module, reviewimagelabels, that receives a POST verb with the following parameters:
action=reviewimagelabels
filename=Example.jpg
batch=[{"label":"Q123", "review":"reject"}, {"label":"Q321", "review":"accept"}]
batch of objects containing a map of Q ids and their reviews
- NOTE: Wikidata Depicts (P180) claims must be added through a separate API request to wbsetclaim.
Installation
- Download and move the extracted
MachineVision
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MachineVision - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'MachineVision' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Vagrant installation:
- If using Vagrant , install with
vagrant roles enable machinevision --provision
Configuration
To configure the extension, please refer to the Configuration section of the extension's README file as well as the list of configuration variables in the extension.json file.
See also
This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |