The weather is getting nasty around here, so the opportunity for outside projects decreases in inverse proportion to the increasing rain. This means it’s time to start on some other projects for a while. As it turns out, I’d been noodling on the idea of fake people. Specifically, based on an article I saw about a company that was creating AI-generated folks who looked like they could be real people but don’t actually exist. That got me thinking about creating a Staff Spotlight section on my site that was made up entirely of completely non-existent folks! Let me tell you how I did it.

The first step was to create a list of the sorts of data I wanted to have for this exercise. My initial list was:

  • Faces
  • Backgrounds
  • Names
  • Hometown
  • Role
  • Favorite Quote

Faces

Generated Photos has created a portfolio of what appear to be stock photos created with Machine Learning based on their own library of assets (headshots). Fortunately, they have an API that allows anyone to slurp up some of these headshots for personal use (not for profit). One thing that is pretty obvious pretty quickly the generated headshots are not exactly representative of the entire spectrum of folks who exist in our world. Frankly, it’s a pretty bland looking crowd. Also, the variations across age are pretty granular, so you get “infant, “child”, “young adult”, “adult” and “elderly”. Additionally, you can get male and female. There are few options for emotions, like “joy”, “neutral” and “surprise”. You can ask for specific hair and eye color. Ethnicity is generically abstracted to “white”, “latino”, “asian” and “black”. But, really, it’s not an especially diverse looking dataset as you can see here:

These People Do Not Exist.

In fact, in their FAQ, they acknowledge this with an entire Q, which is really more of a statement.

  • ‘I’m concerned {…} people aren’t represented well enough.’
  • We fully agree and are acitvely working on this! (There’s more, but you can read it on their site if you are interested.)

So, hopefully, they will continue to work to come up with data that allows them to create a more diverse set of fake people. That having been said, I give them credit because many of these people look like they could exist. They look like someone I could easily meet at work or at the grocery store. Which is definitely an accomplishment. I shared these with a friend who replied that at least one of them looked like they were dead inside, which well, fair!

At any rate, this gave me a library of random faces I could use. I snagged a bunch of these at their free 512×512 size and then resized 256 men and women and used local copies so as to not be dependent on their rate-limited API. Note: This is completely legal and within the intent of their API.

Backgrounds

I wanted a random background for the Staff Sections for each staff member, so I looked around for a source of free background images that supported an API that I could use and settled on Pixabay.

Pixabay!

They had my favorite descriptor (‘free’) and an API that is unmetered, meaning I could query their API and collect backgrounds as needed. I tested a direct call to their API for every call to the Staff Spotlight section, but in testing, I saw that occasionally, maybe 10% of the time, calls to their API would come back, but have 0 results for some reason and repeating the same call did result in backgrounds, so I decided I wouldn’t rely on their API, rather I queried their API for a few hundred random backgrounds and snagged the 640px wide versions and saved copies locally. This would also improve performance as I wouldn’t be calling a third-party API regularly.

Names and Hometowns

While poking around on this issue, I ran across a nice site that offers free APIs and one of them fit what I was looking for completely. The site HelloACM has a collection of really nice (and free!) APIs and one of them is called ‘rig’ for Random Identity Generator. It generates an identity that looks contains the following information:

Random Identity Generator

So, this gives me a name, a fake address, a city, state, and zip code and an area code for a fictional phone. More than enough!

Role

This last one I had fun with. I simply googled about for nonsense titles that real folks have used over the years and snagged a few hundred of them, cleaned them up, made the list unique, and called it good. Some of these are just bananas, but a few of these folks I have known:

An entirely fictional and yet plausible list of titles or roles.

Favorite Quote

After looking at some free APIs that were not awesome and were not fast, I stumbled on one that was fast, easy to use, free, and suited my needs perfectly well. I found Quotable by Luke Peavey. What’s awesome is that he has provided all the code on GitHub as well as offers a server running the code that provides the quotes when you call the API. And, if he ever decides he’s tired of offering that production server, I can snag the code from GitHub and host my own if I wanted to. The internet is awesome sometimes!

Make Some Fake Folks

That’s my list of data sorted! All that remained was coding up some basic PHP (I don’t have a ton of options on my hosted site, but it works, so I use it) to parse data, make some random selections, format some code, and insert it out onto the main page and you get something that looks like this:

Our Staff

So, now, any time you hit Mossor dot Org you are greeted, amongst other things, with our latest Staff Spotlight and no actual human beings were implicated/slandered/maligned by association. Unless you are a “Chief Heart Officer” or “Head of Customer Wow” in which case, awesome title!

Bonus

When I first stumbled on HelloACM, I noticed one of the other APIs was for Fortune. Fortune will only ring bells for folks of a certain age and experience. Mostly those working on UNIX-based OSes in the mid to late-90s. In that world, one of the ways someone could customize their environment a bit was to generate a random Fortune when they would log in. Just a bit of fun, but it takes me back to a time and a place.

So, I decided that I needed a bit of that time and place, so I wrote a bit more code to generate a Fortune each time someone visits Mossor dot Org. You’ll see the section as it’s titled, appropriately, Fortune and it will include one of these randomized pieces of wisdom. And you can hit the button and generate more if you don’t like what you see.

Silly fun, but as I said, it evokes a simpler time and place and it made me smile.

Categories: Make

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *