Learn To Build A Face Detection App on AWS in 10 minutes!

2019-08-16-amazon-facial-recognition-trump

Learn To Build A Face Detection App on AWS in 10 minutes!

Sharanya Bhat

Sharanya Bhat

Cloud computing is the technique of providing services as resources and Amazon Web Services(AWS) is a well-known cloud computing platform run by Amazon, a popular multinational trading company. Knowledge of cloud is a plus for freshers and even professionals to add a good weightage to resumes and help get a well-paid job. In this article, I would be a briefing on how one can build an AWS face detection application in just a few hours.

Get Started

In order to begin with you need to have an AWS account. Visit https://aws.amazon.com/console/ and sign in with your account credentials if you have one already or else go to ‘Create a new AWS account’ and fill in the details. Once done, you need to provide your card details. This is necessary only for making an account and not at all needed for this project, developing this project won’t cost you at all. The preferred card would be VISA or MasterCard. Once after filling in the details Rs.1-2 will be deducted from your account just for verification and will be then refunded. It will maximum take 24hours to activate your account on AWS. I had worked on this project under some amazing trainers from Ethnus Codemithra and as for me, it took only 15 minutes to get my account activated. So it depends on the card used and the details filled. If you have any issues with activation, contact https://aws.amazon.com/contact-us/, and re-check your card details. It might take a little bit long on Rupay cards.

There are chances that you may get a call from AWS as soon as your account is activated, asking for your purpose of using the AWS platform. This is just to ensure that no one uses AWS disobeying it’s terms and services, especially to avoid illegal usages. Once after activation, you have various AWS services like EC2, Dynamo DB, S3, Rekognition, and such available for free for a period of 12 months and you won’t be charged until you are under this free tier offer. To know more visit: https://aws.amazon.com/free/.

My instructor used to always suggest that I check on the services in AWS that come under AWS free tier and this is very much necessary so as to get a hang of what actually we are gonna to do in this project. For a complete beginner, I would suggest checking on AWS EC2, S3, and Rekognition. There are various other services available but these services form the main architecture of our application. AWS EC2 is a service for launching instances or servers acting as virtual environments. Interacting with EC2(Elastic Compute Cloud), we will be storing a test image on S3, (Simple Storage Service) and the number of faces in this image will be detected with the help of AWS rekognition service and displayed on the terminal we are using to interact with EC2.
This application can be even made to interact with a telegram bot. I will be giving a link that has procedures to do this as we go into the depth of this article. AWS rekognition is the main service of this application that does the work of face detection and one of my favorite services. I was left dumb stuck when I initially explored it, as its an AI-based service for recognizing various aspects of an image and is a computer vision cloud software offered as a service to AWS users. I always wondered why the word “Rekognition”? Why the letter ‘k’ in place of ‘c’, after some research I found that rekognition has its own meaning, being a german word it means the authenticity of a person, thing, or a certificate. This shows that rekognition offers accurate outputs, may it be recognition of image aspects or image comparison and is a fantastic AWS service

Regions

These are geographical locations that act as virtual infrastructures for its user’s applications and resources. Each region contains an availability zone that actually improves network availability of regions. Each availability zone acts as a replacement to others to compensate zone failures if in any case it occurs. For this project I would suggest we stick on to one region and one availability zone for all our services. Region:Ohio and AZ: us-east-2. Once you sign in to your account, you can see regions drop down near your account name. Either select the one I have mentioned or select any of your choice but ensure its the same throughout this project for all services. To get a clear idea on regions to visit:AmazonInfrastructure page has an image on the right with a globe on it. Click it to experience a 3D animated globe to see all the regions and availability zones, this part has always been my favorite. If you scroll to your left as soon as you enter the site, you can see the Ohio region and observe that it has 3 availability zones as of now.

Working with EC2

In order to begin developing our project, launch an EC2 instance, the steps are as follows:

  • Sign in to AWS management console
  • In services, section go to EC2
  •  
  • Press on launch instance -> launch instance
  •  
  • Choose a system image (the operating system for your server- suggested to choose first one(linux- 64bit x86) that comes under free tier)
  •  
  • Instance type- t2.micro that comes under free tier
  • No changes to be made in next step(configuring instance details)
  •  
  • Add storage- make the size to 8gb
  •  
  • No changes needed to be made in add tags step but this step is just for naming your instance, hence optionally you can add as well, for that press add tag give key as name and value as per your preference which will be the name for your instance, this is completely optional and useful when one launches multiple instances, suggested is to keep this step with no changes made.

 

  • Configure security group- select create a new security group and leave everything default. Note that type is SSH, the protocol is TCP, the port is 22, and even note down the security group name. You can add an optional description.
  •  
  • Review instance launch- check all the details and press launch
  •  
  • In the pop up appearing, select create a new key pair and give a name as per your preference for eg: aws-sharanya-key and press download key pair. Every instance needs a private-public key pair for interacting with it, once it’s launched. The downloaded file will be in .pem format which you need to convert to .ppk later.

 

Now your instance will be launched soon. In EC2 services, there will be a new instance that will catch your eye, check for its status to be 2/2, keep refreshing on the top right to get the screen updated. Once the state changes green and displays running you are done! You have launched your instance successfully and it’s up and running.

Me as a beginner, I knew that instance is nothing but like a virtual computer that I have launched in a particular region but i wondered how can i now access it? I am sure even you have the same question. It’s very simple with availability of various softwares such as putty, Window Subsystem for linux etc. In this tutorial we will be using putty. For more info on how to connect to your instance visit:Connect to linux EC2. Download putty and puttygen from putty.org and puttygen.com respectively. The latter is needed for extension conversion of your private key file. After download add path to system variables and type this command on your power shell/terminal puttygen private_key_name.pem -o private -o private_key_name.ppk. This command is used by puttygen software and converts your .pem file to .ppk. Remember that the key pair you downloaded while launching your instance was a pem file and putty needs a ppk file for connecting to your instance.

In the bottom of your EC2 service portal you will find a IPv4 public IP, copy that and launch putty. Paste it in the IP address column, select the connection type as SSH and then go to the left panel SSH->Auth there press browse and give the path to your private key ppk file and press open. The steps are as shown:

A putty terminal will pop up and it will ask you to give your username. Type in ec2-user. You should now see something like this:

For this project to be connected to the telegram bot, you need to have https installed on your instance and hence type in the command sudo yum install httpd. Once you see a ‘Complete!’, message on your terminal proceeds to type sudo service httpd start. In order to check the status of your httpd server, type sudo service httpd status. Now you should see ‘active(running)’ written in green. Your httpd server is up and running and will allow https traffic through your instance to display the html and php files saved on your instance directly on to your web browser. But this would happen only after you set the inbound rule for your instance. For that go to the left navigation pane -> security group -> select the security group for your instance which you had noted during instance launch and select edit inbound rules. Now you can notice that your instance is set to allow only SSH traffic and you need to enable it to allow http traffic as well. Press add rule and select HTTP from drop-down and set source to ‘anywhere’ and save. This step is not compulsory if you are limiting your project to work on a terminal interface. If you want to connect the entire architecture to telegram bot then you have to compulsorily follow this.

To get a clear idea on EC2 visit:Amazon EC2

Working with Roles

Identity Access Management, shortly called as IAM enables you to manage access to various AWS services with full security, you can decide the users and groups of AWS and the main reason that we are using this free tier eligible service here is to make EC2-S3-Rekognition interact with each other. This is a must-know service for a beginner. IAM roles can be attached to policies and particular policies allow various services and resources of AWS to interact with each other. Here we will be using ‘AmazonS3FullAccess’ and ‘AmazonRekognitionFullAccess’ policies. Attaching a role with this policy to your already launched instance is very very necessary or else you will end up only with a list of errors. Whilst I was working on this project, along with me there were so many others too as the entire project was scheduled live on youtube. Some of my friends after hours of architecture on AWS ended up with no output and no errors as well which at last led to only exasperation. Hence remember, the IAM role with the correct policy is like a key for services to unlock doors of other services.

Attaching a role is just a cakewalk, hence follow the steps carefully:

  • In the services, section go to IAM from your management console after signing in.
  • On the left navigation, pane go to roles
  •  
  • Press create role
  •  
  • Select EC2
  •  
  • In attaching policies type ‘s3full’ and you must be able to see ‘AmazonS3FullAccess’ select that
  •  
  • Then type ‘Rekognition’ you must be able to see many rekognition policies, select ‘AmazonRekognitionFullAccess’.
  •  
  • Give a name to your role and an optional description
  •  
  • Press create role
  •  
  • Go to EC2 select Actions ->Instance settings -> Attach/Replace IAM roles -> type your role name and press apply.

Once you see the ‘role successfully attached’ message that means you have now given a key to EC2, to access S3 and Rekognition. To know more about IAM visit: AWS IAM

To be more clear go through, Steps for attaching roles-as shown:

Working with S3 from EC2

Simple Storage Service can be accessed directly from the services section and files can be uploaded to containers termed as buckets. In this tutorial, we will be uploading our file using EC2. Go to S3 from the services section and press the create bucket option. Type a unique name for it, select availability zone, and press create. The region must be the same as the region you used for other services and if you are following me in this aspect, then that would be Ohio and the availability zone would be us-east-2. Once your bucket is created, make it public. visit: AWS S3Bucket.To know how to do so. Now it is the container, ready to take data as objects. Which we would be uploading from EC2. To know more about how to use an S3 visit: AWS S3.

Connect to EC2 from putty and type the command sudo vim install php. The main code base that makes the entire architecture of our application work is written in php hence do not forget this step.
Once the installation is complete, type curl -sS https://getcomposer.org/installer | php then type cd/var/www/html and when you are inside the directory type sudo mkdir face, this is the folder where we would be uploading our sample image for detecting faces. Download this file Face detection app codebase and rest all the commands are clearly mentioned in this. Do remember to change the bucket and image name in the codebase and ensure that the availability zone is the same as your bucket’s availability zone.

You must have noticed a command sudo mv b97ea33b5842c7894b804923c6c05580.jpg sample.jpg after the wget command, this command apparently means that you have saved your image as sample.jpg you can change it to any file name as per your wish. The code base actually uploads your image saved in the face folder, to S3 which is stored in your bucket and is accessed by AWS rekogniton service to detect faces. Henceforth the bucket and image name must be correctly mentioned and is a very important step. My friends ended up uprooting their hairs on their heads for the errors that popped up, finally understanding that the bucket name was not changed.

On your putty terminal type sudo vim index.php this command opens the vim editor and here you can copy paste your code that you just now downloaded. In order to paste your code press ‘i’ on your keyboard, you can now see –INSERT– appearing on your editor, once done type :wq which means write and quit. Now type sudo php index.php command to execute the index.php file. You must get an output with a line saying ‘image upload done your image url…’ and ‘totally there are 9 faces’. This output is from S3 and Rekognition respectively. This output may not appear at all or give an eerie error if you have not executed the above commands and commands from the file correctly.

Cheers! We have built our face detection application on a terminal interface.

Terminating Instance and clearing S3

As you are done with your project, before erasing it all from AWS please do take screenshots of the steps and push it to github repository in a document format as you can present the repo link to your interviewer. Now the first question that might have appeared in your mind is, why to erase the project? You might keep it as well but only for a period of 30 days on S3 and EC2 can be kept running only for 750 hours without getting billed as per free tier policy. Though the free tier is available for 12 months, it has its own limitations. The one who calls you after the activation of your AWS account will clearly explain the services and its usage limitations to you so do keep a note of it or you can browse about AWS free tier.

Go to EC2 -> Actions->Instance State ->Terminate. After this step, go to instance main page where you can see details of EC2 related resources, usage in numbers where now you should be able to see ‘0 instances running’ and there you can go to key pairs and delete the key pairs you created for connecting to EC2, go to IAM and even delete the role but most importantly go to S3 and empty the bucket.

S3->_your bucket_ ->select the image -> actions ->delete then come to S3 main portal select your bucket and delete it as well.

Video Available

A detailed step by step video is available for this project! Visit Ethnus Codemithra youtube channel and access 7-day master class videos to know the project development stages step by step. Even if you are interested in combining this architecture with a telegram bot and see the output there, the steps are clearly explained in the video by experienced instructors. For an amateur, i would recommend to compulsorily watch the video before beginning with the project.

Note: All the services mentioned here in the article come under free tier only if your account is free tier eligible. Please do have a proper knowledge on free tier eligibility of services and do not use any service that doesn’t come under it, and do stop usage of the services once after you have completed the project as per steps mentioned. Otherwise you would end up getting billed.

What's Next

AWS is an amazing cloud computing platform and take this project just as a kickstart in knowing about AWS, you can explore more and create your own amazing projects. Do not stop, this isn’t the end of cloud computing!

About the Author

Read More

Codemithra Team

Eight best books to prepare for AWS Certification

Introduction

Having the right guidance to launch a successful career in AWS is a necessity. You need the right books, strategies, and mentors to get the AWS certification. If you have AWS certification, you possess the most in-demand skills.

Read Now

Codemithra is here to help you!

Terms & Conditions

This Privacy and Security Policy is provided for the benefit of customers and clients of Ethnus Consultancy Services Private Limited. (“Ethnus”) as well as other consumers and parties who use Ethnus and/or its website(s), particularly codemithra.com (“Website”, “www.codemithra.com”, “Codemithra” or “Ethnus Codemithra”), and/or applications (“Apps”) (collectively, “Ethnus Services” or “Ethnus Platform”).

Since Ethnus serves several different audiences, customers find it helpful to read the Terms of Use that apply specifically to them based upon the purpose for which they use Ethnus. For this reason, we link to three separate agreements below for employer customers, job seeker customers, and staffing customers, respectively.

For your convenience, we define each of these audiences that Ethnus serves as follows:

“Employer Customer” means an entity using Ethnus Services that is seeking to hire an individual as an employee and/or independent contractor to be employed by it directly.

“Job Seeker Customer” means an individual using Ethnus Services who is seeking to be employed as an employee or independent contractor by an employer.

“Staffing Customer” means a staffing company using Ethnus Services that provides staffing services to their own Staffing Clients.

So long as your use of the Ethnus website and services remains within the scope of the particular audience or customer for which you began using Ethnus (e.g. a job seeker does not use Ethnus as an employer, or an employer does not use Ethnus as a job seeker), the complete Terms of Use applicable to your use of the Ethnus website and services is contained within the applicable Terms of Use linked below.

Employer Terms of Use

The following Terms of Use apply to any Ethnus Employer Customer seeking to hire employees or independent contractors for its own business. If you seek to find employees or independent contractors for the benefit of your clients (and not yourself), you need to review the Terms of Use specifically for our Ethnus Staffing Customers accessible at www.Codemithra.com/terms/staffing.

Ethnus, Inc. (“Ethnus”) provides online services through which employers and staffing companies seeking employees and independent contractors can efficiently and effectively review and interview candidates. Ethnus provides these services and its suite of features and products through its Apps and Website (collectively, “Ethnus Services”) subject to these terms of use (“Terms of Use”) and the agreements incorporated herein.

Your privacy is very important to us. We designed our accompanying Privacy and Security Policy to provide important disclosures about how your information will be used by Ethnus in providing you Ethnus Services. These Terms of Use expressly incorporate our Privacy and Security Policy.

Please read these Terms of Use and our Privacy and Security Policy carefully before using any of the diverse Ethnus Services. By visiting the Website, installing any of the Apps, and/or using any of the Ethnus Services, you shall have affirmed your agreement to these Terms of Use.

1. Definitions

2. Modifications – Will Ethnus ever modify these Terms of Use?

3. Ethnus Services – What are the Ethnus Services?

4. Video Content and Services – How and when do you record videos?

5. Pricing, Payments, and Billing – How and when will I be billed for Ethnus Services?

6. Objectionable Content – What if I find content to be objectionable?

7. Customer Conduct

8. Intellectual Property

9. DMCA Policy

10. Reserved for Future Use

11. Resale of Services

12. Indemnification

13. Disclaimer of Warranties

14. Third Party Links and Products

15. Limitations of Liability

16. Exclusions and Limitations

17. General Terms

1. Definitions

“Consumer” means any individual or entity that uses any of the Ethnus Services. Where applicable, the term “Consumer” shall encompass all Ethnus Customers.

“Content” means all material, whether publicly posted or privately transmitted, available on or through any of the Ethnus Services.

“Customer” means, for purposes of this Terms of Use, You, a Job Seeker Customer.

“Customer Content” means any Content uploaded to and/or created through the Ethnus Services by a Ethnus Customer.

“Employer Customer” means an entity using Ethnus Services that is seeking to hire an individual as an employee and/or independent contractor to be employed by it directly.

“GDPR” means the European Union’s General Data Protection Regulation.

“Job Seeker Customer” means an individual using Ethnus Services who is seeking to be employed as an employee or independent contractor by an employer.

“Profile Video” means a promotional video created by a Job Seeker Customer to promote themselves as a candidate employee and/or independent contractor. It is not an interview. The Job Seeker Customer completes this independently and on their own.

“Software” means any necessary software used in connection with the Ethnus Services.

“Ethnus Account” means an account associated with a Ethnus Customer who uses or has used Ethnus Services.

“Ethnus Content” means any Content excluding Customer Content and Video Content in which Ethnus does not participate.

“Ethnus Customer” means any person who uses or has used Ethnus Services including, but not limited to, Employer Customers, Job Seeker Customers, and Staffing Customers.

“Ethnus Services” means the suite of features, products and services offered through Ethnus, its Apps, its App Services, the Website, and the Website Services.

“Ethnus Trademarks” means any trademarks, tradenames, logos, and other commercial designs of Ethnus or licensed to Ethnus, whether or not formal registration exists including, but not limited to, “Ethnus.”

“Staffing Clients” means third-party employer clients of Staffing Customers.

“Staffing Customer” means a staffing company using Ethnus Services that provides staffing services to their own Staffing Clients.

“Strategic Partners” means those trusted partners that Ethnus employs, engages, or retains to perform functions and/or provide services on its behalf.

“Sub Accounts” means subsidiary accounts created for or by an Employer Customer or Staffing Customer (“such as a consultant group or employer”) under its primary account.

“Username” means the valid email address provided by each Ethnus Customer to be used as their username or login identification.

“Video Content” means any video content created by or associated with any Ethnus Customer accessible on and through Ethnus Services including, but not limited to, Profile Videos, Video Questions, Video Interviews, and Welcome Videos.

“Video Interview” means an interview completed through Ethnus Services using a video or “web” camera that an Employer Customer or Staffing Customer requests a Job Seeker Customer complete. A Video Interview may involve a Job Seeker Customer alone or with other participants from an Employer Customer or Staffing Customer. A Video Interview may be pre-recorded by a Job Seeker in response to questions or occur live at which time it would be recorded.

“Video Question” means a question recorded in video and audio that can be sent to potential employee and independent contractor candidates by an Employer Customer or Staffing Customer.

“Website” means all of the content, information and services (in any format whatsoever) accessible through the World Wide Web at the domain name Codemithra.com.

“Website Services” means the services provided by Ethnus through the website at the domain name Codemithra.com, hire.li, and any of our other websites that may be used from time to time

Ethnus User Agreement

I agree to submit my personally identifiable information to Ethnus, who may use it to communicate regarding their events, courses, and other services through various media including phone calls, text messages, email, and social media. I also agree with Ethnus’ Privacy Policy and Terms of Service.

I agree with Ethnus sharing my personal data, including email address, with Salesforce family of companies, who may contact me for sales and marketing purposes and as described in Salesforce’s Privacy Statement.

Privacy Policy

This Privacy Notice describes how we collect and use your personal information in relation to Ethnus websites, applications, products, services, events, and experiences that reference this Privacy Notice (together, “Ethnus Offerings”).

This Privacy Notice does not apply to the “content” processed, stored, or hosted by our customers using Ethnus Offerings in connection with an Ethnus account. This Privacy Notice also does not apply to any products, services, websites, or content that are offered by third parties or have their own privacy notice.

Personal Information We Collect

We collect your personal information in the course of providing Ethnus Offerings to you.

Here are the types of information we gather:

        a) Information You Give Us: We collect any information you provide in relation to Ethnus Offerings. Click here to see examples of information you give us. Example: Name, email, phone, etc.

        b) Automatic Information: We automatically collect certain types of information when you interact with Ethnus Offerings. Example: IP address, location, browser identity, etc.

        c) Information from Other Sources: We might collect information about you from other sources, including service providers, partners, and publicly available sources. Example: marketing analytics, keywords, etc.

How We Use Personal Information

We use your personal information to operate, provide, and improve Ethnus Offerings. Our purposes for using personal information include:

        a) Provide Ethnus Offerings: We may use your personal information to provide and deliver Ethnus Offerings and process transactions related to Ethnus Offerings, including registrations, subscriptions, purchases, and payments.

        b) Measure, Support, and Improve Ethnus Offerings: We use your personal information to measure use of, analyze the performance of, fix errors in, provide support for, improve, and develop Ethnus Offerings.

        c) Recommendations and Personalization: We use your personal information to recommend Ethnus Offerings that might be of interest to you, identify your preferences, and personalize your experience with Ethnus Offerings.

        d) Comply with Legal Obligations: In certain cases, we have a legal obligation to collect, use, or retain your personal information.

        e) Communicate with You: We use your personal information to communicate with you in relation to Ethnus Offerings via different channels (e.g., by phone, email, chat) and to respond to your requests.

        f) Marketing: We use your personal information to market and promote Ethnus Offerings. We might display interest-based ads for Ethnus Offerings.

        g) Purposes for Which We Seek Your Consent: We may also ask for your consent to use your personal information for a specific purpose that we communicate to you.

Cookies

To enable our systems to recognize your browser or device and to provide Ethnus Offerings, we use cookies.

How We Share Personal Information

Information about our customers is an important part of our business and we are not in the business of selling our customers’ personal information to others. We share personal information only as described below and with Ethnus Consultancy Services Private Limited, . and its affiliates that are either subject to this Privacy Notice or follow practices at least as protective as those described in this Privacy Notice.

Transactions Involving Third Parties: We make available to you services, software, training, and content provided by third parties for use on or through Ethnus Offerings. You can tell when a third party is involved in your transactions, and we share information related to those transactions with that third party. For example, you can order services, software, and content from sellers using the Authorized Training Partner’s marketplace and we provide those sellers information to facilitate your subscription, purchases, or support.

Other than as set out above, you will receive notice when personal information about you might be shared with third parties, and you will have an opportunity to choose not to share the information.

How We Secure Information

        a) We protect the security of your information during transmission to or from websites, applications, products, or services by using encryption protocols and software.

        b) We maintain physical, electronic, and procedural safeguards in connection with the collection, storage, and disclosure of personal information.

Internet Advertising and Third Parties

Ethnus Offerings may include third-party advertising and links to other websites and applications. Third party advertising partners may collect information about you when you interact with their content, advertising, or services. For more information about third-party advertising, including interest-based ads, please read our Interest-Based Ads notice.

Access and Choice

You have choices about the collection and use of your personal information. Many Ethnus Offerings include settings that provide you with options as to how your information is being used. You can choose not to provide certain information, but then you might not be able to take advantage of certain Ethnus Offerings.

        a) Communications: If you do not want to receive promotional messages from us, please unsubscribe or adjust your communication preferences in the emails.

        b) Advertising: If you don’t want to see interest-based ads, please adjust your Advertising Preferences.

        c) Browser and Devices: The Help feature on most browsers and devices will tell you how to prevent your browser or device from accepting new cookies, how to have the browser notify you when you receive a new cookie, or how to disable cookies altogether.

Children’s Personal Information

We don’t provide Ethnus Offerings for purchase by children. If you’re under 18, you may use Ethnus Offerings only with the involvement of a parent or guardian.

Retention of Personal Information

We keep your personal information to enable your continued use of Ethnus Offerings, for as long as it is required in order to fulfill the relevant purposes described in this Privacy Notice, as may be required by law (including for tax and accounting purposes), or as otherwise communicated to you. How long we retain specific personal information varies depending on the purpose for its use, and we may delete your personal information in accordance with applicable law.

Contacts, Notices, and Revisions

If you have any concern about privacy at Ethnus, you may also contact us at the addresses below:

Ethnus Consultancy Services Pvt Ltd,

SST Chambers, No.151/17/1 Second Floor, 36th Cross Rd, 5th Block, Jayanagar, Bengaluru, Karnataka 560041

Or, email us at reachus@ethnus.com

Or call us at: +91 – 8929 334 324

You will find the updated contact information on our website: www.ethnus.com/contact/

If you interact with Ethnus Offerings on behalf of or through your organization, then your personal information may also be subject to your organization’s privacy practices, and you should direct privacy inquiries to your organization.

Our business changes constantly, and our Privacy Notice may also change. You should check our website frequently to see recent changes. You can see the date on which the latest version of this Privacy Notice was posted. Unless stated otherwise, our current Privacy Notice applies to all personal information we have about you and your account. We stand behind the promises we make, however, and will never materially change our policies and practices to make them less protective of personal information collected in the past without informing affected customers and giving them a choice.