IP Library Granted Patent US 12,412,368
Granted Patent B2
US 12,412,368 · App. 17/939,256 · Granted Sep 9, 2025

Clustering videos using a self-supervised DNN

Inventors: Huseyin Coskun (Garfield, NJ); Alireza Zareian (Huntington Beach, CA); Joshua Moore (New York, NY); Chen Wang (Great Neck, NY)
Assignee: Snap Inc.
G06V10/762G06T5/50G06V10/82G06T2207/10016G06T2207/10024G06T2207/20081G06T2207/20224
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,412,368
App. No.
17/939,256
Granted
Sep 9, 2025
Kind
B2
Abstract

Systems and methods are provided for clustering videos. The system accesses a plurality of content items, the plurality of content items comprising a first set of RGB video frames and a second set of optical flow frames corresponding to the first set of RGB video frames. The system processes the first set of RGB video frames by a first machine learning model to generate a first optimal assignment for the first set of RGB video frames, the first optimal assignment representing initial clustering of the first set of RGB video frames. The system generates an updated first optimal assignment for the first set of RGB video frames based on the first optimal assignment for the first set of RGB video frames and a second optimal assignment of the second set of optical flow frames, the second optimal assignment representing initial clustering of the second set of optical flow frames.

Claims (60)

1. A method comprising:

accessing a plurality of content items, the plurality of content items comprising a first set of red, green, and blue (RGB) video frames and a second set of optical flow frames corresponding to the first set of RGB video frames;

processing the first set of RGB video frames by a first machine learning model to generate a first optimal assignment for the first set of RGB video frames, the first optimal assignment representing initial clustering of the first set of RGB video frames;

generating an updated first optimal assignment for the first set of RGB video frames based on both the first optimal assignment for the first set of RGB video frames and a second optimal assignment of the second set of optical flow frames, the second optimal assignment representing initial clustering of the second set of optical flow frames;

generating a set of augmentations of the first set of RGB video frames;

processing the set of augmentations by the first machine learning model to generate a third optimal assignment for the set of augmentations;

generating an updated third optimal assignment for the set of augmentations based on the third optimal assignment for the set of augmentations and the second optimal assignment of the second set of optical flow frames; and

updating one or more parameters of the first machine learning model based on a loss computed as a function of the updated first optimal assignment and the updated third optimal assignment.

2. The method of claim 1 , further comprising generating the second set of optical flow frames by:

obtaining first and second video frames from the first set of RGB video frames;

computing a difference frame comprising motion information based on a deviation between the first and second video frames; and

storing the difference frame as one of the second set of optical flow frames.

3. The method of claim 1 , further comprising:

processing the second set of optical flow frames by a second machine learning model to generate the second optimal assignment of the second set of optical flow frames.

4. The method of claim 3 , further comprising:

generating an updated second optimal assignment for the second set of optical flow frames based on the first optimal assignment for the first set of RGB video frames.

5. The method of claim 4 , further comprising:

computing a deviation between the updated first optimal assignment and the updated second optimal assignment; and

updating one or more parameters of at least one of the first or second machine learning models based on the computed deviation.

6. The method of claim 3 , wherein the first and second machine learning models each comprise a deep neural network (DNN) comprising one or more encoders.

7. The method of claim 3 , wherein the first machine learning model is trained to generate a first set of features corresponding to the first set of RGB video frames, and wherein the second machine learning model is trained to generate a second set of features corresponding to the second set of optical flow frames.

8. The method of claim 7 , wherein the first and second machine learning models are trained in an unsupervised manner end-to-end.

9. The method of claim 1 , wherein the initial clustering of the first set of RGB video frames represents different human activity depicted in the first set of RGB video frames.

10. The method of claim 1 , further comprising:

generating a first set of vectors in response to processing the first set of RGB video frames by the first machine learning model, the first set of vectors representing features of the first set of RGB video frames; and

matching the first set of vectors to prototype cluster centers to generate the first optimal assignment for the first set of RGB video frames.

11. The method of claim 10 , further comprising applying a Sinkhorn-Knopp technique to match the first set of vectors to the prototype cluster centers.

12. The method of claim 10 , further comprising applying a trained regularization term to equally space the prototype cluster centers.

13. The method of claim 1 , wherein generating the updated first optimal assignment for the first set of RGB video frames comprises applying a k-means algorithm to the first optimal assignment for the first set of RGB video frames and the second optimal assignment of the second set of optical flow frames.

14. A system comprising:

at least one processor programmed to perform operations comprising:

accessing a plurality of content items, the plurality of content items comprising a first set of red, green, and blue (RGB) video frames and a second set of optical flow frames corresponding to the first set of RGB video frames;

processing the first set of RGB video frames by a first machine learning model to generate a first optimal assignment for the first set of RGB video frames, the first optimal assignment representing initial clustering of the first set of RGB video frames;

generating an updated first optimal assignment for the first set of RGB video frames based on both the first optimal assignment for the first set of RGB video frames and a second optimal assignment of the second set of optical flow frames, the second optimal assignment representing initial clustering of the second set of optical flow frames;

generating a set of augmentations of the first set of RGB video frames;

processing the set of augmentations by the first machine learning model to generate a third optimal assignment for the set of augmentations;

generating an updated third optimal assignment for the set of augmentations based on the third optimal assignment for the set of augmentations and the second optimal assignment of the second set of optical flow frames; and

updating one or more parameters of the first machine learning model based on a loss computed as a function of the updated first optimal assignment and the updated third optimal assignment.

15. The system of claim 14 , the operations further comprising generating the second set of optical flow frames by:

obtaining first and second video frames from the first set of RGB video frames;

computing a difference frame based on a deviation between the first and second video frames comprising motion information; and

storing the difference frame as one of the second set of optical flow frames.

16. The system of claim 14 , the operations further comprising:

processing the second set of optical flow frames by a second machine learning model to generate the second optimal assignment of the second set of optical flow frames.

17. The system of claim 16 , the operations further comprising:

generating an updated second optimal assignment for the second set of optical flow frames based on the first optimal assignment for the first set of RGB video frames.

18. A non-transitory machine-readable storage medium comprising instructions that, when executed by one or more processors of a machine, cause the machine to perform operations comprising:

accessing a plurality of content items, the plurality of content items comprising a first set of red, green, and blue (RGB) video frames and a second set of optical flow frames corresponding to the first set of RGB video frames;

processing the first set of RGB video frames by a first machine learning model to generate a first optimal assignment for the first set of RGB video frames, the first optimal assignment representing initial clustering of the first set of RGB video frames;

generating an updated first optimal assignment for the first set of RGB video frames based on both the first optimal assignment for the first set of RGB video frames and a second optimal assignment of the second set of optical flow frames, the second optimal assignment representing initial clustering of the second set of optical flow frames;

generating a set of augmentations of the first set of RGB video frames;

processing the set of augmentations by the first machine learning model to generate a third optimal assignment for the set of augmentations;

generating an updated third optimal assignment for the set of augmentations based on the third optimal assignment for the set of augmentations and the second optimal assignment of the second set of optical flow frames; and

updating one or more parameters of the first machine learning model based on a loss computed as a function of the updated first optimal assignment and the updated third optimal assignment.

19. The non-transitory machine-readable storage medium of claim 18 , the operations comprising generating the second set of optical flow frames by:

obtaining first and second video frames from the first set of RGB video frames;

computing a difference frame comprising motion information based on a deviation between the first and second video frames; and

storing the difference frame as one of the second set of optical flow frames.

20. The non-transitory machine-readable storage medium of claim 18 , the operations comprising:

processing the second set of optical flow frames by a second machine learning model to generate the second optimal assignment of the second set of optical flow frames.

Assignments (6)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 21, 2025
From: COSKUN, HUSEYIN; ZAREIAN, ALIREZA; MOORE, JOSHUA; WANG, CHEN
To: SNAP INC.
Reel/Frame 070290/0908 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE ERRONEOULSY FILED APPLICATION NUMBERS 07823814, 17893696, 17887215, 77895449, 17821431 AND 63397172 PREVIOUSLY RECORDED AT REEL: 061092 FRAME: 0669. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded May 26, 2023
From: BAE SYSTEMS PLC
To: SNAP INC.
Reel/Frame 063789/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE ASSIGNMENT ERRONEOUSLY FILED FOR 17788985, 17939256, 17597699, 17939296, 17597698 AND 17250997. PREVIOUSLY RECORDED AT REEL: 061092 FRAME: 0669. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Dec 7, 2022
From: BAE SYSTEMS PLC
To: SNAP INC.
Reel/Frame 062112/0237 →
CORRECTIVE ASSIGNMENT TO CORRECT THE TO REMOVE THE ASSIGNMENT ERRONEOUSLY FILED FOR APPLICATION #S 09727095, 09727132, 09737418, 09792133, 09311804, AND 09369685 PREVIOUSLY RECORDED AT REEL: 061092 FRAME: 0669. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Dec 7, 2022
From: BAE SYSTEMS PLC
To: SNAP INC.
Reel/Frame 062219/0544 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE THE ASSIGNMENT ERRONEOUSLY FILED FOR APPLICATION #S 09999093, 10217152, 17815831, 60062731, AND 17823810 PREVIOUSLY RECORDED AT REEL: 061092 FRAME: 0669. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Dec 7, 2022
From: BAE SYSTEMS PLC
To: SNAP INC.
Reel/Frame 062219/0586 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 14, 2022
From: BAE SYSTEMS PLC
To: SNAP INC.
Reel/Frame 061092/0669 →
Continuity (1)
Related Publication 20240087286A1 · Mar 14, 2024
References Cited (12)
US 11335093B2 · Shrivastava · 2022 [cited by examiner]
US 11368756B1 · Tran · 2022 [cited by examiner]
US 20190228313A1 · Lee · 2019 [cited by examiner]
US 20200084427A1 · Sun · 2020 [cited by examiner]
US 20240073478A1 · Black · 2024 [cited by examiner]
Toering, Martine, et al. “Self-supervised video representation learning with cross-stream prototypical contrasting.” Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2022. (Year: 2021). [cited by examiner]
Coskun, Huseyin, et al. “GOCA: Guided online cluster assignment for self-supervised video representation learning.” European Conference on Computer Vision. Cham: Springer Nature Switzerland, 2022. (Year: 2022). [cited by examiner]
“Optical Flow.” OpenCV, docs.opencv.org/3.4/d4/dee/tutorial_optical_flow.html. Accessed Dec. 6, 2024. (Year: 2022). [cited by examiner]
Coates, Adam, and Andrew Y. Ng. “Learning feature representations with k-means.” Neural Networks: Tricks of the Trade: Second Edition. Berlin, Heidelberg: Springer Berlin Heidelberg, 2012. 561-580. (Year: 2012). [cited by examiner]
Brownlee, Jason. “A Gentle Introduction to Generative Adversarial Network Loss Functions.” MachineLearningMastery.Com, Machine Learning Mastery, Sep. 1, 2019, machinelearningmastery.com/generative-adversarial-network-lo… [cited by examiner]
Caron, Mathilde, “Unsupervised Learning of Visual Features by Contrasting Cluster Assignments”, 34th Conference on Neural Information Processing Systems (NeurIPS 2020), Vancouver, Canada, (2020), 13 pgs. [cited by applicant]
Han, Tengda, “Self-supervised Co-training for Video Representation Learning”, 34th Conference on Neural Information Processing Systems (NeurIPS 2020), Vancouver, Canada, (2020), 12 pgs. [cited by applicant]