adding the Amazon Rekognition component

          In this exercise, you will extend the application by adding the Amazon Rekognition component. As soon as you upload a photo to your Amazon S3 bucket, Amazon Rekognition processes the photo and identifies objects, people, text, scenes, and activities in the photo and labels it accordingly. 
          Note: Make sure to sign in to your AWS account with the AWS IAM user edXProjectUser credentials.

          To get started, follow the instructions below.

          1. Download the exercise code .zip file to your AWS Cloud9 environment.

          2. Unzip the exercise code .zip file.

          • Unzip the exercise code .zip file by typing the command below on your AWS Cloud9 terminal.
          • unzip ex-rekognition.zip

            The contents of the .zip file should be extracted to a folder with a similar name. You can view the folder on the left tree view.

          • You may want to close any tabs that remain open from previous exercises.

          3. Explore the exercise code.

          • Open the exercise-rekognition/FlaskApp/application.py file.
          • In the Homepage route function, notice that a Boto 3 client for Amazon Rekognition is created. The image uploaded in the Amazon S3 bucket is passed to the detect_labels API, which returns a list of labels processed by Amazon Rekognition. These labels are then populated on the UI.

          4. Run and test the code.

          • To run the application.py code, on the top menu bar, click Run -> Run Configurations -> Python3RunConfiguration.
          • Important: Notice that the run configuration runs the application.py for the previous exercise.
          • Point the run configuration to the correct exercise folder by editing the folder path in the Command text box in the bottom pane.
            In that text box, type exercise-rekognition/FlaskApp/application.py
          • Click Run on the left side. You should see a message like this:
          • Running on http://0.0.0.0:5000/

          • Go to your browser and type the IP address of the Amazon EC2 instance that hosts your AWS Cloud9 environment. At the end of the IP address, type :5000

            The application should now have the functionality related to Amazon Rekognition.

          • To test the Amazon Rekognition component, click Home on the application.
          • Upload an image. Amazon Rekognition should label the image with the image properties.

          Optional Challenge

          The Boto 3 detect_labels response includes a Confidence value. Can you update the application UI to include the Confidence? Or define a threshold and only display labels over the confidence threshold?



          眼鏡蛇

          posted on 2018-04-19 11:16 眼鏡蛇 閱讀(172) 評論(0)  編輯  收藏 所屬分類: AWS

          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          導航

          統計

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 依安县| 珠海市| 开封市| 尼玛县| 淮安市| 嘉兴市| 大英县| 泽州县| 无极县| 大方县| 忻州市| 松桃| 屏东县| 长岛县| 余庆县| 灵宝市| 炎陵县| 西宁市| 攀枝花市| 盈江县| 璧山县| 宁安市| 横山县| 绥阳县| 凤城市| 拜城县| 林周县| 巴林右旗| 开原市| 唐河县| 乌苏市| 舒城县| 高雄县| 郓城县| 泾阳县| 玛纳斯县| 肇源县| 吉林省| 岱山县| 青阳县| 庐江县|