SAN FRANCISCO (Reuters) - Facebook Inc said on Tuesday it would begin using facial recognition technology to tell people on the social network when others upload photos of them, if they agree to let the company keep a facial template on file.

The company said in a statement that it was making the feature optional to allow people to protect their privacy, but that it thought some people would want to be notified of pictures they might not otherwise know about.

The feature would not immediately be available in Canada and the European Union, Facebook said. Privacy laws are generally stricter in those jurisdictions, though the company said it was hopeful about implementing the feature there in the future.

Tech companies are putting in place a variety of functions using facial recognition technology, despite fears about how the facial data could be used. In September, Apple Inc revealed that users of its new iPhone X would be able to unlock the device using their face.

Facial recognition technology has been a part of Facebook since at least 2010, when the social network began offering suggestions for whom to tag in a photo. That feature also is optional.

For those who have opted in, Facebook creates what it calls a template of a person’s face by analyzing pixels from photos where the person is already tagged. It then compares newly uploaded images to the template.

Facebook deletes the template of anyone who then opts out, Rob Sherman, Facebook’s deputy chief privacy officer, said in a statement.

Under the new feature, people who have opted in would get a notification from Facebook if a photo of them has been uploaded, although only if the photo is one they have access to.

The company plans to add an “on/off” switch to allow users to control all Facebook features related to facial recognition, Sherman said. “We thought it was important to have a really straightforward way of controlling facial recognition technology,” he said.

Facebook said it also plans to use facial recognition technology to notify users if someone else uploads a photo of them as their profile picture, which the company said may help reduce impersonations, as well as in software that describes photos in words for people who have vision loss, so that they can tell who is in a photo.