Video recording based on object tracking
In accordance with one disclosed method, a computing device may determine that a plurality of frames of image data represent an object of a first type and may further determine at least first and second parameters indicative of first and second positions of a bounding box of the object within first and second frames, respectively. The computing device may calculate, using at least the first parameter and the second parameter, a rate at which a position of the bounding box is moving from frame to frame within the plurality of frames and may determine a variable that is based at least in part on the rate. Based at least in part on the variable satisfying a criterion, the computing device may cause acquired video to be recorded in a datastore.
1 . A method, comprising:
determining, by a computing device and by performing object recognition processing on a plurality of frames of image data, that the plurality of frames represent an object of a first type, the plurality of frames including at least first and second frames;
determining, by the computing device, at least first and second parameters indicative of first and second positions of a bounding box of the object within the first and second frames, respectively;
determining, by the computing device and using at least the first parameter and the second parameter, a variable indicative of an amount of movement of the object;
determining, by the computing device, that the variable satisfies a first criterion; and
causing, by the computing device and based at least in part on the variable satisfying the first criterion, acquired video to be recorded in a datastore.
2 . The method of claim 1 , wherein:
the plurality of frames further includes a third frame;
the method further comprises determining, by the computing device, a third parameter indicative of a third position of the bounding box of the object within the third frame;
determining the variable includes determining, using at least the first parameter, the second parameter, and the third parameter, a total distance traveled by the object throughout the plurality of frames; determining that the variable satisfies the first criterion includes determining that the total distance traveled exceeds a threshold distance value; and
causing the acquired video to be recorded in the datastore is further based at least in part on the total distance traveled exceeding the threshold distance value.
3 . The method of claim 1 , wherein:
the plurality of frames further includes a third frame;
the method further comprises determining, by the computing device, a third parameter indicative of a third position of the bounding box of the object within the third frame;
determining the variable includes determining, using at least the first parameter, the second parameter, and the third parameter, a total displacement of the object throughout the plurality of frames;
determining that the variable satisfies the first criterion includes determining that the total displacement exceeds a threshold displacement value; and
causing the acquired video to be recorded in the datastore is further based at least in part on the total displacement exceeding the threshold displacement value.
4 . The method of claim 1 , wherein determining the first and second parameters includes processing the first and second frames using a machine learning model to determine first coordinates of a first bounding box around the object in the first frame and second coordinates of a second bounding box around the object in the second frame.
5 . The method of claim 1 , wherein determining the variable includes:
determining, using at least the first parameter and the second parameter, at least one first rate at which a position of the bounding box is changing from frame to frame within the plurality of frames; and
determining the variable based at least on part on the at least one first rate.
6 . The method of claim 5 , further comprising:
determining, by the computing device, at least third and fourth parameters indicative of first and second sizes of a bounding box of the object within the first and second frames, respectively; and
determining, by the computing device and using at least the third parameter and the fourth parameter, at least one second rate at which a size of the bounding box is changing from frame to frame within the plurality of frames;
wherein determining the variable includes determining the variable further based at least in part on the at least one second rate.
7 . The method of claim 6 , wherein:
determining the first and second parameters includes processing the first and second frames using a machine learning model to determine first coordinates of a first bounding box around the object in the first frame and second coordinates of a second bounding box around the object in the second frame; and
determining the third and fourth parameters includes processing the first and second frames using the machine learning model to determine a first size of the first bounding box around the object in the first frame and a second size of the second bounding box around the object in the second frame.
8 . The method of claim 7 , wherein:
determining the at least one first rate includes processing at least the first coordinates and the second coordinates to determine a first velocity at which the bounding box is moving in vertical direction and a second velocity at which the bounding box is moving in a horizontal direction; and
determining the at least one second rate includes processing at least the first size and the second size to determine the at least one second rate.
9 . The method of claim 8 , wherein determining the variable includes combining a first variable representing the first velocity, a second variable representing the second velocity, and a third variable representing the at least one second rate to determine the variable.
10 . A method, comprising:
determining, by a computing device, and by performing object recognition processing on a plurality of frames of image data, that the plurality of frames represent an object of a first type, the plurality of frames including at least first and second frames;
determining, by the computing device, at least first and second parameters indicative of first and second sizes of a bounding box of the object within the first and second frames, respectively;
determining, by the computing device and using at least the first parameter and the second parameter, a variable indicative of an amount of movement of the object;
determining, by the computing device, that the variable satisfies a first criterion; and
causing, by the computing device and based at least in part on the variable satisfying the first criterion, acquired video to be recorded in a datastore.
11 . The method of claim 10 , wherein determining the first and second parameters includes processing the first and second frames using a machine learning model to determine a first size of a first bounding box around the object in the first frame and a second size of a second bounding box around the object in the second frame.
12 . The method of claim 10 , wherein determining the variable includes:
determining, using at least the first parameter and the second parameter, at least one rate at which a size of the bounding box is changing from frame to frame within the plurality of frames; and
determining the variable based at least in part on the at least one rate.
13 . A system, comprising:
one or more processors; and
one or more computer-readable mediums encoded with instructions which, when executed by the one or more processors, cause the system to:
determine, by performing object recognition processing on a plurality of frames of image data, that the plurality of frames represent an object of a first type, the plurality of frames including at least first and second frames;
determine at least first and second parameters indicative of first and second positions of a bounding box of the object within the first and second frames, respectively;
determine, using at least the first parameter and the second parameter, a variable indicative of an amount of movement of the object;
determine that the variable satisfies a first criterion; and
cause, based at least in part on the variable satisfying the first criterion, acquired video to be recorded in a datastore.
14 . The system of claim 13 , wherein the plurality of frames further includes a third frame, and the one or more computer-readable mediums are further encoded with additional instructions which, when executed by the one or more processors, further cause the system to:
determine a third parameter indicative of a third position of the bounding box of the object within the third frame;
determine the variable at least in part by determining, using at least the first parameter, the second parameter, and the third parameter, a total distance traveled by the object throughout the plurality of frames;
determine that the variable satisfies the first criterion at least in part by determining that the total distance traveled exceeds a threshold distance value; and
cause the acquired video to be recorded in the datastore further based at least in part on the total distance traveled exceeding the threshold distance value.
15 . The system of claim 13 , wherein the plurality of frames further includes a third frame, and the one or more computer-readable mediums are further encoded with additional instructions which, when executed by the one or more processors, further cause the system to:
determine a third parameter indicative of a third position of the bounding box of the object within the third frame;
determine the variable at least in part by determining, using at least the first parameter, the second parameter, and the third parameter a total displacement of the object throughout the plurality of frames;
determine that the variable satisfies the first criterion at least in part by determining that the total displacement exceeds a threshold displacement value; and
cause the acquired video to be recorded in the datastore further based at least in part on the total displacement exceeding the threshold displacement value.
16 . The system of claim 13 , wherein the one or more computer-readable mediums are further encoded with additional instructions which, when executed by the one or more processors, further cause the system to determine the variable at least in part by:
determining, using at least the first parameter and the second parameter, at least one first rate at which a position of the bounding box is changing from frame to frame within the plurality of frames; and
determining the variable based at least on part on the at least one first rate.
17 . The system of claim 16 , wherein the one or more computer-readable mediums are further encoded with additional instructions which, when executed by the one or more processors, further cause the system to:
determine at least third and fourth parameters indicative of first and second sizes of a bounding box of the object within the first and second frames, respectively; and
determine, using at least the third parameter and the fourth parameter, at least one second rate at which a size of the bounding box is changing from frame to frame within the plurality of frames.
18 . The system of claim 17 , wherein the one or more computer-readable mediums are further encoded with additional instructions which, when executed by the one or more processors, further cause the system to:
determine the first and second parameters at least in part by processing the first and second frames using a machine learning model to determine first coordinates of a first bounding box around the object in the first frame and second coordinates of a second bounding box around the object in the second frame; and
determine the third and fourth parameters at least in part by processing the first and second frames using the machine learning model to determine a first size of the first bounding box around the object in the first frame and a second size of the second bounding box around the object in the second frame.
19 . The system of claim 18 , wherein the one or more computer-readable mediums are further encoded with additional instructions which, when executed by the one or more processors, further cause the system to:
determine the at least one first rate at least in part by processing at least the first coordinates and the second coordinates to determine a first velocity at which the bounding box is moving in vertical direction and a second velocity at which the bounding box is moving in a horizontal direction; and
determine the at least one second rate at least in part by processing at least the first size and the second size to determine the at least one second rate.
20 . The system of claim 19 , wherein the one or more computer-readable mediums are further encoded with additional instructions which, when executed by the one or more processors, further cause the system to:
determine the variable at least in part by combining a first variable representing the first velocity, a second variable representing the second velocity, and a third variable representing the at least one second rate to determine the variable.