GithubHelp home page GithubHelp logo

alainakafkes / clarifaing-gender-roles Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 5.0 166 KB

Using Clarifai Python API & Bing API to tag images of STEM professions, plus d3.js for viz.

Python 38.17% HTML 61.83%
gender-equality clarifai-python bing-api python d3js women-in-tech

clarifaing-gender-roles's Introduction

#Clarifaing Gender Roles

###The Idea I wanted to play around with the Clarifai API, but had no long-term project in mind. As an advocate for women in tech, I wanted to see if the gender disparity in STEM fields could be quantified from Bing, the image search engine used by one in five people.

###The Implementation I coded a Python script that uses the Bing Cognitive Search API to find the first 150 hits from a given search term, and then save the content URL for each hit in a text file. I created another Python script that tags every uncorrupted image using the Clarifai Python API, and builds a dictionary of tags and frequencies. I use d3.js to visualize the results as bubbles such that tag frequency is equated to bubble area.

This code has been abstracted for use with any search term, so feel free to clone/star this repository to try it out!

###Quick Caveat Machine learning and artificial intelligence technologies cannot define someone's gender identity. The results that follow give the Clarifai API's best guesses of who is seen each image, which is inherently biased by training data. For more on AI bias, check out this article from "Model View Culture".

###First Results: "Engineer" In the first 150 Bing Image Search results for the term "engineer," the Clarifai API counts 116 images tagged with "man" versus 33 tagged with "woman." "Man" was also the most frequent tag. Yikes.

Who is an engineer?

Keep in mind that this is what any Internet user sees when they search Bing for "engineer" -- mostly men. There is an evident lack of diversity in many engineering fields, so I believe that search results should strive to be gender-balanced to show girls & young women that they can and should exist in these spaces.

###"Doctor" "Man" (114 tags) still outnumber "woman" (73 tags), but to a much lesser extent. Unfortunately, even the tag "stethoscope" appears more than "woman." Other notable, frequent Clarifai tags include "isolated" and "fine-looking." ๐Ÿ˜‰

Who is a doctor?

###How To Contribute Create a pull request! bingscraper.py can be run in any Python 2 interpreter, whereas accumulator.py needs to be run in a Python 3 interpreter after creating your first Clarifai app and by following the guidelines found here.

Comments? Questions? Suggestions for terms to explore? Feel free to share them with me.

clarifaing-gender-roles's People

Contributors

alainakafkes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

clarifaing-gender-roles's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.