A photo classifying feature on the Photos app on iPhones has been causing a stir on social media after Twitter users discovered Apple has been quietly categorizing women’s underwear.

The image recognition software, which uses an artificial intelligence algorithm to classify lingerie photos so that they are easily searchable, has been in place for over a year but has only now come to the attention of iPhone users.

There are over 4,000 different categories used in the image recognition software but several are more conspicuous than others. They include “brassiere,” “bra,” “bras,” “girdle,” and “corset.” As tech news site The Verge notes, no categories for men’s underwear, such as “boxers” or “briefs,” feature on Apple’s Photos app.

ATTENTION ALL GIRLS ALL GIRLS!!! Go to your photos and type in the ‘Brassiere’ why are apple saving these and made it a folder!!?!!?____

The feature was first described in a blogpost by developer Kenny Yin in June 2016, though it gained little attention beyond developer circles at the time.

It works by feeding the algorithm thousands of different images of an item, together with a word that describes the item.

“Photos app supports detecting 4,432 different scenes and objects. These scenes or objects can be searched for in all languages,” Yin explained in the blogpost, which also lists the entire database of scenes and objects.

“Additionally, you can search for various landmarks. For example, Photos can respond for search query of ‘Maho’ (beach in Saint Martin), despite Photos is not programmed or trained to understand specific landmarks [sic].”

Unless an iPhone user’s storage settings are set to automatically store images to the iCloud, the AI algorithm is local to each device and the images are not visible to Apple.

Apple is not the only technology company to be criticized for its photo-classifying algorithms. In 2015, another Twitter user posted an image of two black people that had been categorized by Google’s Photos app as “gorillas.”

Google apologized for the error but was unable to fully fix the algorithm and in the end removed the gorilla tag from its photo categorization software.

Senator Bob Menendez said he was "disappointed, but not surprised, that the Trump administration has failed once again to prioritize our long-term national security interests or stand up for human rights."