Skip to main content

Automating social science work around image tagging via various online services.

Project description

Cross-service Laber Agreement Score

Image recognition services provide different labels for the same images, with differences broadly either being different word choices for the same concept or not seeing same objects on both images. Cross-service Laber Agreement Score (COSLAB) is a method to evaluate the semantic similarity on image labels across several image recognition systems. It first produces each image a set of labels, one for each service. Then it uses word embedding models to find the closest match across label sets to see how much cross-service agreement there are for each label.

Conceptual how to use

Our work further highlights that image recognition services differ on what they see on images. Due to this, we suggest approaching them as interprentations instead of objective truths. In response, we propose two different strategies which you can employ to use them in your research:

  1. Inclusive strategy: to ensure that your work takes different interprentations into account, use more than one image recognition service to label the images. Then merge all labels together and acknowldge that results have inheritent differences emerging from different services.
  2. Rigorous strategy: to ensure that your work takes different interprentations into account, use more than one image recognition service to label the images. Then use COSLAB to choose only labels above a pre-defined threshold level for further analysis.

Example

from coslab import aws
from coslab import googlecloud
from coslab import azure_vision
from coslab import taggerresults
from coslab import tag_comparator

## establishing a container for all results
results = taggerresults.TaggerResults()

## establish classifiers
amazon = aws.AWS(api_id="", api_key="", api_region="")
google = googlecloud.GoogleCloud(service_account_info="")
azure = azure_vision.Azure(subscription_key="", endpoint="")

amazon.process_local( results, "image.png")
google.process_local( results, "image.png")
azure.process_local( results, "image.png")

results.export_pickle("image.pickle")

tag_comparator.compare_data( results )

Installation

COSLAB is available via Pypi, so you can

python3 -m pip install coslab-core

References

Applications

  • None yet. Please let us know if you use it.

Acknowledgments

We generiously thank C. V. Åkerlund Foundation for supporting this work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coslab_core-0.9.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

coslab_core-0.9.3-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file coslab_core-0.9.3.tar.gz.

File metadata

  • Download URL: coslab_core-0.9.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for coslab_core-0.9.3.tar.gz
Algorithm Hash digest
SHA256 ebf591cdab436129ab9b7aeefe22cd0ee84afb16a2b4206d8b28508a15a5d6bd
MD5 3baf0323702fd0fc27130c82f20c4f87
BLAKE2b-256 0ca98402276f3fd2590b44b80da46ecf1e754c413b65c4125b233d56d0bf032b

See more details on using hashes here.

File details

Details for the file coslab_core-0.9.3-py3-none-any.whl.

File metadata

File hashes

Hashes for coslab_core-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 56bad828c913379f19a296177b1172dd948d85f5854ea94975cb7f19eaa1adb1
MD5 32b0961cad70d7fca3c16f7e30cb4381
BLAKE2b-256 6a0d14c423fa8f6799667c899a2424917e9c8f59c89de68e6c0a0493c3dfae86

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page