Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
IMAGE BASED TRACKING SYSTEM
Document Type and Number:
WIPO Patent Application WO/2022/204153
Kind Code:
A1
Abstract:
Disclosed herein are systems and methods for image-based tracking of an object. In some embodiments, a method comprises receiving frames captured with a video camera. In some embodiments, the method comprises identifying, using a model, foreground pixels in a frame captured with the video camera, the foreground pixels corresponding to an identified foreground object. In some embodiments, the method comprises tracking the foreground object using the model.

Inventors:
KONAKALLA SAI (US)
THELI SATYA (US)
MEYER DOMINIQUE (US)
Application Number:
PCT/US2022/021354
Publication Date:
September 29, 2022
Filing Date:
March 22, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ANGARAK INC (US)
International Classes:
G06V20/05; G06V20/50; G06V20/52
Domestic Patent References:
WO2002097758A12002-12-05
WO2021146617A12021-07-22
Foreign References:
US20190034712A12019-01-31
US9104914B12015-08-11
US20160292495A12016-10-06
US20040175040A12004-09-09
Attorney, Agent or Firm:
KWOK, Tony et al. (US)
Download PDF:
Claims:
CLAIMS

1. A method, comprising: receiving frames captured with a video camera; for each frame captured with the video camera, identifying, using a model, first foreground pixels in the frame, wherein the identified first foreground pixels correspond to an identified foreground object; tracking, using the model, each identified foreground object; and identifying, without using the model, second foreground pixels in the frame, wherein the identified second foreground pixels correspond to the identified foreground object.

2. The method of claim 1, further comprising tracking, using an object tracking algorithm, a foreground object.

3. The method of claim 2, further comprising determining whether the model is tracking the foreground object, wherein: in accordance with a determination that the foreground object is not tracked using the model, the foreground object is tracked using the object tracking algorithm; and in accordance with a determination that the foreground object is tracked using the model, the foreground object continues to be tracked using the model.

4. The method of claim 2, wherein the object tracking algorithm is Kalman tracking, optical flow method, Lucas-Kanade Algorithm, Horn-Schunck method, or Black- Jepson method.

5. The method of claim 1, wherein the model is a pre-trained supervised model, deep learning model, an Artificial Neural Network (ANN) model, a Random Forest (RF) model, a Convolutional Neural Network (CNN) model, a Hierarchical extreme learning machine (H-ELM) model, a Local binary patterns (LBP) model, a Scale- Invariant Feature Transform (SIFT) model, a Histogram of gradient (HOG) model, a Fastest Pedestrian Detector of the West (FPDW) model, or a Stochastic Gradient Descent (SGD) model.

6. The method of claim 1, wherein the frames comprise a view of an area, the method further comprising defining a virtual boundary, wherein the virtual boundary surrounds the area.

7. The method of claim 1, wherein the frames comprise a view of a swimming pool.

8. The method of claim 1, wherein the each foreground object is a swimmer, the method further comprising, based on the identified foreground pixels, tagging the swimmer in the frame with a respective identifier.

9. The method of claim 1, further comprising: determining whether a criterion is met for a foreground object; in accordance with a determination that the criterion is met for the foreground object, generating a detection signal indicating an event occurrence associated with the foreground object; and in accordance with a determination that the criterion is not met for the foreground object, forgoing generating the detection signal.

10. The method of claim 1, further comprising updating a counter associated with the second identified object.

11. The method of claim 1, further comprising updating a counter associated with the identified object.

12. The method of claim 1, further comprising updating a counter associated with a non foreground object.

13. A system, comprising: a video camera; a processor and a memory; and a program stored in the memory, configured to be executed by the processor, and including instructions for performing the method of any of claim 1-12.

4. A non-transitory computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by an electronic device with one or more processors and memory, cause the device to perform the method of any of claim 1-12.

Description:
IMAGE BASED TRACKING SYSTEM

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the priority benefit of U.S. Provisional Application No. 63/164,348, filed on March 22, 2021, the disclosure of which is hereby incorporated herein by reference in its entirety.

FIELD

[0002] This disclosure generally relates to an image based tracking system. More specifically, this disclosure relates to image based systems and methods for tracking an object.

BACKGROUND

[0003] Tracking an object of interest in an area may be difficult, especially in areas such as underwater due to the natural distortion created. For example, reducing, avoiding, or preventing death and/or serious injury from drowning in a swimming pool may be difficult due to lack of supervision by the pool or due to distraction during manually monitoring swimmers in a swimming pool (e.g., with a lifeguard, with a safety personnel, with a guardian). It may be difficult to continuously and accurately monitor a swimming pool to reduce the risk of drowning or identify risky behavioral swimming (e.g., doggy paddling, bobbing, underwater swimming) because near-drowning and drowning may happen silently and may rarely involves thrashing, shouting, and yelling. Solutions exist that may help reduce this risk by assisting the human lifeguard in commercial cases, but they may be costly (e.g., high hardware cost, high cost of installation, long installation time), not sufficiently accurate (e.g., high false alarm rates), or both. Moreover, solutions exist that may help reduce this risk by assisting the residential pool owners but these solutions may either suffer with high false alarm rates (floating alarms, motion sensors, door alarms, etc.) or be late to detect drowning (underwater pool alarms - that detect when the object is at the bottom of the pool and motionless). Security cameras using passive infrared sensors for motion detection may be limited to motion alerts and may either not track objects accurately. More generally, conditions (e.g., water splash, precipitation, poor lighting) in an area (e.g., a swimming pool, a resident, a business, an area being monitored) may cause identification of an object (e.g., human, animal) more difficult. If an object is not identified, tracking the object and determining occurrence of an event associated with the object may become more difficult.

BRIEF SUMMARY

[0004] Disclosed herein are systems and methods for image -based tracking of an object.

[0005] In some embodiments, a method includes: receiving frames captured with a video camera; for each frame captured with the video camera, identifying, using a model, foreground pixels in the frame, wherein the identified foreground pixels correspond to an identified foreground object; and tracking, using the model, each identified foreground object.

[0006] In some embodiments, the method further includes tracking, using an object tracking algorithm, a foreground object.

[0007] In some embodiments, the method further includes determining whether the model is tracking the foreground object. In accordance with a determination that the foreground object is not tracked using the model, the foreground object is tracked using the object tracking algorithm; and in accordance with a determination that the foreground object is tracked using the model, the foreground object continues to be tracked using the model.

[0008] In some embodiments, the object tracking algorithm is Kalman tracking, optical flow method, Lucas-Kanade Algorithm, Horn-Schunck method, or Black-Jepson method.

[0009] In some embodiments, the model is a pre-trained supervised model, deep learning model, an Artificial Neural Network (ANN) model, a Random Forest (RF) model, a Convolutional Neural Network (CNN) model, a Hierarchical extreme learning machine (H- EFM) model, a Focal binary patterns (EBP) model, a Scale-Invariant Feature Transform (SIFT) model, a Histogram of gradient (HOG) model, a Fastest Pedestrian Detector of the West (FPDW) model, or a Stochastic Gradient Descent (SGD) model.

[0010] In some embodiments, the frames comprise a view of an area, the method further comprising defining a virtual boundary, wherein the virtual boundary surrounds the area.

[0011] In some embodiments, the frames comprise a view of a swimming pool. [0012] In some embodiments, the each foreground object is a swimmer, the method further comprising, based on the identified foreground pixels, tagging the swimmer in the frame with a respective identifier.

[0013] In some embodiments, the method further includes: determining whether a criterion is met for a foreground object; in accordance with a determination that the criterion is met for the foreground object, generating a detection signal indicating an event occurrence associated with the foreground object; and in accordance with a determination that the criterion is not met for the foreground object, forgoing generating the detection signal.

[0014] In some embodiments, the method further includes identifying, without using the model, second foreground pixels in the frame, wherein the identified second foreground pixels correspond to identified a second identified foreground object.

[0015] In some embodiments, the first identified foreground object is the second identified foreground object.

[0016] In some embodiments, the method further includes updating a counter associated with the second identified object.

[0017] In some embodiments, the method further includes updating a counter associated with the identified object.

[0018] In some embodiments, the method further includes updating a counter associated with a non-foreground object.

[0019] In some embodiments, a system includes: a video camera; a processor and a memory; and a program stored in the memory, configured to be executed by the processor, and including instructions for performing any of the above methods.

[0020] In some embodiments, a non-transitory computer readable storage medium stores one or more programs, the one or more programs including instructions, which when executed by an electronic device with one or more processors and memory, cause the device to perform any of the above methods.

[0021] In some embodiments, a system, comprises: a video camera configured to capture frames of a swimming pool; a computing system configured to communicate with the camera and including a processor and memory; and a program stored in the memory, configured to be executed by the processor, and including instructions for: receiving the frames captured with the video camera; for each frame captured with the video camera, identifying: interior pool pixels associated with an interior region of the swimming pool in the frame, the interior pool region including a water area of the swimming pool, background pixels in the frame, foreground pixels in the frame, wherein the foreground pixels correspond to detected foreground objects, and swimming pool information associated with objects in the frame; based on the identified background pixels, foreground pixels, and swimming pool information: forming a block for each swimmer in the foreground pixels, and tagging each swimmer in the frame with a respective identifier; tracking each swimmer by using image tracking and motion prediction algorithms on the formed blocks; determining, based on the swimming pool information and the image tracking and motion prediction algorithms whether a criterion is met for a tracked swimmer; and in accordance with a determination that the criterion is met for the tracked swimmer, generating a detection signal indicating an event associated with the tracked swimmer.

[0022] In some embodiments, the instructions further comprise: determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information; detecting a swimmer leaving or entering the interior pool region; updating the number of swimmers based on the swimmer detection; determining that the swimmer entered the interior pool region after a predetermined amount of time; and in accordance with the determination that the swimmer entered the interior pool region after the predetermined amount of time, tagging the swimmer with an identifier; and in response to detecting the swimmer leaving the interior pool region, untagging the swimmer.

[0023] In some embodiments, the instructions further comprise determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, and the criterion is met when a number of detected foreground objects is less than the number of swimmers.

[0024] In some embodiments, the instructions further comprise determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, and the number of swimmers is a number of detected foreground objects.

[0025] In some embodiments, the criterion includes at least one of swimmer speed, swimmer posture, a splash threshold, an activity threshold, a submergence threshold, a submergence variance, and swimmer vertical movement.

[0026] In some embodiments, the criterion dynamically updates based on a depth corresponding to the swimmer’s position in the swimming pool. [0027] In some embodiments, the criterion dynamically updates based a distance of the swimmer from the camera.

[0028] In some embodiments, the criterion dynamically updates based on a surrounding brightness of a camera view.

[0029] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise: learning behaviors of the tracked swimmers; and updating the criterion emphasis factors of the tracked swimmers based on the learned behaviors.

[0030] In some embodiments, the instructions further comprise generating an alert associated with the event in response to the generated detection signal.

[0031] In some embodiments, the system further comprises a wearable device, wherein the instructions further comprise transmitting the generated alert to the wearable device.

[0032] In some embodiments, the computing system comprises a user interface, and the instructions further comprise: selecting, on the user interface, an activity in the swimming pool; and updating the criterion based on the selected activity.

[0033] In some embodiments, the computing system comprises a user interface, and determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise: selecting, on the user interface, a behavior of a tracked swimmer; and adjusting the criterion emphasis factors of the tracked swimmer based on the selected behavior.

[0034] In some embodiments, the instructions further comprise: tracking a history of the swimming pool; learning site attributes of the swimming pool based on the history; and updating the criterion based on the learned site attributes.

[0035] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise: determining whether the swimming pool is a first type of swimming pool or a second type of swimming pool; in accordance with a determination that the swimming pool is the first type, setting the criterion emphasis factors of the tracked swimmers based on a first preset; and in accordance with a determination the swimming pool is the second type, setting the criterion emphasis factors of the tracked swimmers based on a second preset.

[0036] In some embodiments, the receiving of the frames with the video camera and the identifying of the interior pool pixels, the background pixels, the foreground pixels, and the swimming pool information are performed concurrently.

[0037] In some embodiments, identifying the interior pool pixels, the background pixels and the foreground pixels further comprises identifying at least one of shape, size, color, and geometry of objects in the interior pool pixels, the background pixels and the foreground pixels.

[0038] In some embodiments, the system further comprises solar panels configured to charge the camera.

[0039] In some embodiments, the instructions further comprise storing the captured frames in the computing system.

[0040] In some embodiments, the computing system and the camera are configured to communicate wirelessly.

[0041] In some embodiments, the receiving of the frames with the video camera includes using one of real time streaming protocol (RTSP), HTTP, HTTPS, and SDP.

[0042] In some embodiments, the computing system is one of AI processor, cloud computing platform, a processor with AI and video/graphics booster technology having sufficient computation power and processing speed, a fast computing platform, and a parallel computing platform.

[0043] In some embodiments, the forming of the block for each swimmer comprises determining whether the block includes at least a threshold amount of foreground pixels.

[0044] In some embodiments, the instructions further comprises: identifying a difference between the background pixels at a first time and the background pixels at a second time, and dynamically updating the criterion based on the difference.

[0045] In some embodiments, the image tracking and motion prediction algorithms include at least one of Lucas-Kanade algorithm, Optical Flow Method, particle tracking, and Black-Jepson method. [0046] In some embodiments, a first block associated with a first swimmer and a second block associated with a second swimmer at least partially overlap and form a third block, and the forming of the cluster of each swimmer further comprises using: a hierarchical k-means clustering algorithm to separate the first and second clusters, a Markov Random Field (MRF) to form the first and second clusters based on the identified background pixels, foreground pixels, and swimming pool information, and a linear prediction scheme to determine centroids of each swimmer by predicting direction and location of the swimmer.

[0047] In some embodiments, the instructions further comprise updating the criterion based on a user input.

[0048] In some embodiments, the instructions further comprise updating the criterion based on at least one of a Monte-Carlo simulation, user data, neural network data, and random forest data.

[0049] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise updating the criterion emphasis factors of the tracked swimmer based on at least one of a Monte-Carlo simulation and user data.

[0050] In some embodiments, the determination of whether a criterion is met for the tracked swimmer is further based on a probabilistic model.

[0051] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise determining whether the tracked swimmer is moving relative to a center of the tracked swimmer; in accordance with a determination that the tracked swimmer is moving relative to the center of the tracked swimmer, updating the criterion emphasis factors of the tracked swimmers; and in accordance with a determination that the tracked swimmer is not moving relative to the center of the tracked swimmer, forgoing updating the criterion emphasis factors of the tracked swimmers.

[0052] In some embodiments, the instructions further comprise determining the tracked swimmer is an animal based on at least a size, geometry, and movement of the animal, and in accordance with a determination that the tracked swimmer is the animal, the criterion is met. [0053] In some embodiments, a method comprises: capturing, with a video camera, frames of a swimming pool; receiving the frames captured with the video camera; for each frame captured with the video camera, identifying: interior pool pixels associated with an interior region of the swimming pool in the frame, the interior pool region including a water area of the swimming pool, background pixels in the frame, foreground pixels in the frame, wherein the foreground pixels corresponds to detected foreground objects, and swimming pool information associated with objects in the frame; based on the identified background pixels, foreground pixels, and swimming pool information: forming a block for each swimmer in the foreground pixels, and tagging each swimmer in the frame with a respective identifier; tracking each swimmer by using image tracking and motion prediction algorithms on the formed blocks; determining, based on the swimming pool information and the image tracking and motion prediction algorithms whether a criterion is met for a tracked swimmer; and in accordance with a determination that the criterion is met for the tracked swimmer, generating a detection signal indicating an event associated with the tracked swimmer.

[0054] In some embodiments, the method further comprises determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information; detecting a swimmer leaving or entering the interior pool region; updating the number of swimmers based on the swimmer detection; determining that the swimmer entered the interior pool region after a predetermined amount of time; and in accordance with the determination that the swimmer entered the interior pool region after the predetermined amount of time, tagging the swimmer with an identifier; and in response to detecting the swimmer leaving the interior pool region, untagging the swimmer.

[0055] In some embodiments, the method further comprises determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, wherein the criterion is met when a number of detected foreground objects is less than the number of swimmers.

[0056] In some embodiments, the method further comprises determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, wherein the number of swimmers is a number of detected foreground objects.

[0057] In some embodiments, the criterion includes at least one of swimmer speed, swimmer posture, a splash threshold, an activity threshold, a submergence threshold, a submergence variance, and swimmer vertical movement. [0058] In some embodiments, the method further comprises dynamically updating the criterion based on a depth corresponding to the swimmer’s position in the swimming pool.

[0059] In some embodiments, the method further comprises dynamically updating the criterion based a distance of the swimmer from the camera.

[0060] In some embodiments, the method further comprises dynamically updating the criterion based on a surrounding brightness of a camera view.

[0061] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises: learning behaviors of the tracked swimmers; and updating the criterion emphasis factors of the tracked swimmers based on the learned behaviors.

[0062] In some embodiments, the method further comprises generating an alert associated with the event in response to the generated detection signal.

[0063] In some embodiments, the method further comprises transmitting the generated alert to a wearable device.

[0064] In some embodiments, the computing system comprises a user interface, and the method further comprises: selecting, on the user interface, an activity in the swimming pool; and updating the criterion based on the selected activity.

[0065] In some embodiments, the method further comprises determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer; selecting, on a user interface, a behavior of a tracked swimmer; and adjusting the criterion emphasis factors of the tracked swimmer based on the selected behavior.

[0066] In some embodiments, the method further comprises tracking a history of the swimming pool; learning site attributes of the swimming pool based on the history; and updating the criterion based on the learned site attributes.

[0067] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises: determining whether the swimming pool is a first type of swimming pool or a second type of swimming pool; in accordance with a determination that the swimming pool is the first type, setting the criterion emphasis factors of the tracked swimmers based on a first preset; and in accordance with a determination the swimming pool is the second type, setting the criterion emphasis factors of the tracked swimmers based on a second preset.

[0068] In some embodiments, the receiving of the frames with the video camera and the identifying of the interior pool pixels, the background pixels, the foreground pixels, and the swimming pool information are performed concurrently.

[0069] In some embodiments, identifying the interior pool pixels, the background pixels and the foreground pixels further comprises identifying at least one of shape, size, color, and geometry of objects in the interior pool pixels, the background pixels and the foreground pixels.

[0070] In some embodiments, the method further comprises using solar panels to charge the camera.

[0071] In some embodiments, the method further comprises storing the captured frames in a computing system.

[0072] In some embodiments, the computing system and the camera are configured to communicate wirelessly.

[0073] In some embodiments, wherein the computing system is one of AI processor, cloud computing platform, a processor with AI and video/graphics booster technology having sufficient computation power and processing speed, a fast computing platform, and a parallel computing platform.

[0074] In some embodiments, the receiving of the frames with the video camera includes using one of RTSP, HTTP, HTTPS, and SDP.

[0075] In some embodiments, the forming of the block for each swimmer comprises determining whether the block includes at least a threshold amount of foreground pixels.

[0076] In some embodiments, the method further comprises identifying a difference between the background pixels at a first time and the background pixels at a second time, and dynamically updating the criterion based on the difference.

[0077] In some embodiments, the image tracking and motion prediction algorithms include at least one of Lucas-Kanade algorithm, Optical Flow Method, particle tracking, and Black-Jepson method. [0078] In some embodiments, a first block associated with a first swimmer and a second block associated with a second swimmer at least partially overlap and form a third block, and the forming of the cluster of each swimmer further comprises using: a hierarchical k-means clustering algorithm to separate the first and second clusters, a Markov Random Field (MRF) to form the first and second clusters based on the identified background pixels, foreground pixels, and swimming pool information, and a linear prediction scheme to determine centroids of each swimmer by predicting direction and location of the swimmer.

[0079] In some embodiments, the method further comprises updating the criterion based on a user input.

[0080] In some embodiments, the method further comprises updating the criterion based on at least one of a Monte-Carlo simulation, user data, neural network data, and random forest data.

[0081] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises updating the criterion emphasis factors of the tracked swimmer based on at least one of a Monte-Carlo simulation and user data.

[0082] In some embodiments, wherein the determination of whether a criterion is met for the tracked swimmer is further based on a probabilistic model.

[0083] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises: determining whether the tracked swimmer is moving relative to a center of the tracked swimmer; in accordance with a determination that the tracked swimmer is moving relative to the center of the tracked swimmer, updating the criterion emphasis factors of the tracked swimmers; and in accordance with a determination that the tracked swimmer is not moving relative to the center of the tracked swimmer, forgoing updating the criterion emphasis factors of the tracked swimmers .

[0084] In some embodiments, the method further comprises determining the tracked swimmer is an animal based on at least a size, geometry, and movement of the animal, and wherein in accordance with a determination that the tracked swimmer is the animal, the criterion is met. [0085] In some embodiments, a non-transitory computer readable storage medium stores one or more programs, the one or more programs comprising instructions, which when executed by an electronic device with one or more processors and memory, cause the device to perform any of the above methods.

[0086] In some embodiments, a system includes: a video camera configured to capture frames of a swimming pool; a processor and a memory collocated with the video camera; a computing system configured to remotely communicate with the processor and memory; and a program stored in the memory, configured to be executed by the processor, and including instructions for: determining whether a swimmer is in the swimming pool; in accordance with a determination that the swimmer is in the swimming pool, transmitting an instruction to receive captured frames from the video camera and to transmit the captured frames to the computing system; and in accordance with a determination that the swimmer is not in the swimming pool, forgoing transmitting the instruction.

[0087] In some embodiments, transmitting the captured frames to the computing system includes transmitting the captured frames using a protocol for streaming in real-time.

[0088] In some embodiments, determining whether a swimmer is in the swimming pool includes: receiving frames from the video camera; identifying foreground pixels in the frames; and determining whether the identified foreground pixels correspond to the swimmer in the swimming pool.

[0089] In some embodiments, the computing system includes an Open Network Video Interface Forum (ONVIF)/ RTSP bridge configured to receive the captured frames.

[0090] In some embodiments, the computing system is configured to wirelessly communicate with the video camera.

[0091] In some embodiments, the system further includes: an alarm configured to generate an alert associated with an event associated with the swimmer; and a router configured to wirelessly communicate with the computing system and the alarm over a first network connection.

[0092] In some embodiments, the router is configured to wirelessly communicate with the computing system and the alarm over the first network connection in accordance with a determination that the system is not connected to a second network. [0093] In some embodiments, the program further includes instructions for: receiving, from a device, a request for frames from the video camera; and in response to receiving the request for the frames, transmitting a second instruction to receive the frames from the video camera and to transmit the frames to the device.

[0094] In some embodiments, the program further includes instructions for: receiving frames from the video camera; identifying an area of one of the frames including a threshold amount of pixels associated with the swimming pool; identifying a contour bordering the area in the one of the frames; and in accordance with a determination that the entire contour is within the frames, identifying the swimming pool from the frames.

[0095] In some embodiments, the pixels associated with the swimming pool are at least one of blue pixels and light green pixels.

[0096] In some embodiments, the program further includes instructions for in accordance with a determination that the entire contour is not within the frames, generating a request to reposition the video camera.

[0097] In some embodiments, the program further includes instructions for: in accordance with a determination that the swimming pool area of the frame includes less than the threshold mount of pixels associated with the swimming pool, generating a notification corresponding to the determination; and in accordance with a determination that the swimming pool area of the frame includes at least the threshold mount of pixels associated with the swimming pool, forgoing generating the notification corresponding to the determination.

[0098] In some embodiments, the system further includes a sensor configured to detect an angle and a distance of an object relative to the sensor. The swimming pool spans an angle range and a distance range relative to the sensor, and determining whether the swimmer in the swimming pool includes detecting, with the sensor, that the object is within the angle range and the distance range.

[0099] In some embodiments, the sensor is a passive infrared sensor (PIR) sensor includes a Fresnel lens.

[0100] In some embodiments, the program further includes instructions for: capturing the frames with the video camera; and identifying an area of one of the frames including a threshold amount of pixels associated with the swimming pool, wherein the angle range and the distance range correspond to the identified area. [0101] In some embodiments, the area including the threshold amount of pixels are inside a contour of the swimming pool.

[0102] In some embodiments, the computing system includes a second processor and a second memory, and a second program is stored in the second memory, configured to be executed by the second processor, and including instructions for: receiving the captured frames; and determining, based on the received captured frames, occurrence of an event associated with the swimmer.

[0103] In some embodiments, the system further includes an alarm configured to generate an alert in response to receiving an event detection signal, wherein the second program includes instructions further for in accordance with a determination of the occurrence of the event, transmitting the event detection signal to the alarm.

[0104] In some embodiments of the above systems, the video camera includes the processor and the memory.

[0105] In some embodiments, a method includes steps the above systems are configured to perform.

[0106] In some embodiments, a non-transitory computer readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device with one or more processors and memory, cause the device to perform the above method.

BRIEF DESCRIPTION OF THE DRAWINGS

[0107] FIG. 1A and IB illustrate exemplary image based tracking systems, in accordance with an embodiment.

[0108] FIG. 2A illustrates an exemplary image based tracking system, in accordance with an embodiment.

[0109] FIG. 2B illustrates an illustrative example of operating an image based tracking system, in accordance with an embodiment.

[0110] FIG. 3A and 3B illustrate exemplary methods of operating an image based tracking system, in accordance with an embodiment. [0111] FIG. 4 illustrates an exemplary image based tracking system, in accordance with an embodiment.

[0112] FIGS. 5A-5C illustrate an exemplary image based tracking system, in accordance with an embodiment.

[0113] FIG. 6 illustrates a method of operating an exemplary image based tracking system, in accordance with an embodiment.

[0114] FIG. 7 illustrates a computing device, in accordance with an embodiment.

DETAILED DESCRIPTION

[0115] In the following description of embodiments, reference is made to the accompanying drawings which form a part hereof, and in which it is shown by way of illustration specific embodiments which can be practiced. It is to be understood that other embodiments can be used and structural changes can be made without departing from the scope of the disclosed embodiments.

[0116] FIG. 1A illustrates an image based tracking system, in accordance with an embodiment. In an example, the image based tracking system is an aquatic alert system may include camera 102 and alarm devices 104 A, 104B, and 104C and may be installed in a facility that includes swimming pool 100. Although the aquatic alert system is illustrated to include one camera, it is understood that the aquatic alert system may include more than one camera without departing from the scope of the disclosure. The aquatic alert system may be used to help a safety personnel, a lifeguard, a supervisor, or a guardian better or more quickly determine whether someone is risk swimming, distress swimming, or drowning.

[0117] In some embodiments, the alarm device may be a display configured to visually alert occupants of the facility (e.g., lifeguard 110, swimmers 112, other occupants 114, a supervisor, a guardian) that an event has been detected, in response to a generated detection signal. In some embodiments, the alarm device may be a speaker system configured to audibly alert occupants of the facility that an event has been detected, in response to a generated detection signal. In some embodiments, the alarm device may be a portable device (e.g., a smartwatch, a phone, a tablet) configured to alert (e.g., visual alert, audio alert, haptic alert) a user (e.g., lifeguard 110, a facility safety personnel, a facilities manager, a homeowner, a guardian of the swimmer involved in the event, a supervisor), in response to a generated detection signal. As used herein, a swimmer may be a body (e.g., a person, an animal) in the swimming pool.

[0118] In some embodiments, the camera 102 and the alarm devices 104A, 104B, and 104C may be connected over a wireless network (e.g., WiFi, a mobile network, an intranet) to communicate with a computing device (not shown) for processing data (e.g., video captured from the camera) and transmitting a detection signal to the alarm devices. In some embodiments, the camera 102 includes a processor and memory storing a program including instructions for the processor to process the data, analyze the data, and transmit the detection signal to the alarm devices. In some embodiments, the camera 102 includes a solar panel configured to charge a battery in the camera. In some embodiments, the camera 102 may be configured to be installed on a wall or a mount. In some instances, a lifeguard, a safety personnel, a guardian, or a supervisor may not be able to monitor each swimmer in the swimming pool at all times (e.g., when the swimming pool is crowded, when staffing is low, when the guardian is occupied). The camera may advantageously assist this overseer by continuously monitoring the entire swimming pool. The aquatic alert system may advantageously determine an occurrence of an event (e.g., drowning) equal or quicker than the overseer’s determination. For example, the system may detect a drowning swimmer quicker than the overseer because the overseer may be surveying portions of the pool at each time. In some embodiments, the camera is separate from a computing system configured to process images captured by the camera (e.g., the cameras are provided by the pool facilities, a separate off-the-shelf camera is used).

[0119] The facility may be indoor or outdoor. For example, the facility may be an indoor swimming pool, an outdoor swimming pool, a swimming pool in a private home, a spa, or an open body of water (e.g., a beach, ocean, lake, river). The event detection algorithm may vary depending on the facility (e.g., lighting conditions).

[0120] As an exemplary advantage, the disclosed aquatic alert system and methods of operating the aquatic alert system allow the system to monitor the swimming pool continuously in real-time (e.g., 24x7 monitoring), to be trained without supervision, to accurately recognize all swimmers, to accurately track all swimmers, and to detect an event (e.g., a drowning event, risk swimming, distress event) and provide an alarm accurately (e.g., low false alarm rates) and quickly (e.g., faster than a scenario with an overseer and without this system). [0121] For example, the disclosed aquatic alert system may detect a drowning event in less than 10 seconds, increasing the chance that the drowning swimmer can be rescued without harm. As yet another exemplary advantage, when used in conjunction with lifeguards, the system may increase a percentage of successful rescue from 16% to above 80%.

[0122] Although examples of the disclosed image based tracking systems and methods are described with respect to the aquatic alert system, it is understood that the disclosed image based tracking systems and methods are not limited to the illustrated uses (e.g., limited to aquatic alert).

[0123] For example, the disclosed image based tracking systems and methods may be used for event detection, surveillance (e.g., securing private property, determining whether an unsolicited person is entering a private property (e.g., enter a virtual fence)), baby monitoring (e.g., determining whether a baby goes outside a virtual fence), or pet monitoring (e.g., generating stats relating to pet activity (e.g., pet health monitoring), determining whether a pet goes outside a virtual fence). FIG. IB illustrates an image based tracking system, in accordance with an embodiment. In some embodiments, using frames captured with the camera 102, an object (e.g., human 152A, animal 152B) in an area 150 (e.g., a swimming pool, a backyard, an entrance of a business, a defined area by virtual fence 154, an area of interest, a resident, a business, an area being monitored, a private area (e.g., a home, a commercial space, a casino), a public area (e.g., a mall, a shop, a gas station), an area pertaining to national security (e.g., border patrol), an area of water (e.g., water vessel surveillance)) can be identified. For example, by identifying the objects, the objects in the frames are separated from a background image (e.g., objects that are not of interest (e.g., trees, toys, reflections, water, non-human or non-animal objects)) of a captured frame.

[0124] In some embodiments, the object is identified using a model (e.g., a pre-trained supervised model, deep learning model, an ANN model, a RF model, a CNN model, a H- ELM model, a LBP model, a SIFT model, a HOG model, a FPDW model, a SGD model). In some embodiments, the deep learning model is a deep learning model configured for identifying humans and different animals (e.g., a deep learning model that correctly identifies humans or animals with a guaranteed accuracy (e.g., 99%), a deep learning model that identifies human, dogs, cats, and other animals). In some embodiments, an object is identified in accordance with a determination that the object fits the model above a threshold probability. [0125] For example, frames captured with the camera 102 are transmitted to a second device (e.g., a cloud computing device). The second device is configured to receive the frames and identify the object using the model (e.g., by identifying foreground pixels in the frames corresponding to a foreground object (e.g., the object)). In some embodiments, the model is updated using data from the image based tracking system to further improve its accuracy and/or its ability to identify more objects. For example, the model is updated with data associated with motions of objects of interest in the area (e.g., specific swimming motions), and in response to the update, the model may more accurately and/or quickly identify an object of interest that is performing these motions.

[0126] By identifying the object using a model, the image based tracking system may more accurately identify objects of interest (e.g., humans, animals (e.g., pets)), even in situations where conditions may cause identification of the objects to be more difficult if the model is not used. As a result, by more accurately identifying objects of interest, there may be a higher confidence that all objects of interest are tracked and all events associated with the objects are identified, even in situations where identification of the objects may be more difficult.

[0127] In some embodiments, an area for identifying an object is defined. In some embodiments, the area is surrounded by a virtual fence 154, which is a virtual boundary defining the area. In some embodiments, the virtual fence is defined by a user (e.g., based on a user input (e.g., drawing the virtual fence on a user interface, providing dimensions on a user interface) to the image based tracking system). In some embodiments, the virtual fence is pre-defined (e.g., by the image based tracking system). For example, the image based tracking system scans its field of view and determine an area of interest (e.g., an area surrounding a swimming pool), and defines the virtual fence to surround the area of interest.

[0128] By defining an area of interest and performing are based detection, the image based tracking system may be more focused on determining occurrence of an event in the area of interest and less focused on events occurring outside the area of interest. For example, the image based tracking system is configured to detect intruder (e.g., into a backyard, into a business), and by defining the area of interest with the virtual fence, the image based tracking system may be more focused on detecting an intruder in the area and may generate less false alarms (e.g., when an object is detected outside the area of interest). [0129] In some embodiments, after the object is identified, the object is tracked. In some embodiments, the object is tracked by using the model to continually identify the object. In some embodiments, after identification of the object, the object may not be tracked by using the model. For example, the object may be obstructed (e.g., water splash, precipitation, obstructed by a structure or another object in the area, a dog going out of a door). As another example, a part of the object is outside the area of interest (e.g., outside the virtual fence, outside an area where the image based tracking system is configured to identify objects of interest, the object goes in and out of the area of interest), such that the model is not able to identify the object. As yet another example, after identification, the object may no longer fit the model (e.g., the object no longer fit the model above a threshold probability). In some embodiments, in accordance with a determination that the object is not tracked by the model, the image based tracking system uses an object tracking algorithm (e.g., Kalman tracking, optical flow method, Lucas-Kanade Algorithm, Horn-Schunck method, Black-Jepson method) and/or a motion prediction algorithm to track the object. For example, in accordance with the determination that the object is not tracked by the model, the image based tracking system uses the object tracking algorithm and/or a motion prediction algorithm to continue to track the object for further analysis (e.g., determining occurrence of an event associated with the object).

[0130] By tracking the object using a model and an object tracking algorithm and/or a motion prediction algorithm, the image based tracking system may more accurately track objects of interest (e.g., humans, animals (e.g., pets)), even in situations where conditions may cause tracking of the objects to be more difficult if only the model is used. As a result, by more accurately tracking the objects of interest, there may be a higher confidence that all objects of interest are tracked and all events associated with the objects are identified, even in situations where identification of the objects may be more difficult.

[0131] In some embodiments, after the object is tracked, pattern recognition is performed to determine occurrence of events or object activities. For example, pattern recognition is performed to detect a person swimming and not drowning, a person drowning, a baby sleeping, a baby crawling, a person legally entering a home, a person breaking into the home, a dog eating, or sitting. In some embodiments, the pattern recognition is performed based on supervised (e.g., feature based) and/or unsupervised (e.g., data based) approaches. For example, as described in more detail herein, classifiers, such as speed, splash, and submersion index, depicting normal swimming or drowning may be used with pre-trained data-based approaches that distinguish swimming vs drowning. In some embodiments, pattern recognition is updated using data from the image based tracking system to further improve its accuracy and/or its ability to recognize more patterns. For example, pattern recognition is updated with data associated with motions of objects of interest in the area (e.g., specific swimming motions), and in response to the update, pattern recognition may more accurately and/or quickly recognize an activity and/or determine occurrence of events. Additional examples of pattern recognition are described with respect to method 300. In some embodiments, after the object is tracked, fuzzy logic is used to determine an occurrence of an event.

[0132] FIG. 2A illustrates an image based tracking system 200, in accordance with an embodiment. In some embodiments, the image based tracking system 200 is an aquatic alert system that may be used in the facilities disclosed herein.

[0133] In some embodiments, the image based tracking system 200 includes camera 202, processor 204, memory 206, user interface 210, assistance device 212, alarm device 214, and display 216. Elements of the image based tracking system 200 may be connected with communication link 218. In some embodiments, the communication link 218 is wireless.

For example, the communication link 218 represents a wireless network, and the wireless network includes a wireless router. As another example, the communication link 218 may be a WiFi, Bluetooth, or mobile network (e.g., 4G, LTE, 5G). As yet another example, the communication link 218 may be a wired link.

[0134] Elements of the image based tracking system 200 may be included in subsystems. For example, the processor 204 and memory 206 may be included in a computing device (e.g., a computer, a server, a cloud computing device), separate from the other elements, where data (e.g., video frames) from the camera 202 is processed and analyzed and a detection signal to activate the alarm device may be transmitted, depending on the analysis.

In some embodiments, the computing device transmits a video stream in response to receiving a query from an application of another device. In some embodiments, the computing system and the camera are configured to communicate wirelessly. In some embodiments, the computing device is one of AI processor, cloud computing platform, a processor with AI and video/graphics booster technology having sufficient computation power and processing speed, a fast computing platform, and a parallel computing platform.

In some embodiments, the image based tracking system 200 includes a first computing device (e.g., a base station, a computer) in a same local network as the camera 202 for initially processing video frames from the camera and a second computing device not in the local network (e.g., a server, a cloud computing device) for subsequently processing the video frames and transmitting a video stream in response to receiving a query from an application of a third device. By performing the processing and analysis in a computing device instead of the camera, the complexity and cost of the camera (and hence the cost of the system) may be advantageously reduced.

[0135] As another example, the processor 204 and memory 206 may be included in the camera 202. That is, the processing and analysis of data (e.g., video frames) received from the camera 202 may be performed by the camera itself without a separate computing device. Depending on the analysis, the camera 202 may transmit a detection signal to the assistance device 212 and/or alarm device 214 (e.g., a swimmer is determined to be drowning, and the camera transmits the signal to activate the assistance device 212 and/or alarm device 214).

As yet another example, the image based tracking system 200 may not include a camera, and the camera is separate from elements (e.g., elements of a computing system) configured to process images captured by the camera (e.g., the cameras are provided by the pool facilities, a separate off-the-shelf camera is used).

[0136] The image based tracking system 200 may be used as illustrated in FIG. 1A. For example, camera 202 may be camera 102 and alarm device 214 may be at least one of alarm devices 104. The alarm device 214 may provide a visual, audio, or haptic alert indicating that a swimmer is drowning. For example, as described herein, based on whether a criterion is met (described in more detail below), the system generates a detection signal that causes an alarm device 214 to present an alarm (e.g., to a lifeguard, to a safety personnel, to a guardian of the drowning swimmer, to a facilities manager, to a homeowner, a supervisor). The image based tracking system may advantageously determine an occurrence of an event (e.g., drowning) and generate an alert equal or quicker than the overseer’s determination. For example, the system may detect a drowning swimmer quicker than the overseer because the overseer may be surveying portions of the pool at each time or may be occupied. As a result, the overseer may be able to act accordingly (e.g., help the drowning swimmer) quickly.

[0137] In some examples, the assistance device 212 may be a life saving device (e.g., a rescue robot, the EMILY Hydronalix Rescue Robot) or a buoyancy device (e.g., a device that can lift a person experiencing a drowning event above the water). In some embodiments, the assistance device 212 is activated or made available to a user of the system (e.g., a lifeguard, a safety personnel, a facilities manager, a homeowner, a guardian of the drowning swimmer, a supervisor) in response to generation of a detection signal (e.g., the system determines that someone is drowning, and the system activates or makes the assistance device available to rescue the actively drowning swimmer).

[0138] In some embodiments, the display 216 may be a touch screen and configured to display the user interface 210. In some embodiments, the user interface 210 is separately presented from the display 216. The user interface 210 may be configured to receive an input from a user (e.g., a touch input, a button input, a voice input), and a setting of the system may be updated in response to receiving the input from the user. Methods of operating the user interface 210 is described in more detail with respect to FIGs. 3 A and 3B. As an exemplary advantage, the user interface allows a user to efficiently configure the system and customize a likelihood of event detection based on the user’s requirements.

[0139] In some examples, the display 216 may be integrated with the camera 202. In some examples, the display 216 may be included with a computer system that includes processor 204 and memory 206. In some examples, the display 216 may be a device separate from the camera 202, processor 204, and memory 206.

[0140] In some embodiments, the memory 206 includes data 208A and program 208B. The data 208A and/or program 208B may store instructions to cause the processor 204 to perform the methods disclosed herein (e.g., methods of operating the image based tracking system 200, method 300, method 350). In some examples, the data 208A is part of a storage system of a computer system or an online storage system, and the captured frames are stored in a storage system of the computer system or an online storage system.

[0141] Although examples of the disclosed image based tracking systems and methods are described with respect to the aquatic alert system, it is understood that the disclosed image based tracking systems and methods are not limited to the illustrated uses (e.g., aquatic alert systems). For example, in some embodiments, the system 200 is an image based tracking system that includes camera 202, processor 204, and memory 206, and the image based tracking system is configured to perform operations described with respect to image based tracking system 150. In some embodiments, additional processor and memory are included in the system 200 and in a device (e.g., a cloud computing device) different than the camera 202 for performing operations described with respect to image based tracking system 150. [0142] FIG. 2B illustrates an illustrative example of operating an image based tracking system, in accordance with an embodiment. In some embodiments, an exemplary image based tracking system receives frames 252A, 252B, and 252C during operation. In some embodiments, the frames are analyzed using a first object identification algorithm 254 and a second object identification algorithm 256. For example, the first object identification algorithm 254 is an algorithm using a model (e.g., a model for identifying a human or an animal, as described herein), and the second object identification algorithm 256 is an algorithm that does not use the model of the first object identification algorithm (e.g., algorithm 256 is an algorithm described with respect to steps of method 300). In some embodiments, each algorithm uses a corresponding number of descriptors for identifying an object of interest (e.g., a human, an animal, an object being monitored, a foreground object). Although two algorithms are described with respect to FIG. 2B, it is understood that a disclosed image based tracking system may use more than two algorithms for object identification and/or tracking.

[0143] In some embodiments, the first object identification algorithm 254 and the second object identification algorithm 256 identify objects in a respective frame (e.g., captured by a disclosed camera, received by a disclosed image based tracking system). For example, for frame 252A, the first object identification algorithm 254 (e.g., an algorithm using a model (e.g., a model for identifying a human or an animal, as described herein)) identifies objects 260 and 262 (e.g., using the methods described herein (e.g., method 350)) in the frame 252A, and the second object identification algorithm 256 identifies objects 264 and 266 (e.g., using steps of the method 300) in the frame 252A.

[0144] In some embodiments, the object identification algorithms advantageously work together to increase a probability of correctly identifying an object (e.g., a human, an animal, an object of interest, an object being monitored). For example, at a first time (e.g., Tl, at a time step, at a time when a result from an algorithm is available), the results of the object identification algorithms for a corresponding frame (e.g., frame 252A) are combined (e.g., fused at an object level), and an object tracker 258 (e.g., for performing object tracking, as described herein) is updated based on the results.

[0145] In some embodiments, each identified object has an associated counter (e.g., a saturating counter). The counter advantageously provides feedback to reinforce detection of a corresponding object over time (e.g., higher counter value may indicate a higher reinforcement or confidence, historical counter data is used to improve future detection of objects, counter value represents fused object identification results from respective algorithms). For example, the counter allows detections to temporally accumulate, and thereby allowing detection of a time step to depend on detections from previous time steps.

In some embodiments, the counter is tracked over time. In some embodiments, the counter reset after an amount of time (e.g., when a tracked object is no longer in an area being monitored (e.g., a swimmer finishes swimming for the day)). As described in more detail below, the counter allows results from different algorithms to be fused, advantageously increasing object identification probability. In some embodiments, the counter is updated up to a saturated counter maxima. In some embodiments, the saturated counter maxima is kept constant, or can be updated based on training/learned data (e.g., using an AI algorithm) or different conditions or states.

[0146] In some embodiments, if an object is identified, the identified object’s corresponding counter is updated. For example, objects 260 (identified using first object identification algorithm) and 264 (identified using second object identification algorithm) correspond to tracked object 278, and objects 264 (identified using second object identification algorithm) and 266 (identified using second object identification algorithm) correspond to tracked object 282. In some embodiments, an object identified by an algorithm is determined to correspond to an object tracked by the object tracker based on spatial relationships and/or descriptor comparisons (e.g., heuristically joined based on spatial relationships and/or descriptor comparisons). Counters associated with the tracked objects are updated (e.g., by the image based tracking system) based on the results from the object identification algorithms. For example, because both tracked objects are identified by both algorithms, both counters increase by two.

[0147] It is understood the described counter update numbers are merely exemplary, and that the counters may be updated differently. In some embodiments, each algorithm has an associated weight, and the counter is updated based on the weights associated with the algorithms. For example, in the above example, if the first object identification algorithm has an associated weight of 0.7, and the second object identification algorithm has a weight of 0.5, then the counter is increased by 0.7x1+0.5x1=1.2. In some embodiments, the weight is dependent on a state or a set of descriptors. In some embodiments, the weight is constant. In some embodiments, the weight is updated based on training/learned data (e.g., using an AI algorithm) to further improve identification results (e.g., in dynamic situations when one algorithm may be more suitable than another in certain conditions or states). [0148] In some embodiments, object 280 is tracked by the object tracker 258, and the object 280 is not identified by either object identification algorithm (e.g., the object 280 is not a human or an animal, the object 280 is not an object of interest, object 280 is a false negative). In some embodiments, because the object 280 is not identified by either algorithm, its associated counter is decreased by one.

[0149] As another example, at a second time (e.g., T2, at a time step, at a time when a result from an algorithm is available), the results of the object identification algorithms for a corresponding frame (e.g., frame 252B) are combined, and the object tracker 258 is updated based on the results. Object 268 (identified using first object identification algorithm) corresponds to tracked object 282, and object 270 (identified using second object identification algorithm) correspond to tracked object 278. Counters associated with the tracked objects are updated (e.g., by the image based tracking system) based on the results from the object identification algorithms. For example, because the first object identification algorithm identified object 282, and the second object identification algorithm identified object 278, the corresponding counters of the two objects are increased by one.

[0150] As yet another example, at a third time (e.g., T3, at a time step, at a time when a result from an algorithm is available), the results of the object identification algorithms for a corresponding frame (e.g., frame 252C) are combined, and the object tracker 258 is updated based on the results. Object 272 (identified using first object identification algorithm) corresponds to object 280, and objects 274 and 276 (identified using second object identification algorithm) correspond to tracked objects 278 and 282, respectively. Counters associated with the tracked objects are updated (e.g., by the image based tracking system) based on the results from the object identification algorithms. For example, because the first object identification algorithm identified object 280, and the second object identification algorithm identified objects 278 and 282, the corresponding counters of the three objects are increased by one.

[0151] FIG. 3A illustrates a method 300 of operating an image based tracking system, in accordance with an embodiment. In some embodiments, the method 300 is a method of operating an aquatic alert system. In some embodiments, the method 300 is performed with a system comprising a video camera configured to capture frames of a swimming pool (e.g., camera 102, camera 202), a computing system configured to communicate with the camera and including a processor and memory (e.g., as described with respect to FIGs. 1A, IB, 2A, 2B, 4, and 5); and a program stored in the memory, configured to be executed by the processor and including instructions to perform the method.

[0152] Although the method 300 is illustrated as including the described steps, it is understood that different order of step, additional step (e.g., combination with other methods disclosed herein), or less step may be included without departing from the scope of the disclosure. For examples, steps of method 300 may be performed with steps of other methods disclosed herein.

[0153] In some embodiments, the method 300 includes step 302, receiving the frames captured with the video camera. For example, the camera 102 or camera 202 receives frames of a video feed of the swimming pool.

[0154] In some embodiments, the receiving of the frames with the video camera and the identifying of the interior pool pixels, the background pixels, the foreground pixels, and the swimming pool information are performed concurrently (e.g., sliding window method to process video). For example, the background pixels, foreground pixels, and the swimming pool information may be identified using a real-time streaming video of swimming pool. For example, the receiving of the frames with the video camera may include using one of RTSP, HTTP, HTTPS, and SDP with secure data transmission using encryption and authentication methods such as WPA, WPA2, TKIP, or AES. In some embodiments, the interior pool pixels are associated with an interior pool region in the frame. In some embodiments, the background pixels are associated with a background region (e.g., a portion of the frame associated with background objects of the pool) in the frame. In some embodiments, the foreground pixels are associated with a foreground region (e.g., swimmers) in the frame.

[0155] By processing the video in real-time, the system may advantageously assist the overseer by continuously and instantaneously monitoring the entire swimming pool. The aquatic alert system may advantageously determine an occurrence of an event (e.g., drowning) equal or quicker than the overseer’s determination. For example, the system may detect a drowning swimmer quicker than the overseer because the overseer may be surveying portions of the pool at each time.

[0156] In some embodiments, the method 300 includes storing the captured frames in the computing system. For example, the captured frames are stored in a storage system of the computer system or an online storage system. [0157] In some embodiments, the method 300 includes step 304, for each frame captured with the video camera, identifying interior pool pixels associated with an interior region of the swimming pool in the frame, the interior pool region including a water area of the swimming pool, background pixels (e.g., associated with the swimming pool) in the frame, foreground pixels (e.g., associated with the swimming pool) in the frame, wherein the foreground pixels correspond to detected foreground objects, and swimming pool information associated with objects in the frame. In some examples, the interior pool region may be defined by a perimeter (e.g., the pool's perimeter) surrounding the foreground objects (e.g., swimmers, people, animals, birds, objects active in a frame) and the background objects (e.g., water, static objects). For example, for each of the received frames from the camera, background pixels or region (associated with e.g., facility objects such as ladder 104, lane dividers, equipment, other occupants 114), foreground pixels or region (associated with e.g., swimmers 112), and swimming pool information (e.g., number of swimmers, facilities attributes) are identified. As another example, lane dividers may be removed based on their color and orientation with respect to the swimming pool (e.g., horizontal/vertical) and by applying a high pass filter across this orientation. Other static objects may be removed based on stationary (e.g., substantially zero speed) movement of objects (e.g., tubes, buoyant objects, metal objects). In some embodiments, although the other occupants 114 may not be in the foreground pixels, they may be tracked by the system; an alert may be generated if the other occupant 114 falls into the swimming pool, based on this tracking. In some embodiments, the background pixels may be a mean of background pixels accumulated over a number of samples (e.g., 10 consecutive samples) to account for dynamic background changes (e.g., a diving board is part of the background, but may be moving in some frames, but not others).

[0158] As yet another example, a skin complexion model may first be applied to isolate swimmer pixels (e.g., foreground pixels, pixels in foreground region) from the background pixels. Residue swimmer pixels may be removed using a temporal vector median filter. In contrast with modeling each pixel independently, the background pixels may be formed by block (e.g., cluster) centroids of homogeneous color regions within blocks of the background pixels. For example, a hierarchical k-means within each block is used.

[0159] In some embodiments, identifying the interior pool pixels, the background pixels and the foreground pixels further comprises identifying at least one of shape, size, color, and geometry of objects in the interior pool pixels, the background pixels and the foreground pixels. For example, background objects such as lane divider, ladder, and diving board may be identified based on successive frames and motion tracking of objects in the pool and/or size determination of objects in case of larger/taller objects. This step may advantageously allow the system to correctly identify swimmers and background objects, reducing the likelihood of a false alarm (e.g., mistaking a background object as a drowning swimmer) or a missed event (e.g., not tracking a drowning swimmer).

[0160] In some embodiments, the method 300 includes step 306, based on the identified background pixels, foreground pixels, and swimming pool information, forming a block (e.g., cluster) for each swimmer in the foreground pixels.

[0161] For example, background pixels may be divided into blocks. In each block, a k- means clustering algorithm may be applied to get a number of block (e.g., cluster) centroids. In every arriving frame, for every pixel, distance from a pixel to block (e.g., cluster) centroids in the block the pixel belongs to, and surrounding blocks (e.g., eight blocks) is calculated. If eight blocks are calculated, a minimum of nine distances is chosen as color discrepancy of a pixel.

[0162] In the resulting discrepancy image, hysteresis thresholding may be applied to segment the foreground from the background. That is, a pixel may belong to foreground if it is of greater discrepancy than a value Ti, and if it is a pail of a region of other such pixels (e.g., a part of other background pixels, the region including at least one pixel of discrepancy greater than the value Ti).

[0163] Then, the foreground may be separated, and be divided into blocks. K- means algorithm may be used to find block (e.g , duster) centroids in each block. This may be performed for every arriving frame.

[0164] Similar· to thresholding for identifying background pixels, color discrepancy may he measured for every pixel and its surrounding foreground blocks. Pixels with high discrepancy may be labeled as highest confidence swimmer pixels (e.g., foreground pixels).

[0165] In some embodiments, the forming of the block (e.g., cluster) for each swimmer comprises determining whether the block (e.g., cluster) includes at least a threshold amount of foreground pixels. For example, a block (e.g., cluster) would be formed if a portion of the block includes a threshold percentage of foreground pixels (e.g., skin color pixels, pixels identified as potentially being a swimmer pixel), and a block (e.g., cluster) would not be formed if the portion does not include the threshold percentage of foreground pixels. This step may advantageously allow the system to correctly identify and track swimmers, reducing the likelihood of a false alarm (e.g., mistaking that a non-drowning swimmer is drowning) or a missed event (e.g., not tracking a drowning swimmer).

[0166] In some embodiments, the method 300 includes step 308, based on the identified background pixels, foreground pixels, and swimming pool information, tagging each swimmer in the frame with a respective identifier. For example, each swimmer (e.g., each of swimmers 112) is assigned a unique identifier such as a tag or a number.

[0167] In some embodiments, the method 300 includes step 310, tracking each swimmer by using image tracking and motion prediction algorithms on the formed blocks (e.g., clusters). For example, the image tracking and motion prediction algorithms may include at least one of Lucas-Kanade algorithm, Optical Flow Method, particle tracking, and Black- Jepson method. The swimmer’s movement may be tracked or predicted using an initial speed and direction of the swimmer. A system performing these steps may advantageously quickly track swimmers and reduce an overseer’ s reaction to an event.

[0168] In some embodiments, the method 300 includes step 312, determining, based on the swimming pool information and the image tracking and motion prediction algorithms whether a criterion is met for a tracked swimmer. For example, the criterion may include at least one of swimmer speed, swimmer posture, (e.g., based on the angle of the principle axis of a best fit ellipse enclosing a swimmer), a splash threshold (e.g., a threshold number of splash pixels inside a bounding box associated with the swimmer), an activity threshold (e.g., a threshold cumulative area of pixels covered by a swimmer over a defined period of time), a submergence threshold (e.g., a threshold percentage of a swimmer’s body inside the water), a submergence variance, and swimmer vertical movement, as calculated from the camera frame. The criterion may also include at least one of swimmer speed (e.g., based on difference in centroid positions computed over a small period, using image tracking motion prediction algorithms), submersion variance (e.g., variance of submersion indicating the submersion behavior of the swimmer), and swimmer vertical movement. The criterion may be user defined (e.g., the system is trained offline) or learned by the system over time (e.g., real-time event inference).

[0169] For example, the criterion may be met when a splash threshold is exceeded by a swimmer splashing beyond a threshold amount while drowning and the criterion is met. As another example, the criterion may be met when an angle of a best fit ellipse enclosing a swimmer indicates that the body of the swimmer is in a non-swimming posture (e.g., drowning). As yet another example, the criterion may be met when an activity of a swimmer suddenly changes (e.g., a swimmer’s movement suddenly stops or a swimmer’s movement suddenly become swift, indicating that the swimmer may be drowning, a swimmer’s hair is over his or her eyes, a swimmer is not using his or her legs, a swimmer is trying to swim in a direction but not moving in the direction, a swimmer is trying to roll over onto his or her back, the swimmer appears to be climbing an invisible ladder). As yet another example, the criterion may be met when greater than a threshold percentage of the swimmer’s body is submerged underwater over a defined period of time (e.g., a swimmer is under the water for too long, a swimmer’s head is low in the water). By using a criterion to determine an occurrence of an event, the event may be accurately and consistently detected (e.g., different overseers may have a different determination of whether a swimmer requires assistance at different time; an overseer may misjudge a drowning event, diverting his or her attention away from other swimmers).

[0170] In some embodiments, the method 300 includes step 314, in accordance with a determination that the criterion is met for the tracked swimmer, generating a detection signal indicating an event associated with the tracked swimmer. For example, the detection signal indicates that a swimmer is drowning or an animal has fallen into the swimming pool. In some embodiments, more than one criterion or a combination of criterion may need to be met to generate the detection signal. For example, a generalized reduced multivariable polynomial (GRM) network may be used to combine the criterion to determine whether a detection signal should be generated.

[0171] In some embodiments, the method 300 includes generating an alert associated with the event in response to the generated detection signal. For example, the detection signal causes an alarm or an alert (e.g., lifeguard 110, a guardian, a safety personnel, a supervisor) that expresses someone may be drowning. For example, the alert may be generated on a wearable device, a portable device, or a system user interface. In some examples, multiple alerts may be generated on multiple devices. In some embodiments, the system comprises a wearable device (e.g., alarm device 104C, a smart watch wore by an overseer, a wearable device worn by an external supervisor), and the method 300 includes transmitting the generated alert to the wearable device.

[0172] As an exemplary advantage, the method 300 may allow detection of a drowning event in less than 10 seconds, increasing the chance that the drowning swimmer maybe rescued without harm. As another exemplary advantage, when used in conjunction with lifeguards, the system 200 and the method 300 may increase a percentage of successful rescue from 16% to above 80%.

[0173] In some embodiments, the method 300 includes determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, detecting a swimmer leaving or entering the interior pool region, updating the number of swimmers based on the detection; determining that the swimmer entered the interior pool region after a predetermined amount of time; in accordance with the determination that the swimmer entered the interior pool region after the predetermined amount of time, tagging the swimmer with an identifier; and in response to detecting the swimmer leaving the interior pool region, untagging the swimmer. For example, a number of the swimmer at a given time is determined based on the foreground pixels (e.g., number of blocks or clusters, number of tagged swimmers) or the swimming pool information (e.g., number of tagged swimmer at a time prior to the given time). At a subsequent time, a new swimmer entering the swimming pool may be detected (e.g., based on the identification step) and tagged in response to the detection. At a subsequent time, a swimmer leaving the swimming pool may be detected (e.g., based on the identification step) and untagged in response to the detection.

[0174] As an exemplary advantage, by keeping track of the number of swimmer in the swimming pool, false negatives may be eliminated under low visibility conditions (e.g., no clear water, nighttime). If a current swimmer count is lower than a previous swimmer count and the system determines that no swimmer has left the swimming pool (indicating that, e.g., a swimmer may be submerged underwater, drowning, and not visible to the camera), then a criterion is met and a detection signal is generated.

[0175] In some embodiments, the method 300 includes determining a number of swimmers based on the foreground pixels and the swimming pool information, and the criterion is met when a number of detected foreground objects is less than the number of swimmers. For example, a total number of swimmers at given time may be based on the number of detected foreground objects (e.g., identified blocks, clusters, active objects) and swimming pool information such as total number swimmers at a time prior to the given time. If partial occlusion or occlusion is determined between at least two blocks (e.g., clusters), then the number of swimmers is determined to less be the number of identified blocks (e.g., clusters) (e.g., due to partial occlusion or occlusion, one cluster may include more than one swimmer). The system may advantageously determine more accurately the number of swimmer even with partial occlusion or occlusion in the frame.

[0176] In some embodiments, the method 300 includes determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, and the number of swimmers is a number of detected foreground objects (e.g., detected blocks, clusters, active objects). For example, a total number of swimmers at a given time may be determined by the number of identified blocks (e.g., clusters) and swimming pool information such as total number of swimmers at a time prior to the given time. If there is no partial occlusion or occlusion between the blocks (e.g., clusters), then the number of swimmers is determined to be the number of identified blocks (e.g., clusters).

[0177] In some embodiments, the criterion dynamically updates based on a depth (e.g., of the swimming pool) corresponding to the swimmer’s position in the swimming pool. For example, if the swimmer is at a shallower or deeper portion of the swimming pool, then the submergence threshold may be dynamically updated accordingly. For example, a percentage threshold may be higher for a swimmer at a shallower portion of the swimming pool.

[0178] In some embodiments, the criterion dynamically updates based on a distance of the swimmer from the camera. For example, if a swimmer is at a further distance from the camera, resolution of the swimmer may be reduced, and the criterion may be updated to be more conservative (e.g., the threshold meeting the criterion may be lower). In some embodiments, the criterion dynamically updates based on a surrounding brightness of a camera view.

[0179] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method 300 includes learning behaviors of the tracked swimmers; and updating the criterion emphasis factors of the tracked swimmers based on the learned behaviors (e.g., swimmer skill, risk level of swimming). For example, the criterion emphasis factor may be an adjustment factor (e.g., a numerical weight) associated with a criterion that affects how likely the criterion is met. As one example, over time (e.g., after 15 minutes), the system may learn that the tracked swimmer is a strong swimmer, and the criterion emphasis factor may deemphasize the criterion (e.g., setting higher thresholds determining whether the swimmer is drowning). As another example, over time, the system may learn that the tracked swimmer is a weak swimmer (e.g., a beginner), and the criterion emphasis factor may emphasize the criterion (e.g., setting lower thresholds for determining whether the swimmer needs assistance). A system that determines an event occurrence using a criterion emphasis factor may be more robust by allowing configuration of a corresponding criterion based on learned behaviors or user inputs (e.g., compare to a system that does not allow variability of event detection parameters).

[0180] In some embodiments, the height of a swimmer may be determined, and the criterion emphasis factor may be updated based on the height of the swimmer. For example, the height of the swimmer indicates that the swimmer may be a child; the criterion emphasis factor may be emphasized for higher sensitivity (e.g., the child may be more likely to drown). In some embodiments, the criterion may be deemphasized when a relatively tall swimmer passes over a relatively shallow part of the pool.

[0181] In some embodiments, the computing system comprises a user interface, and the method 300 includes selecting, on the user interface, an activity in the swimming pool; and updating the criterion based on the selected activity. For example, the user interface may be presented on a display (e.g., display 216) of the system, and a user (e.g., a lifeguard, a home owner, an administrator, a supervisor) may select a current activity associated with the swimming pool (e.g., free swim, a supervised swimming class, swim meet, kids swimming lesson, scuba lessons, day, night) on the user interface. Based on the selected activity and a risk of drowning associated with the activity, the criterion may be updated. For example, the risk of drowning during a free swim may be higher than the risk of drowning for a swim meet; the criterion associated with the free swim may be more conservative (e.g., drowning detection may be more sensitive) than the criterion associated with the swim meet. As yet another example, a user may not want anyone in the swimming pool at night or may have reduced supervision at night; therefore, the criterion associated with night-time may be more conservative or sensitive than the criterion associated with day-time.

[0182] In some embodiments, the computing system comprises a user interface, and determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method 300 includes selecting, on the user interface, a behavior of a tracked swimmer; and adjusting the criterion emphasis factors of the tracked swimmer based on the selected behavior. For example, the user interface may be presented on a display (e.g., display 216) of the system, and a user (e.g., a lifeguard, a home owner, an administrator, a supervisor) may select a behavior of a tracked swimmer (e.g., the tracked swimmer is an advanced swimmer, the tracked swimmer is a beginner). Based on the selected behavior, the emphasis factor may be updated. For example, the risk of drowning for a beginner may be higher than the risk of drowning for a more advanced swimmer; the criterion associated with the beginner may be more conservative (e.g., drowning detection may be more sensitive) than the criterion associated with the advanced swimmer.

[0183] In some embodiments, the method 300 includes tracking a history of the swimming pool, learning site attributes of the swimming pool based on the history, and updating the criterion based on the learned site attributes. For example, events and conditions of the swimming pool may be tracked over time, and the site attributes may be parameters associated with the swimming pool (e.g., indoor pool parameters, outdoor pool parameters, brightness, air quality, glare, water color, lanes or other static objects, paint color on pool floor). Based on the tracked history and the learned site attributes, the criterion is updated accordingly to more accurately reflect a risk of drowning associated with the particular swimming pool. As an exemplary advantage, by updating the criterion based on the learned site attributes, the system may better adapt to changing pool conditions without manual updates or calibrations.

[0184] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method 300 includes determining whether the swimming pool is a first type of swimming pool or a second type of swimming pool, in accordance with a determination that the swimming pool is the first type, setting the criterion emphasis factors of the tracked swimmers based on a first preset, and in accordance with a determination the swimming pool is the second type, setting the criterion emphasis factors of the tracked swimmers based on a second preset. For example, the criterion emphasis factor may be an adjustment factor (e.g., a numerical weight) associated with a criterion that affects how likely the criterion is met. The system may include presets of predetermined criterion and criterion emphasis factors associated with different types of swimming pool (e.g., indoor pool, outdoor pool, large swimming pool, small swimming pool, swimming pool including a diving board). A preset of these predetermined criterion and criterion emphasis factors may be selected (e.g., by the user, by the system based on image analysis of the pool) based on the type of swimming pool. As an exemplary advantage, by having these presets, the initial tuning process of the system may be reduced (e.g., short installation time). [0185] In some embodiments, identifying a difference between the identified background pixels at a first time and the identified background pixels at a second time, and the method 300 includes dynamically updating the criterion based on the difference. For example, the system determines that background pixels are different between a first time and a second time because swimming pool set up may be different. As an example, the setup at the first time may be a swim meet, and the second up at the second time may be a free swim. As another example, the setup of the swimming pool may have been renovated over time. In response to identifying the difference, the system dynamically updates a criterion associated with the first setup (e.g., the swim meet, setup before pool renovation) to a criterion associated with the second setup (e.g., the free swim, setup after pool renovation). As an exemplary advantage, less manual tuning and more accuracy may be achieved by using the system to automatically identify these background differences.

[0186] In some embodiments, a first block (e.g., cluster) associated with a first swimmer and a second block (e.g., cluster) associated with a second swimmer at least partially overlap and form a third block (e.g., cluster), and the forming of the block (e.g., cluster) of each swimmer further comprises using a hierarchical k-means clustering algorithm to separate the first and second blocks (e.g., clusters), a Markov Random Field (MRF) to form the first and second blocks (e.g., clusters) based on the identified background pixels, foreground pixels, and swimming pool information, and a linear prediction scheme to determine centroids of each swimmer by predicting direction and location of the swimmer.

[0187] For example, two swimmers (e.g., two swimmers with unique identifiers or tags) merge as one identified foreground object (e.g., one combined third block or cluster). The newly formed block or cluster (e.g., the third block or cluster) is now searched for k-means with two sub-blocks or sub-clusters (e.g., searching for the first and second blocks or clusters based on history, swimming pool information, tracking knowledge) and the clustering algorithm may give the two independent swimmers as an output, even if the third block (e.g., cluster) appears to be one block (e.g., cluster). MRF may break that one block or cluster (e.g., the third block or cluster) into two swimmer based on body shape and background water separation. Linear prediction scheme may predicts where (e.g., direction, location) the swimmer may be swimming to identify swimmer’ s centroids and to potentially better track the centroids. Each swimmer may be more accurately identified by forming the sub-blocks or sub-clusters. [0188] In some embodiments, the method 300 includes updating the criterion based on a user input. For example, the system may include a user interface, and using the user interface, the user may be able to manually adjust a criterion (e.g., manually adjusting threshold levels associated with meeting the criterion to generate the detection signal and an alert).

[0189] In some embodiments, the method 300 includes updating the criterion based on at least one of a Monte-Carlo simulation, user data, neural network data, and random forest data. For example, the system may be trained unsupervised using Monte-Carlo simulation training videos or graphics of normal swimming and drowning behaviors, and criterion may be updated based on the unsupervised training, potentially reducing manual tuning of the system and increasing accuracy of detection. As another example, the system may be trained unsupervised using data (e.g., usage data, event occurrence data) from users (e.g., a same user, other users) of the aquatic alert system. As yet another example, the system may be trained unsupervised using data-based methods such as neural networks or random forests.

[0190] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method 300 includes updating the criterion emphasis factors of the tracked swimmer based on at least one of a Monte-Carlo simulation and user data. For example, the criterion emphasis factor may be an adjustment factor (e.g., a numerical weight) associated with a criterion that affects how likely the criterion is met. The system may be trained unsupervised using Monte-Carlo simulation training videos or graphics of normal swimming and drowning behaviors, and criterion emphasis factor may be updated based on the unsupervised training, potentially reducing manual tuning of the system and increasing accuracy of detection. As another example, the system may be trained unsupervised using data (e.g., usage data, event occurrence data) from users (e.g., a same user, other users) of the aquatic alert system, and criterion emphasis factor may be updated based on the unsupervised training, potentially reducing manual tuning of the system and increasing accuracy of detection.

[0191] In some embodiments, the determination of whether a criterion is met for the tracked swimmer is further based on a probabilistic model. For example, training using an ANN based on a Gaussian or Bayesian probabilistic models to evaluate drowning confidence level associated with a probability of drowning may be used to determine whether the criterion is met. As another example, the probabilistic model is built based on ground truth. The model may allow the system to more accurately determine an occurrence of an event.

[0192] In some embodiments, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method includes determining whether the tracked swimmer is moving relative to a center of the tracked swimmer; in accordance with a determination that the tracked swimmer is moving relative to the center of the tracked swimmer, updating the criterion emphasis factors of the tracked swimmers; and in accordance with a determination that the tracked swimmer is not moving relative to the center of the tracked swimmer, forgoing updating the criterion emphasis factors of the tracked swimmers. For example, the criterion emphasis factor may be an adjustment factor (e.g., a numerical weight) associated with a criterion that affects how likely the criterion is met. A movement of a tracked swimmer is identified. For example, the movement of the tracked swimmer includes movement relative to the center of the tracked swimmer (e.g., the limbs of the swimmer are moving relative to the center of the swimmer, the swimmer is moving in a bounded box). In accordance with a determination that the tracked swimmer is moving relative to the center of the tracked swimmer, the criterion emphasis factors of the tracked swimmers are updated because the associated foreground object is more likely to be a swimmer (e.g., an inanimate object is less likely to be moving relative to its center). As an exemplary advantage, if other features are insufficient (e.g., confidence is low) to determine other foreground objects from active objects (e.g., people, animals, etc.), determining whether a swimmer is moving relative to a center or whether a swimmer is moving in a bounded box and updating a criterion emphasis factor in accordance with the determination increase swimmer or active object identification confidence.

[0193] In some examples, a person determined to be not wearing swimwear (e.g., other occupant 114A) falling into the swimming pool may be associated with a more emphasized criterion emphasis factor because it is more likely that this person is drowning. If the outfit is in a non-human skin color, it may be identified using RGB color thresholding. For example, outfits such as wet- suits and swimsuits may be identified due to their stark contrast such as black, blue, and red. As another example, a person wearing or not wearing a swim cap may be identified by the person’s head geometry and color (e.g., head shape, color of the top of the swimmer’s head). As an exemplary advantage, a swimmer may be more accurately determined, and misidentification of swimmers may be reduced. [0194] In some embodiments, the method 300 includes determining the tracked swimmer is an animal based on at least a size, geometry, and movement of the animal, and in accordance with a determination that the tracked swimmer is the animal, the criterion is met. For example, the system may be trained to identify animals based on differentiating features such as size, shape, structure (e.g., tail, legs), and complexity. As another example, an animal is determined based on the movement of a foreground object relative to a center of the foreground object (e.g., the limbs of the animal are moving relative to the center of the animal, the limbs of the animal are moving within a bounded box). If an animal is determined to fall into water, an alarm (as disclosed herein) may be generated in response. In some embodiments, in response to a selection on a user interface, the system may forgo generating an alarm when an animal is determined to be in the swimming pool (e.g., a dog may be able to swim in the swimming pool). As an exemplary advantage, if other features are insufficient (e.g., confidence is low) to determine other foreground objects from an animal, determining whether the animal is moving relative to a center or whether the animal is moving in a bounded box increases animal identification confidence.

[0195] FIG. 3B illustrates a method 350 of operating an image based tracking system, in accordance with an embodiment. In some embodiments, the method 350 is performed with a system comprising a video camera configured to capture frames of a swimming pool (e.g., camera 102, camera 202), a computing system configured to communicate with the camera and including a processor and memory (e.g., as described with respect to FIGs. 1A, IB, 2A, 2B, 4, and 5); and a program stored in the memory, configured to be executed by the processor and including instructions to perform the method.

[0196] Although the method 350 is illustrated as including the described steps, it is understood that different order of step, additional step (e.g., combination with other methods disclosed herein), or less step may be included without departing from the scope of the disclosure. For examples, steps of method 350 may be performed with steps of other methods disclosed herein. In some embodiments, the method 350 is performed with at least one of image based tracking system in FIG. 1A or IB, image based tracking system 200, aquatic alert system 400, and aquatic alert system 500. For the sake of brevity, some elements and advantages associated with these image based tracking systems are not repeated here. [0197] In some embodiments, the method 350 includes receiving frames captured with a video camera (step 352). For example, frames captured with camera 102, 202, 402A, 402B, 402C, or 502 are received (e.g., by a processor of a device analyzing the frames).

[0198] In some embodiments, the frames include a view of an area, and the method 350 further includes defining a virtual boundary, wherein the virtual boundary surrounds the area. For example, as described with respect to FIGs. IB and 2, a virtual fence is defined, and the virtual fence surrounds an area of interest. In some embodiments, the frames comprise a view of a swimming pool. For example, the image based tracking system is a disclosed aquatic alert system, and frames captured with a disclosed camera include a view of a swimming pool.

[0199] In some embodiments, the method 350 includes for each frame captured with the video camera, identifying, using a model, foreground pixels in the frame, wherein the identified foreground pixels correspond to an identified foreground object (step 354). For example, as described with respect to FIGs. IB and 2, a disclosed model is used to identified foreground pixels corresponding to an identified foreground object. In some embodiments, the model is a deep learning model, an Artificial Neural Network algorithm, or a Random Forest algorithm.

[0200] In some embodiments, the method 350 includes tracking, using the disclosed model, each identified foreground object (step 356). For example, as described with respect to FIGs. IB and 2, an object of interest is tracked using the model.

[0201] In some embodiments, the method 350 includes tracking, using an object tracking algorithm, a foreground object. For example, as described with respect to FIGs. IB and 2, an object of interest is tracked using a disclosed object tracking algorithm.

[0202] In some embodiments, the method 350 includes determining whether the model is tracking the foreground object. In accordance with a determination that the foreground object is not tracked using the model, the foreground object is tracked using the object tracking algorithm, and in accordance with a determination that the foreground object is tracked using the model, the foreground object continues to be tracked using the model. For example, as described with respect to FIGs. IB and 2, if an object of interest cannot be tracked by the model, then the object tracking algorithm advantageously continues to track the object.

[0203] In some embodiments, the method 350 includes determining whether a criterion is met for a foreground object; in accordance with a determination that the criterion is met for the foreground object, generating a detection signal indicating an event occurrence associated with the foreground object; and in accordance with a determination that the criterion is not met for the foreground object, forgoing generating the detection signal. For example, as described herein, a criterion is met for an object of interest, and in accordance with a determination that the criterion is met for the object of interest, a detection signal is generated indicating an event associated with the object of interest has occurred.

[0204] In some embodiments, the each foreground object is a swimmer, and the method 350 further includes, based on the identified foreground pixels, tagging the swimmer in the frame with a respective identifier. For example, the image based tracking system is a disclosed aquatic alert system, and identified swimmers are tagged by the system.

[0205] In some embodiments, the method 350 includes identifying, without using the model, second foreground pixels in the frame, wherein the identified second foreground pixels correspond to identified a second identified foreground object. For example, as described with respect to FIG. 2B, a disclosed image based tracking system uses a first object identification algorithm (e.g., using a disclosed model) to identify a first object and a second object identification algorithm (e.g., using steps of method 300) to identify a second object.

[0206] In some embodiments, the first identified foreground object is the second identified foreground object. For example, as described with respect to FIG. 2B, the first object identification algorithm and the second object identification algorithm are able to identify a same object (e.g., object 278 in frame 252A, object 282 in frame 252A).

[0207] In some embodiments, the method 350 includes updating a counter associated with the second identified object. For example, as described with respect to FIG. 2B, the second object identification algorithm identifies a foreground object, and a counter associated with the identified object is updated (e.g., increased).

[0208] In some embodiments, the method 350 includes updating a counter associated with the identified object. For example, as described with respect to FIG. 2B, the first object identification algorithm identifies a foreground object, and a counter associated with the identified object is updated (e.g., increased).

[0209] In some embodiments, the method 350 includes updating a counter associated with a non-foreground object. For example, as described with respect to FIG. 2B, in frame 252A, the object 280 is not identified as a foreground object, and a counter associated with the object is updated (e.g., decreased). [0210] FIG. 4 illustrates an image based tracking system, in accordance with an embodiment. In some embodiments, the image based tracking system is aquatic alert system 400 includes a camera (e.g., camera 402A, 402B, 402C) and a computing system 404. In some embodiments, the aquatic alert system 400 includes an alarm (e.g., alarm 416A, 416B, 416C). Although the aquatic alert system 400 is described with the illustrated elements, it is understood that the aquatic alert system 400 may include more or less elements or may be combined with elements of other embodiments described in the disclosure. For example, the aquatic alert system 400 may include any number of cameras, computing systems, and alarms, and may be configured to communicate with any number of clients and/or routers. Although the aquatic alert system 400 is described with respect to a swimmer, it is understood that “swimmer” is not limiting. For example, features of the aquatic alert system may be used to detect undesired objects (e.g., animals, someone who accidentally fell into the swimming pool, waste) or an intruder in the swimming pool.

[0211] In some embodiments, the camera is camera 102 or camera 202. In some embodiments, the aquatic alert system 400 includes at least one camera (e.g., camera 402A, camera 402B, camera 402C). For example, each camera covers a different area of a swimming pool or covers the swimming pool at different angles.

[0212] In some embodiments, the camera is configured to capture frames of a swimming pool (e.g., swimming pool 100). In some embodiments, the aquatic alert system 400 includes more than one camera, and each camera covers a swimming pool from a different angle; each camera is configured to capture frames of the swimming pool from a different angle. In some embodiments, the aquatic alert system 400 includes more than one camera, and each camera covers a different area of a swimming pool; each camera is configured to capture frames of a corresponding portion of the swimming pool.

[0213] In some embodiments, the camera includes elements of the aquatic alert system 200 (e.g., processor 204, memory 206, data 208A, program 208B). In some embodiments, the aquatic alert system 400 includes a processor and memory separate from the camera (e.g., the processor is separate from the sensor of the camera; the processor is in a different housing than the camera; the processor and/or the memory are collocated with the camera (e.g., the processor and/or the memory and the camera are both proximate to the swimming pool)). In some embodiments, the processor and memory are in a same housing as the camera. In some embodiments, the computing system 404 is configured to communicate with the processor and the camera. In some embodiments, the processor associated with the camera is located within a range of the swimming pool (e.g., the camera is in visual range (e.g., a visual range of camera provides an image of sufficient detail/clarity that allows associated software to identify an object/swimmer in a pool) of the swimming pool, and the processor is within a communication range of the camera).

[0214] In some embodiments, the processor associated with the camera is configured to determine a swimmer is in the swimming pool. In some embodiments, determining whether a swimmer is in the swimming pool includes receiving frames from the video camera, identifying foreground pixels in the frames, and determining whether the identified foreground pixels correspond to the swimmer in the swimming pool. In some embodiments, determining whether a swimmer is in the swimming pool includes detecting, with a sensor, that an object is within the angle range and the distance range, as described in more detail herein.

[0215] For example, the camera captures frames of the swimming pool, or the processor associated with the camera receives frames of the swimming pool from the camera. From these frames, the camera or the processor associated with the camera identifies foreground pixels in the frame, and determines whether the foreground pixels correspond to a swimmer in the swimming pool. Examples of foreground pixel and swimmer detection are described with respect to the system in FIG. 1A or IB, system 200, method 300, and method 350. For the sake of brevity, those examples are not described again here.

[0216] In some embodiments, the processor associated with the camera is configured to transmit an instruction to receive captured frames from the video camera and to transmit the captured frames to the computing system in accordance with a determination that the swimmer is in the swimming pool. For example, the processor associated with the camera (e.g., a processor in a housing of the camera, a processor in communication with the camera) determines (e.g., using the methods described herein) that a swimmer is in the swimming pool. In accordance with a determination that the swimmer is in the swimming pool, the processor transmits an instruction (e.g., to a different processor, to itself) to receive the frames from the camera to the processor and to transmit the frames from the processor to the computing system 404 (e.g., for further processing, for event detection).

[0217] In some embodiments, transmitting the captured frames to the computing system comprises transmitting the captured frames using a protocol for streaming in real-time. For example, the protocol is at least one of RTSP, HTTP, HTTPS, and SDP. [0218] In some embodiments, in accordance with a determination that the swimmer is in the swimming pool, the processor transmits an instruction (e.g., to a different processor, to itself) to receive the frames from the camera to the processor and to transmit the frames from the processor to the computing system 404 (e.g., for further processing, for event detection) at a first rate. In such embodiments, in accordance with a determination that no swimmer is in the swimming pool, the process forgoes transmit the instruction (causing, e.g., the processor to transmit the frames at a second rate lower than the first, transmit no frames).

[0219] In some embodiments, the camera is in wireless communication with other elements of the aquatic alert system 400, and the camera’s source of power (e.g., a battery, a rechargeable battery, solar power) may be limited. By transmitting the captured frames (or transmitting the captured frames at a higher rate) to the computing system in accordance with a determination that a swimmer is in the swimming pool (e.g., streaming when someone is in the swimming pool, not streaming when no one is in the swimming pool), camera power consumption (e.g., transmission power) may be advantageously reduced because less power may be consumed in scenarios when an object in the swimming pool is less likely, allowing the source of power to be a feasible primary source of power. For example, using the methods and system described herein, the battery may power the camera for up to days to weeks a single charge, compared to hours to days for a camera that transmits the captured frames whether a swimmer is in the pool or not or a camera that performs on-board drowning detection (which may be more compute-intensive and power consuming). Furthermore, having a more compact power source allows the camera to be installed without connecting to an alternative source of power, simplifying camera installation (e.g., less components (e.g., wires) are needed to install the camera), allowing more camera installation location options, reducing cost, and reducing maintenance. In some embodiments, a charge on a battery of the camera is low (e.g., less than a threshold charge (e.g., 10%, 20%)), an alert is generated (e.g., by the camera, by the processor associated with the camera, by the computing system) to notify a user about the low battery charge.

[0220] In some embodiments, the processor associated with the camera is configured to forgo transmitting the instruction in accordance with a determination that the swimmer is not in the swimming pool. For example, in accordance with a determination that no swimmer is in the swimmer pool, the camera does not transmit captured frames to the computing system 404. [0221] In some embodiments, the processor associated with the camera receives frames from the camera. The camera or the processor identifies an area of one of the frames that includes a threshold amount of pixels associated with the swimming pool and identifies a contour bordering the area in the one of the frames. For example, the contour corresponds to a perimeter of the swimming pool. In accordance with a determination that the entire contour is within the frames, the aquatic alert system 400 identifies the swimming pool from the frames. In some embodiments, the pixels associated with the swimming pool are at least one of blue pixels and light green pixels (e.g., colors associated with water).

[0222] For example, during installation of the aquatic alert system 400, the camera is configured to automatically identify a swimming pool. The camera captures frames in its view and identifies an area that includes more than a threshold of swimming pool pixels and identifies a contour bordering the area including more than a threshold amount of swimming pool pixels (e.g., image processing determines the area of the frame includes water pixels, the swimming pool is sufficiently in view). If the entire contour is within the field of view of the camera (e.g., entire contour of the swimming pool is within a frame), then the swimming pool is automatically identified and the camera has been properly installed.

[0223] In some instances, the camera may not be properly installed. In accordance with a determination that the entire contour is not within the frames or no area includes more than a threshold of swimming pool pixels, a request to reposition the video camera is generated (e.g., to a client device, a warning on the camera, a warning on a GUI of the computing system 404). For example, the field of view of the camera does not align with the swimming pool, and the camera is not properly installed. As another example, the camera may be too far from the swimming pool, and the camera is not properly installed. When the camera is not determined to be properly installed, a request to reposition the camera (e.g., to properly install the camera) is generated. By using the camera to determine whether the swimming pool is within a frame, the camera may be advantageously used to assist installation of the aquatic alert system, and the positioning of the camera may be more suitable for event detection. For example, compared to installation without camera assistance, the lighting and/or resolution of the captured frames may improve. Such improvements can be applied to other embodiments, with or without the system of FIG. 4. For example, identification of a swimming pool (e.g., for camera installation) by the camera may be applied to the embodiments of image based tracking system in FIG. 1A or IB, image based tracking system 200, and aquatic alert system 500. [0224] In some examples, more than one camera (e.g., camera 402A, 402B, 402C) is included in the aquatic alert system 400, and each camera is configured to capture frames from a portion of the swimming pool. In these examples, the entire contour of the swimming pool may not need to be in the frame of the cameras; the camera is properly installed when it is determined that the entirety of the swimming pool has been covered by the cameras.

[0225] In some instances, some conditions may cause the accuracy of swimmer and/or event detection to reduce. For example, a view of the swimming pool is obstructed. As another example, bad weather condition causes the swimming pool and/or swimmer pixels to be less identifiable. In some embodiment, the camera or the processor determines that a swimming pool area of a frame includes less than a threshold amount of pixels associated with the swimming pool. In accordance with a determination that the swimming pool area of the frame includes less than the threshold mount of pixels associated with the swimming pool, the aquatic alert system (e.g., the camera, the processor associated with the camera, the computing system 404) generates a notification corresponding to the determination (e.g., an alert notification to a user indicating a view of the swimming pool is obstructed or reduced).

[0226] In some embodiments, the camera or the processor associated with the camera is configured to perform aspects of the disclosed image based tracking system associated with system in FIG. 1A or IB, system 200, method 300, and method 350. For the sake of brevity, these aspects are not described again.

[0227] In some embodiments, the computing system 404 includes elements of the image based tracking system 200 (e.g., processor 204, memory 206, data 208 A, program 208B, user interface 210). In some embodiments, as illustrated, the computing system 404 includes a bridge 406. For example, the bridge 406 is an ONVIF/RTSP bridge configured to receive frames captured from the camera (e.g., after a swimmer is determined to be in the swimming pool).

[0228] In some embodiments, the computing system 404 wirelessly communicates with the camera. As an exemplary advantage, the elements and/or methods described herein allows the camera to be installed wirelessly and communicate wirelessly. By allowing the camera to be installed wirelessly and communicating wirelessly, camera installation is simplified, and more camera installation location options are possible. Additionally, with a more simplified system, cost and maintenance are reduced. [0229] In some embodiments, the alarm is alarm device 104A, 104B, 104C, or 216. In some embodiments, the alarm is configured to generate an alert associated with an event associated with the swimmer. In some embodiments, the alarm generates an alert in response to receiving an event detection signal. In accordance with a determination of the occurrence of the event (e.g., by the computing system 404, by the processor 408), the computing system 404 or the processor 408 transmits the event detection signal to the alarm (e.g., to generate the alert). In some embodiments, the alert includes an alert on a client device (e.g., client 414A, 414B, 414C) indicating the event detection (e.g., an alert that someone is drowning, an intruder alert, an undesired object alert). For example, an alert is broadcasted using a smart speaker.

[0230] In some embodiments, the aquatic alert system 400 includes a processor 408. In some embodiments, the processor 408 is an AI processor. In some embodiments, the processor 408 is included in the computing system 404. In some embodiments, the processor 408 receives the captured frames (e.g., from the camera, in accordance to a determination that a swimmer is in the swimming pool, etc.). The processor 408 determines, based on the received captured frames, occurrence of an event associated with the swimmer. In some embodiments, the processor 408 is configured to perform aspects of the disclosed aquatic alert system associated with system in FIG. 1A or IB, system 200, method 300, and method 350. For the sake of brevity, these aspects are not described again.

[0231] In some embodiments, the processor 408 performs more computation intensive and power-consuming processes such as analysis of the frames captured by the camera and determination of an occurrence of an event (e.g., associated with system in FIG. 1A or IB, system 200, method 300, and method 350). In some embodiments, the processor associated with the camera does not perform these more computation intensive and power-consuming processes. By performing more computation intensive and power-consuming processes at a different processor and not at the processor associated with the camera, the processor associated with the camera may advantageously be more power efficient.

[0232] In some embodiments, the aquatic alert system 400 includes a first router 410 configured to wirelessly communicate with the computing system and the alarm over a first network connection. In some embodiments, the first router 410 is a part of the computing system 404. In some embodiments, the first router 410 wirelessly communicates with the camera and/or computing system 404 and the alarm over the first network connection in accordance with a determination that the system is not connected to a second network. [0233] For example, the first router 410 is a fallback router that is configured for wireless connection over a first network (e.g., an internal network, a network different than a second network). The camera, the computing system 404, and/or the alarm are in wireless communication initially over a second network (e.g., a default network, a WiFi network (e.g., using second router 412), an internet connection (e.g., using second router 412), an external network, a network different than the first network). In some instances, the second network becomes unavailable (e.g., unstable network connection, power outage), and in accordance with a determination that the camera, the computing system 404, and/or the alarm is not connected to the second network (e.g., due to the unavailability), the camera, the computing system 404, and/or the alarm wirelessly communicate over the first network using the first router 410. In some embodiments, an alert is generated to notify a user that the first router is active and/or the second network is not available.

[0234] As an exemplary advantage, when a default communication connection (e.g., WiFi, internet) is unavailable, the first router allows the aquatic alert system to continue to detect for an event in the swimming pool. Allowing the aquatic alert system to continue to detect for an event during an unavailability may improve safety for a swimmer or a user of the aquatic alert system. For example, without the first router, if a swimmer is experiencing difficulty (e.g., drowning, injured) during connection unavailability, no alert may be generated to indicate that the swimmer requires assistance. As another example, without the first router, if an intruder enters the swimming pool during connection unavailability, no alert may be generated to warn a user about the intruder.

[0235] In some embodiments, the aquatic alert system 400 includes a second router 412 configured to wirelessly communicate with the computing system 404 and the alarm over a second network connection. For example, the second router 412 is a WiFi router, and the WiFi router is connected to the alarm over a WiFi or an internet connection.

[0236] In some embodiments, the aquatic alert system 400 is connected to a client (e.g., client 414A, 414B, 414C). In some embodiments, the client is a client device. For example, the client is at least one of a user of the aquatic alert system, a lifeguard, a safety personnel, a guardian of a swimmer, a facilities manager, a homeowner, and a supervisor, and the client device is at least one of a phone, a tablet, a laptop, an IoT device (e.g., a smart speaker), a smart home terminal, a security monitor, and a display. [0237] In some embodiments, the client transmits a request for frames from the camera. In some embodiments, the camera, the processor associated with the camera, or the computing system 404 receives the request for frames from the video camera from the client device, and in response to receiving the request for the frames, the camera, the processor associated with the camera, or the computing system 404 transmits the frames to the device.

[0238] For example, a user of the aquatic alert system requests a live stream of the swimming pool. Using the user’s device, a request for the live stream is transmitted. The camera, the processor associated with the camera, or the computing system 404 receives the request for the live stream, and in response to receiving the request, the camera, the processor associated with the camera, or the computing system 404 transmits the requested live stream to the user’s device (e.g., for display).

[0239] In some embodiments, the aquatic alert system 400 includes a sensor (not shown) configured to detect an angle and a distance of an object relative to the sensor. The swimming pool spans an angle range and a distance range relative to the sensor, and determining whether the swimmer in the swimming pool includes detecting that the object (e.g., a swimmer) is within the angle range and the distance range with the sensor. In some embodiments, the sensor is a passive infrared sensor (PIR) sensor comprising a Fresnel lens.

[0240] For example, the swimming pool is located between -30 degrees and 30 degrees and between 5 m to 7.2 m relative to the sensor. It is understood that these values are exemplary. If the sensor detects an object within the angle range and the distance range relative to the sensor, then a swimmer is determined to be in the swimming pool (e.g., then frames from the camera is transmitted to the computing system for further processing).

[0241] In some embodiments, the camera is in wireless communication with other elements of the aquatic alert system 400, and the camera’s source of power (e.g., a battery, a rechargeable battery, solar power) may be limited. By using the sensor and transmitting the captured frames to the computing system in accordance with a determination that a swimmer is in the swimming pool (e.g., streaming when someone is in the swimming pool, not streaming when no one is in the swimming pool), camera power consumption (e.g., transmission power, power used to capture/analyze frames for swimmer detection) may be advantageously reduced because less power may be consumed in scenarios when an object in the swimming pool is less likely, allowing the source of power to be a feasible primary source of power. For example, using the methods and system described herein, the battery may power the camera for up to days to weeks on a single charge, compared to hours to days for a camera that transmits the captured frames whether a swimmer is in the pool or not. Furthermore, having a more compact power source allows the camera to be installed without connecting to an alternative source of power, simplifying camera installation (e.g., less components (e.g., wires) are needed to install the camera), allowing more camera installation location options, reducing cost, and reducing maintenance.

[0242] In some embodiments, the angle range and distance range relative to the sensor is determined using the camera to identify the swimming pool. The camera captures frames, and the camera or the processor associated with the camera identifies an area of one of the frames as including a threshold amount of pixels associated with the swimming pool (e.g., using the methods described herein). The angle range and the distance range (e.g., used to detect an object using the sensor) correspond to the identified area, and the area includes the threshold amount of pixels are inside a contour of the swimming pool (e.g., as described herein).

[0243] Although examples of the disclosed image based tracking systems and methods are described with respect to the aquatic alert system, it is understood that the disclosed image based tracking systems and methods are not limited to the illustrated uses (e.g., limited to aquatic alert). For example, in some embodiments, the system 400 is an image based tracking system that includes a camera, a processor, and a memory, and the image based tracking system is configured to perform operations described with respect to image based tracking system 150. In some embodiments, additional processor and memory are included in the system 400 and in a device (e.g., a cloud computing device) different than the camera for performing operations described with respect to image based tracking system 150.

[0244] FIGS. 5A-5C illustrate an image based tracking system, in accordance with an embodiment. In some embodiments, the image based tracking system is an aquatic alert system 500 including a camera 502, a computing system 504 including a bridge and a processor 508, and an alarm 514. In some embodiments, a processor associated with the camera 502 is located within a housing of the camera. In some embodiments, a processor associated with the camera 502 is located outside a housing of the camera (not shown).

[0245] In some embodiments, the aquatic alert system 500 includes elements of at least one of image based tracking system in FIG. 1A or IB, image based tracking system 200, and aquatic alert system 400. For example, camera 502 is at least one of camera 102, camera 202, 402A, 402B, and 402C, computing system 504 is computing system 404 or includes elements of aquatic system 200, and alarm 514 is at least one of alarm device 104, alarm device 212, alarm 416A, alarm 416B, and alarm 416C. In some embodiments, exemplary advantages of the aquatic alert system 500 are described with respect to FIGS. 1-4. For the sake of brevity, those advantages are not described here.

[0246] In some embodiments, the frame 518 illustrates a frame captured by the camera 502. In some embodiments, the frame 518 illustrates a portion of a frame captured by the camera 502. In some embodiments, the frame 518 illustrates a view of the swimming pool from a third person’s view (e.g., not the camera view). Although the frame 518 is illustrated as a frame at a moment in time, it is understood that the frame 518 may represent more than one frame over a period of time. In some embodiments, content of the frame 518 may be viewed on a client device 514 in response to a request for the captured frames, as described with respect to FIG. 4.

[0247] Although the aquatic alert system 500 is described with respect to a person 520, it is understood that the person and the exemplary actions of the person are not limiting. For example, features of the aquatic alert system may be used to detect undesired objects (e.g., animals, someone who accidentally fell into the swimming pool, waste) or an intruder in the swimming pool.

[0248] FIG. 5A illustrates a person 520 away from the swimming pool 522, in accordance with an embodiment. In some embodiments, at this time, the camera 502 or the processor associated with the camera determines that the person 520 is not in the swimming pool 522, transmission of an instruction to receive captured frames (and to transmit the captured frames to the computing system 504) is forgone, as illustrated by a lack of a connection between the camera 502 and the computing system 504.

[0249] FIG. 5B illustrates a person 520 in the swimming pool 522, in accordance with an embodiment. For example, the person 520 from FIG. 5A decided to jump into the swimming pool 522 and started swimming. In some embodiments, at this time, the camera 502 or the processor associated with the camera determines that the person 520 (e.g., a swimmer) is in the swimming pool 522, an instruction to receive captured frames (and to transmit the captured frames to the computing system 504) is transmitted, as illustrated by a connection between the camera 502 and the computing system 504. [0250] In some embodiments, to determine that the person 520 is in the swimming pool 522, the camera 502 or the processor associated with the camera 502 receives the frame 518, identifies foreground pixels in the frame 518, and determines whether the identified foreground pixels correspond to the swimmer in the swimming pool (e.g., person 520 in the swimming pool 522). Exemplary elements and/or methods for identifying foreground pixels are described with respect to FIGS. 1-4. For the sake of brevity, these elements and/or methods are not described here.

[0251] In some embodiments, the connection between the camera 502 and the computing system 504 includes transmission of the captured frames (e.g., from frame 518) using a protocol for streaming in real-time. In some embodiments, the computing system includes an ONVIF/ RTSP bridge and is configured to receive the captured frames, as illustrated.

[0252] FIG. 5C illustrates a person 520 involved in an event (e.g., drowning, injury) in the swimming pool 522, in accordance with an embodiment. For example, the person 520 from FIG. 5B began to struggle in the swimming pool. In some embodiments, at this time, the processor 508 (e.g., processor 204, processor 408) of the computing system 504 receives the captured frames (e.g., frame 518 from camera 502 over the bridge) and determines occurrence of an event (e.g., prolonged submergence, struggling to stay afloat, drowning, etc.) associated with the swimmer based on the received captured frames.

[0253] In some embodiments, in accordance with a determination of the occurrence of the event, an event detection signal is transmitted to the alarm 516, and in response to receiving an event detection signal, the alarm 516 generates an alert (e.g., to seek assistance for the drowning person 520). In some embodiments, the alert includes an alert on a client device (e.g., client 514) indicating the event detection (e.g., an alert that someone is drowning, an intruder alert, an undesired object alert). Exemplary elements and/or methods for event detection are described with respect to FIGS. 1-4. For the sake of brevity, these elements and/or methods are not described here.

[0254] Although examples of the disclosed image based tracking systems and methods are described with respect to the aquatic alert system, it is understood that the disclosed image based tracking systems and methods are not limited to the illustrated uses (e.g., limited to aquatic alert). For example, in some embodiments, the system 500 is an image based tracking system that includes a camera, a processor, and a memory, and the image based tracking system is configured to perform operations described with respect to image based tracking system 150. In some embodiments, additional processor and memory are included in the system 400 and in a device (e.g., a cloud computing device) different than the camera for performing operations described with respect to image based tracking system 150.

[0255] FIG. 6 illustrates a method 600 of operating an image based tracking system, in accordance with an embodiment. In some embodiments, the method 600 is a method of operating an aquatic alert system. Although the method 600 is illustrated as including the described steps, it is understood that different order of step, additional step (e.g., combination with other methods disclosed herein), or less step may be included without departing from the scope of the disclosure. For examples, steps of method 600 may be performed with steps of other methods disclosed herein. In some embodiments, the method 600 is performed with at least one of image based tracking system in FIG. 1A or IB, image based tracking system 200, aquatic alert system 400, and aquatic alert system 500. For the sake of brevity, some elements and advantages associated with these image based tracking systems are not repeated here.

[0256] In some embodiments, the method 600 includes determining whether a swimmer is in the swimming pool (step 602). For example, as described with respect to FIGS. 5 A and 5B, the aquatic alert system 500 determines whether the person 520 is in the swimming pool.

[0257] In some embodiments, determining whether a swimmer is in the swimming pool includes receiving frames from the video camera, identifying foreground pixels in the frames, and determining whether the identified foreground pixels correspond to the swimmer in the swimming pool. For example, as described with respect to FIGS. 5 A and 5B, to determine whether that the person 520 is in the swimming pool 522, the camera 502 or the processor associated with the camera 502 receives the frame 518, identifies foreground pixels in the frame 518, and determines whether the identified foreground pixels correspond to the swimmer in the swimming pool (e.g., person 520 in the swimming pool 522).

[0258] In some embodiments, the method 600 includes in accordance with a determination that the swimmer is in the swimming pool, transmitting an instruction to receive captured frames from the video camera and to transmit the captured frames to the computing system (step 604). For example, as described with respect to FIG. 5B, the aquatic alert system 500 determines that the person 520 is in the swimming pool, and an instruction to receive captured frames from the video camera and to transmit the captured frames to the computing system is transmitted. [0259] In some embodiments, the method 600 includes in accordance with a determination that the swimmer is in the swimming pool, the processor transmits an instruction (e.g., to a different processor, to itself) to receive the frames from the camera to the processor and to transmit the frames from the processor to the computing system 404 (e.g., for further processing, for event detection) at a first rate.

[0260] In some embodiments, transmitting the captured frames to the computing system includes transmitting the captured frames using a protocol for streaming in real-time. For example, as described with respect to FIG. 5B, the frames 518 are transmitted to the computing system 504 using a protocol for streaming in real-time.

[0261] In some embodiments, the method 600 includes in accordance with a determination that the swimmer is not in the swimming pool, forgoing transmitting the instruction (step 606). For example, as described with respect to FIG. 5A, the aquatic alert system 500 determines that the person 520 is not in the swimming pool, and an instruction to receive captured frames from the video camera and to transmit the captured frames to the computing system is not transmitted

[0262] In some embodiments, the method 600 includes in accordance with a determination that the swimmer is in the swimming pool, the processor transmits an instruction (e.g., to a different processor, to itself) to receive the frames from the camera to the processor and to transmit the frames from the processor to the computing system 404 (e.g., for further processing, for event detection) at a second rate, lower than the first rate.

[0263] In some embodiments, the method 600 includes generating an alert associated with an event associated with the swimmer and wirelessly communicating, with a router, with the computing system and the alarm over a first network connection. In some embodiments, the router wirelessly communicates with the computing system and the alarm over the first network connection in accordance with a determination that the system is not connected to a second network. For example, as described with respect to FIG. 4, the first router 410 is a fallback router that is configured for wireless connection over a first network (e.g., an internal network, a network different than a second network). The camera (e.g., camera 402A, 402B, 402C), the computing system 404, and/or the alarm (e.g., alarm 416A, 416B, 416C) are in wireless communication initially over a second network (e.g., a default network, a WiFi network (e.g., using second router 412), an internet connection (e.g., using second router 412), an external network, a network different than the first network). In some instances, the second network becomes unavailable (e.g., unstable network connection, power outage), and in accordance with a determination that the camera, the computing system 404, and/or the alarm is not connected to the second network (e.g., due to the unavailability), the camera, the computing system 404, and/or the alarm wirelessly communicate over the first network using the first router 410.

[0264] In some embodiments, the method 600 includes receiving, from a device, a request for frames from the video camera; and in response to receiving the request for the frames, transmitting a second instruction to receive the frames from the video camera and to transmit the frames to the device. For example, a client device (e.g., client 414A, client 414B, client 414C, client 514) requests for a stream of the swimming pool, and in response to the request, a stream is provided to the client device.

[0265] In some embodiments, the method 600 includes receiving frames from the video camera, identifying an area of one of the frames comprising a threshold amount of pixels associated with the swimming pool, identifying a contour bordering the area in the one of the frames, the contour corresponding to a perimeter of the swimming pool, and in accordance with a determination that the entire contour is within the frames, identifying the swimming pool from the frames. In some embodiments, the method 600 includes in accordance with a determination that the entire contour is not within the frames, generating a request to reposition the video camera. For example, as described with respect to FIG. 4, the camera (e.g., camera 402A, 402B, 402C) is used to determine whether a swimming pool is within a frame of the camera (e.g., during installation), and a warning to reposition the camera is generated when the swimming pool is not entirely within the frame of the camera.

[0266] In some embodiments, the method 600 includes in accordance with a determination that the swimming pool area of the frame includes less than the threshold mount of pixels associated with the swimming pool, generating a notification corresponding to the determination. For example, an alert notification is generated for a user indicating a view of the swimming pool is obstructed or reduced). In some embodiments, the method 600 includes in accordance with a determination that the swimming pool area of the frame includes at least the threshold mount of pixels associated with the swimming pool, forgoing generating the notification corresponding to the determination.

[0267] In some embodiments, the swimming pool spans an angle range and a distance range relative to a sensor configured to detect an angle and a distance of an object relative to the sensor, and determining whether the swimmer in the swimming pool includes detecting, with the sensor, that the object is within the angle range and the distance range. For example, as described with respect to FIG. 4, a PIR sensor is used to determine whether a swimmer is in the swimming pool. In some embodiments, the swimming pool’s angle range and distance range relative to the sensor is determine as described with respect to FIG. 4.

[0268] In some embodiments, the method 600 includes receiving the captured frames and determining, based on the received captured frames, occurrence of an event associated with the swimmer. For example, as described with respect to FIG. 5C, the processor 508 (e.g., processor 204, processor 408) of the computing system 504 receives the captured frames (e.g., frame 518 from camera 502 over the bridge) and determines occurrence of an event (e.g., drowning) associated with the swimmer based on the received captured frames.

[0269] In some embodiments, the method 600 includes in accordance with a determination of the occurrence of the event, transmitting the event detection signal to the alarm, and in response to receiving an event detection signal, the alarm 516 generates an alert (e.g., to seek assistance for the drowning person 520). In some embodiments, the method 600 includes in accordance with a determination of the event is not occurring, forgoing transmitting the event detection signal to the alarm. In some embodiments, the alert includes an alert on a client device (e.g., client 514) indicating the event detection (e.g., an alert that someone is drowning, an intruder alert, an undesired object alert). Exemplary elements and/or methods for event detection are described with respect to FIGS. 1-4. For the sake of brevity, these elements and/or methods are not described here.

[0270] FIG. 7 illustrates an example of a computing device 700, in accordance with an embodiment. In some embodiments, the device 700 is configured to be coupled to the disclosed systems and is configured to perform the operational methods associated with the systems disclosed herein.

[0271] Device 700 can be a host computer connected to a network. Device 700 can be a client computer (e.g., a disclosed computing system), a server (e.g., a disclosed computing system), a portable device (e.g., alarm device 214), or a camera system (e.g., camera 102, camera 202, camera 402A, camera 402B, camera 402C, camera 502). As shown in FIG. 7, device 700 can be any suitable type of microprocessor-based device, such as a dedicated computing device, a personal computer, work station, server, handheld computing device (portable electronic device) such as a smartwatch, phone, or tablet. The device can include, for example, one or more of processors 702, communication device 704, input device 706, output device 708, and storage 710. Input device 706 and output device 708 can generally correspond to those described above and can either be connectable or integrated with the computer.

[0272] Input device 706 can be any suitable device that provides input, such as a camera sensor, touchscreen, keyboard or keypad, mouse, voice-recognition device, or a user interface (e.g., user interface 210). Output device 708 can be any suitable device that provides output, such as an illuminator, a touchscreen (e.g., display 216), haptics device, or speaker.

[0273] Storage 710 can be any suitable device that provides storage, such as an electrical, magnetic, or optical memory including a RAM, cache, hard drive, or removable storage disk. In some examples, the storage 710 includes memory 206. Communication device 704 can include any suitable device capable of transmitting and receiving signals (e.g., streaming data) over a network, such as a network interface chip or device. The components of the computer can be connected in any suitable manner, such as via a physical bus, or wirelessly.

[0274] Software 712, which can be stored in storage 710 and executed by processor 702, can include, for example, the programming that embodies the functionality of the present disclosure (e.g., as embodied in the devices described above, a drowning detection program).

[0275] Software 712 can also be stored and/or transported within any non-transitory, computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as those described above, that can fetch instructions associated with the software from the instruction execution system, apparatus, or device and execute the instructions. In the context of this disclosure, a computer-readable storage medium can be any medium, such as storage 710, that can contain or store programming for use by or in connection with an instruction-execution system, apparatus, or device.

[0276] Software 712 can also be propagated within any transport medium for use by or in connection with an instruction-execution system, apparatus, or device, such as those described above, that can fetch instructions associated with the software from the instruction- execution system, apparatus, or device and execute the instructions. In the context of this disclosure, a transport medium can be any medium that can communicate, propagate, or transport programming for use by or in connection with an instruction-execution system, apparatus, or device. The transport readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, or infrared wired or wireless propagation medium.

[0277] Device 700 may be connected to a network (e.g., an internal network, an external network), which can be any suitable type of interconnected communication system. The network can implement any suitable communications protocol and can be secured by any suitable security protocol. The network can comprise network links of any suitable arrangement that can implement the transmission and reception of network signals, such as wireless network connections, mobile internet connections, Bluetooth connections, NFC connections, T1 or T3 lines, cable networks, DSL, or telephone lines.

[0278] Device 700 can implement any operating system suitable for operating on the network. Software 712 can be written in any suitable programming language, such as C, C++, Java, or Python. In various embodiments, application software embodying the functionality of the present disclosure can be deployed in different configurations, such as in a client/server arrangement or through a Web browser as a Web-based application or Web service, for example.

[0279] In one aspect, a method includes: receiving frames captured with a video camera; for each frame captured with the video camera, identifying, using a model, foreground pixels in the frame, wherein the identified foreground pixels correspond to an identified foreground object; and tracking, using the model, each identified foreground object.

[0280] In some aspects of the above method, the method further includes tracking, using an object tracking algorithm, a foreground object.

[0281] In some aspects of the above methods, the method further includes determining whether the model is tracking the foreground object. In accordance with a determination that the foreground object is not tracked using the model, the foreground object is tracked using the object tracking algorithm; and in accordance with a determination that the foreground object is tracked using the model, the foreground object continues to be tracked using the model.

[0282] In some aspects of the above methods, the object tracking algorithm is Kalman tracking, optical flow method, Lucas-Kanade Algorithm, Hom-Schunck method, or Black- Jepson method. [0283] In some aspects of the above methods, the model is a pre-trained supervised model, deep learning model, an ANN model, a RF model, a CNN model, a H-ELM model, a LBP model, a SIFT model, a HOG model, a FPDW model, or a SGD model.

[0284] In some aspects of the above methods, the frames comprise a view of an area, the method further comprising defining a virtual boundary, wherein the virtual boundary surrounds the area.

[0285] In some aspects of the above methods, the frames comprise a view of a swimming pool.

[0286] In some aspects of the above methods, the each foreground object is a swimmer, the method further comprising, based on the identified foreground pixels, tagging the swimmer in the frame with a respective identifier.

[0287] In some aspects of the above methods, the method further includes: determining whether a criterion is met for a foreground object; in accordance with a determination that the criterion is met for the foreground object, generating a detection signal indicating an event occurrence associated with the foreground object; and in accordance with a determination that the criterion is not met for the foreground object, forgoing generating the detection signal.

[0288] In some aspects of the above methods, the method further includes identifying, without using the model, second foreground pixels in the frame, wherein the identified second foreground pixels correspond to identified a second identified foreground object.

[0289] In some aspects of the above methods, the first identified foreground object is the second identified foreground object.

[0290] In some aspects of the above methods, the method further includes updating a counter associated with the second identified object.

[0291] In some aspects of the above methods, the method further includes updating a counter associated with the identified object.

[0292] In some aspects of the above methods, the method further includes updating a counter associated with a non-foreground object.

[0293] In one aspect, a system includes: a video camera; a processor and a memory; and a program stored in the memory, configured to be executed by the processor, and including instructions for performing any of the above methods. [0294] In one aspect, a non-transitory computer readable storage medium stores one or more programs, the one or more programs including instructions, which when executed by an electronic device with one or more processors and memory, cause the device to perform any of the above methods.

[0295] In one aspect, a system, comprises: a video camera configured to capture frames of a swimming pool; a computing system configured to communicate with the camera and including a processor and memory; and a program stored in the memory, configured to be executed by the processor, and including instructions for: receiving the frames captured with the video camera; for each frame captured with the video camera, identifying: interior pool pixels associated with an interior region of the swimming pool in the frame, the interior pool region including a water area of the swimming pool, background pixels in the frame, foreground pixels in the frame wherein the foreground pixels correspond to detected foreground objects, and swimming pool information associated with objects in the frame; based on the identified background pixels, foreground pixels, and swimming pool information: forming a block for each swimmer in the foreground pixels, and tagging each swimmer in the frame with a respective identifier; tracking each swimmer by using image tracking and motion prediction algorithms on the formed blocks; determining, based on the swimming pool information and the image tracking and motion prediction algorithms whether a criterion is met for a tracked swimmer; and in accordance with a determination that the criterion is met for the tracked swimmer, generating a detection signal indicating an event associated with the tracked swimmer.

[0296] In some aspects of the above system, the instructions further comprise: determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information; detecting a swimmer leaving or entering the interior pool region; updating the number of swimmers based on the swimmer detection; determining that the swimmer entered the interior pool region after a predetermined amount of time; and in accordance with the determination that the swimmer entered the interior pool region after the predetermined amount of time, tagging the swimmer with an identifier; and in response to detecting the swimmer leaving the interior pool region, untagging the swimmer.

[0297] In some aspects of the above systems, the instructions further comprise determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, and the criterion is met when a number of detected foreground objects is less than the number of swimmers. [0298] In some aspects of the above systems, the instructions further comprise determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, and the number of swimmers is a number of detected foreground objects.

[0299] In some aspects of the above systems, the criterion includes at least one of swimmer speed, swimmer posture, a splash threshold, an activity threshold, a submergence threshold, a submergence variance, and swimmer vertical movement.

[0300] In some aspects of the above systems, the criterion dynamically updates based on a depth corresponding to the swimmer’s position in the swimming pool.

[0301] In some aspects of the above systems, the criterion dynamically updates based a distance of the swimmer from the camera.

[0302] In some aspects of the above systems, the criterion dynamically updates based on a surrounding brightness of a camera view.

[0303] In some aspects of the above systems, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise: learning behaviors of the tracked swimmers; and updating the criterion emphasis factors of the tracked swimmers based on the learned behaviors.

[0304] In some aspects of the above systems, the instructions further comprise generating an alert associated with the event in response to the generated detection signal.

[0305] In some aspects of the above systems, the system further comprises a wearable device, wherein the instructions further comprise transmitting the generated alert to the wearable device.

[0306] In some aspects of the above systems, the computing system comprises a user interface, and the instructions further comprise: selecting, on the user interface, an activity in the swimming pool; and updating the criterion based on the selected activity.

[0307] In some aspects of the above systems, the computing system comprises a user interface, and determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise: selecting, on the user interface, a behavior of a tracked swimmer; and adjusting the criterion emphasis factors of the tracked swimmer based on the selected behavior.

[0308] In some aspects of the above systems, the instructions further comprise: tracking a history of the swimming pool; learning site attributes of the swimming pool based on the history; and updating the criterion based on the learned site attributes.

[0309] In some aspects of the above systems, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise: determining whether the swimming pool is a first type of swimming pool or a second type of swimming pool; in accordance with a determination that the swimming pool is the first type, setting the criterion emphasis factors of the tracked swimmers based on a first preset; and in accordance with a determination the swimming pool is the second type, setting the criterion emphasis factors of the tracked swimmers based on a second preset.

[0310] In some aspects of the above systems, the receiving of the frames with the video camera and the identifying of the interior pool pixels, the background pixels, the foreground pixels, and the swimming pool information are performed concurrently.

[0311] In some aspects of the above systems, identifying the interior pool pixels, the background pixels and the foreground pixels further comprises identifying at least one of shape, size, color, and geometry of objects in the interior pool pixels, the background pixels and the foreground pixels.

[0312] In some aspects of the above systems, the system further comprises solar panels configured to charge the camera.

[0313] In some aspects of the above systems, the instructions further comprise storing the captured frames in the computing system.

[0314] In some aspects of the above systems, the computing system and the camera are configured to communicate wirelessly.

[0315] In some aspects of the above systems, the receiving of the frames with the video camera includes using one of RTSP, HTTP, HTTPS, and SDP.

[0316] In some aspects of the above systems, the computing system is one of AI processor, cloud computing platform, a processor with AI and video/graphics booster technology having sufficient computation power and processing speed, a fast computing platform, and a parallel computing platform.

[0317] In some aspects of the above systems, the forming of the block for each swimmer comprises determining whether the block includes at least a threshold amount of foreground pixels.

[0318] In some aspects of the above systems, the instructions further comprises: identifying a difference between the identified background pixels at a first time and the identified background pixels at a second time, and dynamically updating the criterion based on the difference.

[0319] In some aspects of the above systems, the image tracking and motion prediction algorithms include at least one of Lucas-Kanade algorithm, Optical Flow Method, particle tracking, and Black-Jepson method.

[0320] In some aspects of the above systems, a first block associated with a first swimmer and a second block associated with a second swimmer at least partially overlap and form a third block, and the forming of the cluster of each swimmer further comprises using: a hierarchical k-means clustering algorithm to separate the first and second clusters, a Markov Random Field (MRF) to form the first and second clusters based on the identified background pixels, foreground pixels, and swimming pool information, and a linear prediction scheme to determine centroids of each swimmer by predicting direction and location of the swimmer.

[0321] In some aspects of the above systems, the instructions further comprise updating the criterion based on a user input.

[0322] In some aspects of the above systems, the instructions further comprise updating the criterion based on at least one of a Monte-Carlo simulation, user data, neural network data, and random forests.

[0323] In some aspects of the above systems, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise updating the criterion emphasis factors of the tracked swimmer based on at least one of a Monte-Carlo simulation and user data.

[0324] In some aspects of the above systems, the determination of whether a criterion is met for the tracked swimmer is further based on a probabilistic model. [0325] In some aspects of the above systems, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the instructions further comprise determining whether the tracked swimmer is moving relative to a center of the tracked swimmer; in accordance with a determination that the tracked swimmer is moving relative to the center of the tracked swimmer, updating the criterion emphasis factors of the tracked swimmers; and in accordance with a determination that the tracked swimmer is not moving relative to the center of the tracked swimmer, forgoing updating the criterion emphasis factors of the tracked swimmers.

[0326] In some aspects of the above systems, the instructions further comprise determining the tracked swimmer is an animal based on at least a size, geometry, and movement of the animal, and in accordance with a determination that the tracked swimmer is the animal, the criterion is met.

[0327] In one aspect, a method comprises: capturing, with a video camera, frames of a swimming pool; receiving the frames captured with the video camera; for each frame captured with the video camera, identifying: interior pool pixels associated with an interior region of the swimming pool in the frame, the interior pool region including a water area of the swimming pool, background pixels in the frame, foreground pixels in the frame, wherein the foreground pixels correspond to detected foreground objects, and swimming pool information associated with objects in the frame; based on the identified background pixels, foreground pixels, and swimming pool information: forming a block for each swimmer in the foreground pixels, and tagging each swimmer in the frame with a respective identifier; tracking each swimmer by using image tracking and motion prediction algorithms on the formed blocks; determining, based on the swimming pool information and the image tracking and motion prediction algorithms whether a criterion is met for a tracked swimmer; and in accordance with a determination that the criterion is met for the tracked swimmer, generating a detection signal indicating an event associated with the tracked swimmer.

[0328] In some aspects of the above method, the method further comprises determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information; detecting a swimmer leaving or entering the interior pool region; updating the number of swimmers based on the swimmer detection; determining that the swimmer entered the interior pool region after a predetermined amount of time; and in accordance with the determination that the swimmer entered the interior pool region after the predetermined amount of time, tagging the swimmer with an identifier; and in response to detecting the swimmer leaving the interior pool region, untagging the swimmer.

[0329] In some aspects of the above methods, the method further comprises determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, wherein the criterion is met when a number of detected foreground objects is less than the number of swimmers.

[0330] In some aspects of the above methods, the method further comprises determining a number of swimmers based on the interior pool and foreground pixels and the swimming pool information, wherein the number of swimmers is a number of detected foreground objects.

[0331] In some aspects of the above methods, the criterion includes at least one of swimmer speed, swimmer posture, a splash threshold, an activity threshold, a submergence threshold, a submergence variance, and swimmer vertical movement.

[0332] In some aspects of the above methods, the method further comprises dynamically updating the criterion based on a depth corresponding to the swimmer’s position in the swimming pool.

[0333] In some aspects of the above methods, the method further comprises dynamically updating the criterion based a distance of the swimmer from the camera.

[0334] In some aspects of the above methods, the method further comprises dynamically updating the criterion based on a surrounding brightness of a camera view.

[0335] In some aspects of the above methods, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises: learning behaviors of the tracked swimmers; and updating the criterion emphasis factors of the tracked swimmers based on the learned behaviors.

[0336] In some aspects of the above methods, the method further comprises generating an alert associated with the event in response to the generated detection signal.

[0337] In some aspects of the above methods, the method further comprises transmitting the generated alert to a wearable device. [0338] In some aspects of the above methods, the computing system comprises a user interface, and the method further comprises: selecting, on the user interface, an activity in the swimming pool; and updating the criterion based on the selected activity.

[0339] In some aspects of the above methods, the method further comprises determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer; selecting, on a user interface, a behavior of a tracked swimmer; and adjusting the criterion emphasis factors of the tracked swimmer based on the selected behavior.

[0340] In some aspects of the above methods, the method further comprises tracking a history of the swimming pool; learning site attributes of the swimming pool based on the history; and updating the criterion based on the learned site attributes.

[0341] In some aspects of the above methods, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises: determining whether the swimming pool is a first type of swimming pool or a second type of swimming pool; in accordance with a determination that the swimming pool is the first type, setting the criterion emphasis factors of the tracked swimmers based on a first preset; and in accordance with a determination the swimming pool is the second type, setting the criterion emphasis factors of the tracked swimmers based on a second preset.

[0342] In some aspects of the above methods, the receiving of the frames with the video camera and the identifying of the interior pool pixels, the background pixels, the foreground pixels, and the swimming pool information are performed concurrently.

[0343] In some aspects of the above methods, identifying the interior pool pixels, the background pixels and the foreground pixels further comprises identifying at least one of shape, size, color, and geometry of objects in the interior pool pixels, the background pixels and the foreground pixels.

[0344] In some aspects of the above methods, the method further comprises using solar panels to charge the camera.

[0345] In some aspects of the above methods, the method further comprises storing the captured frames in a computing system. [0346] In some aspects of the above methods, the computing system and the camera are configured to communicate wirelessly.

[0347] In some aspects of the above methods, wherein the computing system is one of AI processor, cloud computing platform, a processor with AI and video/graphics booster technology having sufficient computation power and processing speed, a fast computing platform, and a parallel computing platform.

[0348] In some aspects of the above methods, the receiving of the frames with the video camera includes using one of RTSP, HTTP, HTTPS, and SDP.

[0349] In some aspects of the above methods, the forming of the block for each swimmer comprises determining whether the block includes at least a threshold amount of foreground pixels.

[0350] In some aspects of the above methods, the method further comprises identifying a difference between the identified background pixels at a first time and the identified background pixels at a second time, and dynamically updating the criterion based on the difference.

[0351] In some aspects of the above methods, the image tracking and motion prediction algorithms include at least one of Lucas-Kanade algorithm, Optical Flow Method, particle tracking, and Black-Jepson method.

[0352] In some aspects of the above methods, a first block associated with a first swimmer and a second block associated with a second swimmer at least partially overlap and form a third block, and the forming of the cluster of each swimmer further comprises using: a hierarchical k-means clustering algorithm to separate the first and second clusters, a Markov Random Field (MRF) to form the first and second clusters based on the identified background pixels, foreground pixels, and swimming pool information, and a linear prediction scheme to determine centroids of each swimmer by predicting direction and location of the swimmer.

[0353] In some aspects of the above methods, the method further comprises updating the criterion based on a user input.

[0354] In some aspects of the above methods, the method further comprises updating the criterion based on at least one of a Monte-Carlo simulation, user data, neural network data, and random forest data. [0355] In some aspects of the above methods, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises updating the criterion emphasis factors of the tracked swimmer based on at least one of a Monte-Carlo simulation and user data.

[0356] In some aspects of the above methods, wherein the determination of whether a criterion is met for the tracked swimmer is further based on a probabilistic model.

[0357] In some aspects of the above methods, determining whether the criterion is met further comprises determining a probability of the event based on a criterion emphasis factor associated with the tracked swimmer, and the method further comprises: determining whether the tracked swimmer is moving relative to a center of the tracked swimmer; in accordance with a determination that the tracked swimmer is moving relative to the center of the tracked swimmer, updating the criterion emphasis factors of the tracked swimmers; and in accordance with a determination that the tracked swimmer is not moving relative to the center of the tracked swimmer, forgoing updating the criterion emphasis factors of the tracked swimmers.

[0358] In some aspects of the above methods, the method further comprises determining the tracked swimmer is an animal based on at least a size, geometry, and of the animal, and wherein in accordance with a determination that the tracked swimmer is the animal, the criterion is met.

[0359] In one aspect, a non-transitory computer readable storage medium stores one or more programs, the one or more programs comprising instructions, which when executed by an electronic device with one or more processors and memory, cause the device to perform any of the above methods.

[0360] In one aspect, a system includes: a video camera configured to capture frames of a swimming pool; a processor and a memory collocated with the video camera; a computing system configured to remotely communicate with the processor and memory; and a program stored in the memory, configured to be executed by the processor, and including instructions for: determining whether a swimmer is in the swimming pool; in accordance with a determination that the swimmer is in the swimming pool, transmitting an instruction to receive captured frames from the video camera and to transmit the captured frames to the computing system; and in accordance with a determination that the swimmer is not in the swimming pool, forgoing transmitting the instruction.

[0361] In some aspects of the above system, transmitting the captured frames to the computing system includes transmitting the captured frames using a protocol for streaming in real-time.

[0362] In some aspects of the above systems, determining whether a swimmer is in the swimming pool includes: receiving frames from the video camera; identifying foreground pixels in the frames; and determining whether the identified foreground pixels correspond to the swimmer in the swimming pool.

[0363] In some aspects of the above systems, the computing system includes an ONVIF/ RTSP bridge configured to receive the captured frames.

[0364] In some aspects of the above systems, the computing system is configured to wirelessly communicate with the video camera.

[0365] In some aspects of the above systems, the system further includes: an alarm configured to generate an alert associated with an event associated with the swimmer; and a router configured to wirelessly communicate with the computing system and the alarm over a first network connection.

[0366] In some aspects of the above systems, the router is configured to wirelessly communicate with the computing system and the alarm over the first network connection in accordance with a determination that the system is not connected to a second network.

[0367] In some aspects of the above systems, the program further includes instructions for: receiving, from a device, a request for frames from the video camera; and in response to receiving the request for the frames, transmitting a second instruction to receive the frames from the video camera and to transmit the frames to the device.

[0368] In some aspects of the above systems, the program further includes instructions for: receiving frames from the video camera; identifying an area of one of the frames including a threshold amount of pixels associated with the swimming pool; identifying a contour bordering the area in the one of the frames; and in accordance with a determination that the entire contour is within the frames, identifying the swimming pool from the frames.

[0369] In some aspects of the above systems, the pixels associated with the swimming pool are at least one of blue pixels and light green pixels. [0370] In some aspects of the above systems, the program further includes instructions for in accordance with a determination that the entire contour is not within the frames, generating a request to reposition the video camera.

[0371] In some aspects of the above systems, the program further includes instructions for: in accordance with a determination that the swimming pool area of the frame includes less than the threshold mount of pixels associated with the swimming pool, generating a notification corresponding to the determination; and in accordance with a determination that the swimming pool area of the frame includes at least the threshold mount of pixels associated with the swimming pool, forgoing generating the notification corresponding to the determination.

[0372] In some aspects of the above systems, the system further includes a sensor configured to detect an angle and a distance of an object relative to the sensor. The swimming pool spans an angle range and a distance range relative to the sensor, and determining whether the swimmer in the swimming pool includes detecting, with the sensor, that the object is within the angle range and the distance range.

[0373] In some aspects of the above systems, the sensor is a passive infrared sensor (PIR) sensor includes a Fresnel lens.

[0374] In some aspects of the above systems, the program further includes instructions for: capturing the frames with the video camera; and identifying an area of one of the frames including a threshold amount of pixels associated with the swimming pool, wherein the angle range and the distance range correspond to the identified area.

[0375] In some aspects of the above systems, the area including the threshold amount of pixels are inside a contour of the swimming pool.

[0376] In some aspects of the above systems, the computing system includes a second processor and a second memory, and a second program is stored in the second memory, configured to be executed by the second processor, and including instructions for: receiving the captured frames; and determining, based on the received captured frames, occurrence of an event associated with the swimmer.

[0377] In some aspects of the above systems, the system further includes an alarm configured to generate an alert in response to receiving an event detection signal, wherein the second program includes instructions further for in accordance with a determination of the occurrence of the event, transmitting the event detection signal to the alarm. [0378] In some aspects of the above systems, the video camera includes the processor and the memory.

[0379] In one aspect, a method includes steps the above systems are configured to perform.

[0380] In one aspect, a non-transitory computer readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device with one or more processors and memory, cause the device to perform the above method.

[0381] Generally, as used herein, the term “substantially” is used to describe element(s) or quantit(ies) ideally having an exact quality (e.g., fixed, the same, uniformed, equal, similar, proportional), but practically having qualities functionally equivalent to the exact quality. For example, an element or quantity is described as being substantially fixed or uniformed can deviate from the fixed or uniformed value, as long as the deviation is within a tolerance of the system (e.g., accuracy requirements, etc.). As another example, two elements or quantities described as being substantially equal can be approximately equal, as long as the difference is within a tolerance that does not functionally affect a system’s operation.

[0382] Likewise, although some elements or quantities are described in an absolute sense without the term “substantially”, it is understood that these elements and quantities can have qualities that are functionally equivalent to the absolute descriptions. For example, in some embodiments, a ratio is described as being one. However, it is understood that the ratio can be greater or less than one, as long as the ratio is within a tolerance of the system (e.g., accuracy requirements, etc.).

[0383] Although the disclosed embodiments have been fully described with reference to the accompanying drawings, it is to be noted that various changes and modifications will become apparent to those skilled in the art. Such changes and modifications are to be understood as being included within the scope of the disclosed embodiments as defined by the appended claims.

[0384] The terminology used in the description of the various described embodiments herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in the description of the various described embodiments and the appended claims, the singular forms “a”, “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term “and/or” as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. It will be further understood that the terms “includes,” “including,” “comprises,” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.