Only humans

BVPMASH's biggest issue was a bunch of the photos were not people. The data I collected was full of college logos, goku, blank white squares, cartoons, default avatars.

I used to delete those by hand. I wrote a script for it. Type the image number, it finds the profile, it deletes it.

image_input = input("Enter image number(s): ")

cur.execute("DELETE FROM ratings WHERE userid = %s", (uid,))
cur.execute("DELETE FROM profiles WHERE userid = %s", (uid,))

I was not going to type 3,000 image numbers.

So I grabbed all 3,117 live photos and ran them through Human.js. The first face detector was bad. It called a Stitch cartoon a face at 0.61 and the Bharati Vidyapeeth seal a face at 0.62.

I added another check. Find a face, then put a bunch of points on it. Logos and anime usually cannot do that. A normal selfie can.

function isHumanFace(result) {
  const face = result.face && result.face[0];
  if (!face || !face.mesh) return false;
  return face.mesh.length >= 400 && Number(face.score) >= 0.5;
}

2,657 looked like faces. 460 did not. I also checked for a body so I could sort them:

That second check is strict. It misses masks and some black-and-white photos. So I did not delete anything automatically. I put the 460 on a page, clicked the real people, and kept them.

Review hitlist of flagged profile photos. Green cards are people I kept.
Green means I kept them. The model thought they were not faces. They were. The rest got deleted.

197 stayed. 263 went. 3,117 down to 2,854.

I still look before I delete.

~ d3ath.awaits
[email protected]