The FBI and the National Institute of Standards and Technology (NIST), an agency of the Department of Commerce, are developing tattoo detection technology and testing it on prisoners, according to an investigation by the Electronic Frontier Foundation (EFF).

Government scientists are working with the FBI to create algorithms that can identify tattoos on a person’s skin and attribute it to a certain ideology, religion, or even gang. More than 15,000 images were gathered and used in the experiments.

The tattoos can be used to profile inmates. However, the EFF claims that this was done without the prisoners’ consent and breaches the rules of ethical research and the Common Rule for using human subjects.

NIST researchers are “treating inmates as a bottomless pool of free data,” said the digital rights organization, which has accused the researchers of failing to take the necessary ethical steps that are in place to prevent the exploitation of prisoners.

According to documents obtained by EFF under Freedom of Information, NIST failed to disclose initially that prisoners had been used in its first experiment titled “Tatt-C.” It adds that personal identifying information (PII) was not removed from the data.

Tattoo data from the research has since been shared with 19 third party bodies, including companies like Albany, New York-based MorphoTrak, which sells biometric technology to law enforcement.

“NIST’s failure to follow the Common Rule’s oversight requirements is not some procedural hiccup. Inmates are unable to opt out of law enforcement taking photos of their tattoos in a correctional setting,” said EFF’s Dave Maass and Aaron Mackey. “Worse, the images are now being used for an entirely different purpose and it is highly unlikely that the FBI sought informed consent before handing over the images to third parties for research.”

This raises several concerns over scientific ethics and human rights, they add, especially when for-profit businesses have received the data and could benefit financially.

The FBI has been under public scrutiny of late for its use of biometric databases that it keeps, going as far as to request they are exempt from new forthcoming laws that could make their details public.

“In discussions with EFF, NIST has indicated that it is looking more closely at the project, but has given no public indication that it will take any action to delay or suspend the program,” Maass and Mackey said. As of now, NIST will continue with its next scheduled tattoo experiment later this summer. EFF intends to fight the experiment going ahead.