This project was bootstrapped with Create React App.
trimmedVideo.mp4
Run npm install
to install dependencies.
Aditionally, you must have env-cmd
installed gobally (npm i -g env-cmd
)
Run npm start
to start the app in dev mode. Open http://localhost:3000 to view it in the
browser.
@Todo: Describe necessary roles.
Add a .env file to the root directory of this project, it must have this shape:
REACT_APP_AWS_REGION = <your region>
REACT_APP_AWS_ACCESS_KEY_ID = <your user access key>
REACT_APP_AWS_SECRET_ACCESS_KEY = <your user secret access key>
REACT_APP_AWS_MODEL_ARN = <the ARN for your trained model (optional)
Several helper functions were added to aid and make execution more efficient.
These functions are available in the window
scope.
You must call this function if you want to use custom labeling. From experience, call this functin 20 mins before you need the model.
After you finish working with custom label modeling, turn of the model so it doesnt over-charge you account.
When window.useCustomLabels
is set to true
the rekognition sdk will use DetectLabelsCommand
instead of DetectCustomLabelsCommand
.
When window.frameBuffering
is set to true
, when the video is being played the current and last frames will be
renedred on screen. When it's not, only the current frames will be rendered.
This function returns the timestamped frame object. You can store this somewhere (for example clipboard or another file)
to load the frames later on with window.loadFramesFromMem(frames)
This function sets the timestamped frame object to whatever is sent as an argument.
This function signals the app to skip the frame capturing process. This means that it will not capture frames from the video nor send them to Rekognition for processing.
This function pauses/resumes the execution of the video. This can also pause during frame analysis and frame display
Restarts the video duration and starts play
This function sets the timestamped frame object to whatever is sent as an argument.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify