免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300

FIT5225 代做、代寫 java,c++語言程序

時間:2024-04-21  來源:  作者: 我要糾錯


 


Assignment 1
FIT5225 2024 SM1
CloudDetect:
Creating and Deploying an Image Object Detection Web Service within a Containerised Environment in Clouds
1 Synopsis and Background
This project aims to build a web-based system that we call CloudDetect. It will allow end-users to send an image to a web service hosted by Docker containers and receive a list of objects detected in their uploaded image. The project will make use of the YOLO (You Only Look Once) library, a state-of-the- art real-time object detection system, and OpenCV (Open-Source Computer Vision Library) to perform the required image operations/transformations. Both YOLO and OpenCV are Python-based open-source computer vision and machine learning software libraries. The web service will be hosted as containers in a Kubernetes cluster. Kubernetes will be used as the container orchestration system. The object detection web service is also designed to be a RESTful API that can use Python’s Flask library. We are interested in examining the performance of CloudDetect by varying the rate of requests sent to the system (demand) using load generation tools like Locust and the number of existing Pods within the Kubernetes cluster (resources).
This assignment has the following objectives:
• Writing a python web service that accepts images in JSON object format, uses YOLO and OpenCV to process images, and returns a JSON object with a list of detected objects.
• Building a Docker Image for the object detection web service.
• Creating a Kubernetes cluster on virtual machines (instances) in the Oracle Cloud Infrastructure
(OCI).
• Deploying a Kubernetes service to distribute inbound requests among pods that are running the object detection service.
• Writing a load generation scripts using Loucust.
• Testing the system under varying load and number of pods conditions. You can focus on these objectives one after another to secure partial marks.
2 The web service - [10 Marks]
You are required to develop a RESTful API that allows clients to upload images to the server. You must use Flask to build your web service and any port over 1024. Your Flask server should be able to handle multiple clients concurrently. Each image should be sent to the web service using an HTTP POST request containing a JSON object with a unique ID (e.g. UUID) and a base64-encoded image. Since an
1

image is binary data, it cannot be directly inserted into JSON. You must convert the image into a textual representation that can then be used as a normal string. The most common way to encode an image into text is using the base64 method. A sample JSON request used to send an image could be as follows:
{
"id":"06e8b9e0-8d2e-11eb-8dcd-0242ac130003",
"image":"YWRzZmFzZGZhc2RmYXNkZmFzZGYzNDM1MyA7aztqMjUzJyBqaDJsM2 ..."
}
The web service creates a thread per request and uses YOLO and OpenCV python libraries to detect objects in the image. As a suggestion, you can begin with the image encoding part of the JSON message, consider developing your web service and testing it with basic Postman HTTP requests. Once you’ve confirmed that your web service functions correctly, you can proceed to create your client requests in accordance with the webservice API using Locust. For each image (request), your web service returns a JSON object with a list of all objects detected in that image as follows:
{
"id":"The id from the client request",
"objects": [
}
    {
    "label": "human/book/cat/...",
    "accuracy": a real number between 0-1,
    "rectangle": {
        "height": number,
        "left": number,
        "top": number,
        "width": number
} }
... ]
The “id” is the same id sent by the client along with the image. This is used to associate an asynchronous response with the request at the client-side. The “label” represents the type of object detected, e.g., cat, book, etc. “Accuracy” represents the precision in object detection and a rectangle is a JSON object showing the position of a box around the object in the image. A sample response is shown below:
{
"id": "2b7082f5-d31a-54b7-a46e-5e4889bf69bd",
"objects": [
    {
      "label": "book",
      "accuracy": 0.7890481352806091,
      "rectangle": {"height": 114, "left": 380, "top": 363, "width": 254}
}, {
      "label": "cat",
      "accuracy": 0.6877481352806091,
      "rectangle": {"height": 114, "left": 180, "top": 63, "width": 254}
}
2

] }
You are required to use the yolov3-tiny framework to develop a fast and reliable RESTful API for object detection. You will use pre-trained network weights, so there is no need to train the object detection program yourself1. We have provided the yolov3-tiny config file and weights in the yolo_tiny_configs.zip file. Note that this network is trained on the COCO dataset (http://cocodataset.org/#home). We have also provided you with a sample group of images (128 images in inputfolder in a zip file) from this dataset, and you should use them for testing2.
3 Dockerfile - [10 Marks]
Docker builds images by reading the instructions from a file known as Dockerfile. Dockerfile is a text file that contains all ordered commands needed to build a given image. You are required to create a Dockerfile that includes all the required instructions to build your Docker image. You can find Dockerfile reference documentation here: https://docs.docker.com/engine/reference/builder/.
To reduce complexity, dependencies, file sizes, and build times, avoid installing extra or unnecessary packages just because they might be “nice to have.” For example, you don’t need to include a text editor in your image. Optimisation of your Dockerfile while keeping it easy to read and maintain is important.
4 Kubernetes Cluster - [10 Marks]
You are tasked to install and configure a Kubernetes cluster on OCI VMs. For this purpose, you are going to install K8s on three VM instances on OCI (All your VM instances should be Intel machines, shape VM.Standard.E4.Flex, 8GB Memory and 4 OCPUs). You need to setup a K8s cluster with 1 controller and 2 worker nodes that run on OCI VMs. You need to install Docker engine on VMs. You should configure your K8s cluster with Kubeadm.
5 Kubernetes Service - [20 Marks]
After you have a running Kubernetes cluster, you need to create service and deployment configurations that will in turn create and deploy required pods in the cluster. The official documentation of Kubernetes contains various resources on how to create pods from a Docker image, set CPU and/or memory limitations and the steps required to create a deployment for your pods using selectors. Please make sure you set CPU request and CPU limit to “0.5” and memory request and limit to “512MiB” for each pod.
Initially, you will start with a single pod to test your web service and gradually increase the number as described in the Section 7. The preferred way of achieving this is by creating replica sets and scaling them accordingly.
Finally, you are required to expose your deployment to enable communication with the web service running inside your pods. You can make use of Service and NodePort to expose your deployment. You will need to call the object detection service from various locations as described in the next section. OCI restricts access to your VMs through its networking security measures. Therefore, you should ensure that your controller instance has all the necessary ports opened and that necessary network configurations,
1For your reference, a sample network weights for yolov3-tiny can be found at https://pjreddie.com/media/files/ yolov3-tiny.weights and required configuration files and more information can be found at https://github.com/ pjreddie/darknet and https://github.com/pjreddie/darknet/tree/master/cfg
2For your reference, the full COCO dataset can be found at http://images.cocodataset.org/zips/test2017.zip. 3
 
including OCI “Security Lists,” are properly set up. You may also need to open ports on instance-level firewall (e.g. firewall or iptables).
6 Locust load generation - [10 Marks]
Create a Locust script to simulate concurrent users accessing your RESTful API. Ensure the API can handle the load and respond promptly without crashing or experiencing significant delays. Your next task involves monitoring and recording relevant performance metrics such as response time, query per second (QPS), and error rate during load testing.
First, install Locust (if not already installed) and familiarize yourself with its documentation to create load-testing scenarios. Configure the Locust script to gradually increase the number of users and sustain load to identify potential bottlenecks. Your script should be able to send 128 images provided to the RESTful API deployed in the Kubernetes cluster.
Ensure the script encodes the images to base64 and embeds them into JSON messages as specified in Section 2 for seamless integration. note: you can reuse part of your client code developed in 2.
7 Experiments and Report - [40 Marks]
Your next objective is to test your system for the maximum load your service can handle under a different number of resources (pods) in your cluster. When the system is up and running, you will run experiments with various number of pods (available resources) in the cluster.
You need to conduct two sets of experiments: one where the Locust client runs locally on the master node of Kubernetes, and another where it runs on a VM instance in your pt-project in Nectar. The number of pods must be scaled to 1, 2, 4, and 8. Considering the limited CPU and Memory allocated to each pod (CPU request and limit: 0.5, memory request and limit: 512MiB), increasing the number of pods enhances resource accessibility.
Your goal is to determine the maximum number of concurrent users the system can handle before experiencing failures. To achieve this, vary the number of concurrent users in the Locust client to analyze the impact of increased load on the deployed service. You can set the spawn rate to a reasonable value to gradually increase the number of users for various pod configurations. For each trial, continuously send 128 images to the server in a loop until the response time stabilizes and the success rate remains at 100%.
The response time of a service is the duration between when an end-user makes a request and when a response is sent back. This data is automatically collected by Locust. When the first unsuccessful request occurs, note the maximum number of concurrent users, decrease by it by one, and record this number. Then rerun the experiment with the recorded number of concurrent users and a spawn rate of 1 user/second to ensure a 100% success rate.
Finally, report your results along with the average response time in table format, as shown below: Table 1: Experiment Results
   # of Pods
1 2 4 8
Max Users
Nectar
Avg. Response Time (ms)
Max Users
Master
Avg. Response Time (ms)
  Ensure to run each experiment multiple times to verify the correctness of your experiment and con- sistency of average response time values across various experiments. This is because network traffic and
4

some other environmental aspects might affect your experiments.
In your report, discuss this table and justify your observations. To automate your experimentation and
collect data points, you can write a script that automatically varies the parameters for the experiments and collects data points.
Your report must be a maximum 1500 words excluding your table and references. You need to include the following in your report:
• The table as explained above.
• Explanation of results and observations in your experiments (1000 words).
• Select three challenges of your choice from the list of distributed systems challenges discussed in the first week seminar, give a practical example from your project that illustrates that challenge and how it is addressed in your system (500 words).
Use 12pt Times font, single column, 1-inch margin all around. Put your full name, your tutor name, and student number at the top of your report.
8 Video Recording
You should submit a video recording and demonstrate your assignment. You should cover the following items in your Video Submission for this assignment:
• Web Service - (approx 2 minutes) Open the source code of your application and briefly explain your program’s methodology and overall architecture. Put emphasis on how web service is created, how JSON messages are created.
• Dockerfile - (approx 1 minute) Briefly explain your approach for containerising the application. Show your Dockerfile, explain it briefly.
• Kubernetes Cluster and Kubernetes Service - (approx 4 minutes)
1. Briefly discuss how did you install Docker and Kubernetes and mention which version of these tools are being used. Also mention that which networking module of Kuberentes is used in your setup and why?
2. List your cluster nodes (kubectl get nodes, using -o wide) and explain cluster-info.
3. Show your deployment YAML file and briefly explain it.
4. Show your service configuration file and briefly explain it.
5. Explain and show how your docker image is built and loaded in your Kubernetes cluster.
6. Show your VMs in OCI dashboard.
7. Show the public IP address of the controller node, and its security group. If you have VCN and subnets you can discuss them as well. Explain why you have configured your security groups and port(s).
8. For the 4 pods configuration, show that your deployment is working by listing your pods. Then show your service is working and can be reached from outside your controller VM by running the client code on your local computer.
9. Finally, show the log for pods to demonstrate load balancing is working as expected.
• Locust script - (approx 1 minutes) Explain your Locust client and show a quick demo.
5

9

• • • •
• • •
Technical aspects
Keep your setup up and running during the marking period, as we may access and test your service. Do not remove anything before the teaching team’s announcement. Make sure you provide the URL of your service endpoint in the ReadMe.txt.
You can use any programming language. Note that the majority of this project description is written based on Python.
Make sure you install all the required packages wherever needed. For example, python, Yolov3-tiny, opencv-python, flask, NumPy and etc.
When you are running experiments, do not use your bandwidth for other network activities, as it might affect your results.
Since failure is probable in cloud environments, make sure you will take regular backups of your work and snapshot of VMs.
Make sure your Kubernetes service properly distributes tasks between pods (check logs). Make sure you limit the CPU and memory for each pod (0.5 and 512MiB).
It’s important to ensure that your cluster is functioning correctly after each experiment and if rede- ployment might be necessary in some cases.
• Experiments - There is NO need for any discussion regarding this part in the video.
Caution: Please note that if you do not cover the items requested above in your video you will lose marks even if your code and configurations work properly.
Caution: Your video should be no longer than 8 minutes. Please note that any content exceeding this duration will result in penalties. Also, kindly refrain from adjusting the recording speed of your video to 1.5x or 2x. The examiners may penalize you if they are unable to follow your talk at a normal pace or understand the content of your presentation.
Recommendation: To ensure that you do not miss any important points in your video recording and stay on track with time, we recommend preparing a script for yourself beforehand. During the recording session, it can be helpful to refer to your script and read through it as needed. You should also prepare all the commands you need to copy paste before recoding.
10 Submission
You need to submit four files via Moodle:
• A report in PDF format as requested.
• A .ZIP file (not .RAR or other formats) containing the following:
1. Your Dockerfile.
2. Your web service source code.
3. Your Kubernetes deployment and service configurations (YAML files). 4. Your Locust Client script.
5. Any script that automates running experiments if you have one.
6

• A ReadMe.txt file with:
1. The URL to a 8-minute video demonstrating your system. You can use Google Drive,
Panopto, or YouTube, e.g., https://www.youtube.com/watch?v=8frmloR4gTY&t=7s.
2. The URL to your web service endpoint, e.g, http://118.138.43.2:5000/api/object detection.
Please make sure the video can be accessed by the teaching team (all tutors and the lecturer). If you would like to inform us regarding anything else you can use this ReadMe file.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

 

 

 

 

 

 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:代做CITS5508、代做 Python 語言程序
  • 下一篇:COMP282代做、C++設計程序代寫
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300
    一区二区三区免费网站| 美日韩一级片在线观看| 在线观看91精品国产入口| 亚洲视频在线观看三级| 91麻豆国产自产在线观看| 亚洲裸体xxx| 在线观看视频一区二区| 香蕉乱码成人久久天堂爱免费| 欧美日韩高清在线| 青青草国产精品97视觉盛宴| 精品欧美一区二区在线观看| 国产高清视频一区| 国产精品国产三级国产a| 一本一本大道香蕉久在线精品| 亚洲一区免费视频| 欧美一级一区二区| 国产精品中文字幕日韩精品 | 国产精品无遮挡| 91免费看视频| 天天操天天色综合| 精品av久久707| 成人动漫视频在线| 亚洲高清中文字幕| 欧美mv日韩mv国产网站app| 高清beeg欧美| 亚洲一二三四在线观看| 精品欧美乱码久久久久久1区2区| 国产成人免费在线| 一区二区三区不卡视频| 日韩午夜av一区| 岛国精品一区二区| 亚洲超丰满肉感bbw| 精品国产乱码久久久久久夜甘婷婷 | 亚洲一区在线观看免费观看电影高清| 欧美精品高清视频| 国产大陆亚洲精品国产| 亚洲综合色网站| 精品成人一区二区| 91国偷自产一区二区三区观看| 免费在线观看精品| 国产精品成人免费| 欧美一级日韩一级| av亚洲精华国产精华精华| 午夜精品在线视频一区| 久久老女人爱爱| 欧美亚洲动漫另类| 国产福利一区在线| 丝袜诱惑亚洲看片| 国产精品三级视频| 制服丝袜一区二区三区| 成人毛片老司机大片| 爽好久久久欧美精品| 国产精品美女久久久久久久久| 3d成人动漫网站| 成人激情小说乱人伦| 日本aⅴ亚洲精品中文乱码| 国产精品不卡一区二区三区| 日韩一区二区三区观看| 色天天综合色天天久久| 国产一区二区精品久久91| 亚洲一区二区三区四区中文字幕| 久久精品亚洲精品国产欧美 | 91麻豆精品国产| 99久久精品国产观看| 国内精品视频一区二区三区八戒| 亚洲综合偷拍欧美一区色| 久久久久高清精品| 欧美一区二区三区思思人| 99久久99久久免费精品蜜臀| 国产一区中文字幕| 午夜视频一区在线观看| 亚洲欧美激情在线| 国产嫩草影院久久久久| 精品久久一二三区| 欧美日韩另类一区| 一本到高清视频免费精品| 国产精品99久久久| 另类小说综合欧美亚洲| 亚洲二区在线观看| 亚洲欧美电影院| 国产精品素人视频| 久久久天堂av| 欧美成人video| 欧美疯狂做受xxxx富婆| 91久久人澡人人添人人爽欧美 | 国产成人免费视频网站高清观看视频 | 日本韩国精品在线| 99久久精品费精品国产一区二区| 国产高清不卡一区二区| 精品一区二区三区日韩| 日韩影院免费视频| 亚洲国产中文字幕在线视频综合| 国产精品激情偷乱一区二区∴| 久久久久久久综合色一本| 欧美大片在线观看一区二区| 欧美绝品在线观看成人午夜影视| 在线一区二区三区四区五区| 91碰在线视频| 99久久精品一区| 成人app在线观看| 国产精品性做久久久久久| 国产真实乱对白精彩久久| 久久国产精品区| 美女www一区二区| 奇米影视7777精品一区二区| 视频一区视频二区在线观看| 亚洲国产成人va在线观看天堂| 一区二区三区四区五区视频在线观看| 中文字幕视频一区| 日韩一区在线免费观看| 成人免费一区二区三区视频| 国产精品久久久久永久免费观看 | 欧美一区二区三区四区五区| 在线播放欧美女士性生活| 911精品产国品一二三产区| 欧美军同video69gay| 91精品国产综合久久精品| 欧美一区日韩一区| 日韩欧美中文字幕公布| 精品久久人人做人人爰| 精品国产乱码久久| 久久久不卡网国产精品一区| 久久精品水蜜桃av综合天堂| 亚洲国产精品传媒在线观看| 国产精品青草久久| 亚洲欧美自拍偷拍| 一区二区三区毛片| 亚洲超碰97人人做人人爱| 青娱乐精品在线视频| 精品午夜久久福利影院| 国产成人午夜精品5599| 成人高清在线视频| 色综合色综合色综合 | 欧美一级黄色大片| 精品国产一区二区亚洲人成毛片 | 国产69精品久久久久777| 不卡的av电影| 日本韩国精品在线| 56国语精品自产拍在线观看| 欧美成人免费网站| 国产清纯白嫩初高生在线观看91| 亚洲欧洲美洲综合色网| 亚洲一卡二卡三卡四卡无卡久久| 日本免费在线视频不卡一不卡二| 精品一区二区三区免费观看 | 成人免费视频caoporn| 色综合久久88色综合天天免费| 精品视频一区二区不卡| 日韩视频免费直播| 国产日韩欧美麻豆| 亚洲美女淫视频| 日韩不卡一区二区三区| 国产精品一色哟哟哟| 91在线无精精品入口| 欧美日本乱大交xxxxx| 精品国产91乱码一区二区三区| 国产精品久久夜| 午夜国产精品影院在线观看| 狠狠久久亚洲欧美| 91捆绑美女网站| 日韩视频在线永久播放| 国产精品免费人成网站| 亚洲小少妇裸体bbw| 精品一区二区三区免费播放| 99国产欧美另类久久久精品| 欧美另类videos死尸| 久久精品亚洲国产奇米99| 亚洲国产一区二区三区| 国产一区二区三区视频在线播放| 91毛片在线观看| 91精品国产欧美一区二区成人| 中文字幕欧美区| 亚洲h精品动漫在线观看| 国产成人精品亚洲777人妖| 欧美艳星brazzers| 久久久久久久久久久电影| 亚洲夂夂婷婷色拍ww47| 国产精品一区二区在线看| 在线观看免费视频综合| 久久奇米777| 亚洲夂夂婷婷色拍ww47 | 9l国产精品久久久久麻豆| 欧美一区二区大片| 亚洲婷婷综合色高清在线| 久久精品国产亚洲a| 91国内精品野花午夜精品| 久久久91精品国产一区二区精品 | 久久精品国产精品亚洲综合| 色综合网站在线| 26uuuu精品一区二区| 亚洲国产精品久久不卡毛片 | 日韩精品国产欧美| 99riav久久精品riav| 26uuu精品一区二区| 亚洲国产日韩一级| jizz一区二区| 久久伊人中文字幕| 日韩电影在线看| 色88888久久久久久影院野外| 国产亚洲精品中文字幕|