dmarx / whats-in-a-name

[WIP] probing identity and bias in text to image models
MIT License
1 stars 1 forks source link

Ethnology of facial phenotypes in CLIP #21

Open dmarx opened 9 months ago

dmarx commented 9 months ago

for each, permute:

use same permuted prompt templates for all country/ethnicity names.

invoke date, e.g. "january 2024" as a suffix

dmarx commented 9 months ago
from bs4 import BeautifulSoup
url = "https://en.wikipedia.org/wiki/List_of_contemporary_ethnic_groups"
response = requests.get(url)

soup = BeautifulSoup(response.text)
tables = soup.find_all('table')
target = tables[1] # <table class="wikitable sortable" width="100%">
records = target.find_all('tr')
header = records[0]  

header = records[0] 
for elem in header:
  if elem.text:
    print(elem.text.strip())
dmarx commented 9 months ago

https://en.wikipedia.org/wiki/Eye_color
https://en.wikipedia.org/wiki/Martin%E2%80%93Schultz_scale
https://en.wikipedia.org/wiki/Limbal_ring
https://en.wikipedia.org/wiki/Human_skin_color