- Newest
- Most votes
- Most comments
Hi, there are multiple ways to achieve what you are looking for. The one I would advise for is the following:
- Deploy AWS IoT Greengrass core on Computer A
- Deploy a component on Computer A that accesses the camera and perform object detection on the frames captured from the camera. You can capture video or frames via OpenCV. The user on Computer A will likely need to allow the application to use the webcam
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
# 1. perform object detection on frame
# 2. annotate the image and write it to file
# 3. upload the file to S3
cap.release()
cv2.destroyAllWindows()
- Upload the frames with the object detection annotations to an S3 bucket, eg using the StreamManager component or uploading directly to S3 via an AWS SDK
- Write an authenticated API to access the annotated frames from the S3 bucket
- Write a react application hosted on S3+CloudFront (you can use AWS Amplify) [1]. The application access the API to retrieve the annotated frames. You might also consider adding user authentication to restrict who has access to the application
- From computer B, a user opens the browser to the application URL, authenticates, and access the image frames
If the analysis of the frames is performed only when user on computer B performs an action, you might need to add a command and control feature to your solution, for example using AWS IoT.
Useful links: [1] https://aws.amazon.com/blogs/mobile/build-a-photo-gallery-react-app-using-amplify-studios-new-file-storage-capabilities/
It is possible to use AWS IoT Greengrass to deploy a real-time object detection application that uses the webcam of computer A and displays the results on the monitor of computer B. Here's a high-level overview of how you can achieve this:
-
Connect the webcam of computer A to the internet and make sure it is accessible via a network URL or IP address.
-
Create an AWS IoT Greengrass group and a core device.
-
Create a Greengrass Lambda function that uses the webcam of computer A as its video source. The function should use a library such as OpenCV or TensorFlow to perform real-time object detection on the video stream.
-
Create another Lambda function that receives the object detection results from the first function and displays them on the monitor of computer B. This function can use a library such as PyQt or OpenCV to display the results on the monitor.
-
Deploy the Greengrass group and the Lambda functions to the core device.
-
Configure the Lambda functions to communicate with each other using the Greengrass messaging API.
-
Test the application by running the object detection Lambda function and checking that the results are displayed on the monitor of computer B.
Relevant content
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
Is there any workshop or example code? Thank you!