• Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
Wednesday, July 9, 2025
newsaiworld
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
Morning News
No Result
View All Result
Home Artificial Intelligence

Breaking the Bottleneck: GPU-Optimised Video Processing for Deep Studying

Admin by Admin
February 25, 2025
in Artificial Intelligence
0
Screenshot 2025 02 24 At 11.34.06 am 1024x584.png
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

READ ALSO

Construct Interactive Machine Studying Apps with Gradio

The 5-Second Fingerprint: Inside Shazam’s Prompt Tune ID


Deep Studying (DL) functions usually require processing video knowledge for duties resembling object detection, classification, and segmentation. Nevertheless, typical video processing pipelines are sometimes inefficient for deep studying inference, resulting in efficiency bottlenecks. On this submit will leverage PyTorch and FFmpeg with NVIDIA {hardware} acceleration to realize this optimisation.

The inefficiency comes from how video frames are sometimes decoded and transferred between CPU and GPU. The usual workflow that we could discover within the majority of tutorials observe this construction:

  1. Decode Frames on CPU: Video information are first decoded into uncooked frames utilizing CPU-based decoding instruments (e.g., OpenCV, FFmpeg with out GPU help).
  2. Switch to GPU: These frames are then transferred from CPU to GPU reminiscence to carry out deep studying inference utilizing frameworks like TensorFlow, Pytorch, ONNX, and many others.
  3. Inference on GPU: As soon as the frames are in GPU reminiscence, the mannequin performs inference.
  4. Switch Again to CPU (if wanted): Some post-processing steps could require knowledge to be moved again to the CPU.

This CPU-GPU switch course of introduces a big efficiency bottleneck, particularly when processing high-resolution movies at excessive body charges. The pointless reminiscence copies and context switches decelerate the general inference pace, limiting real-time processing capabilities.

For example, the next snippet has the everyday Video Processing pipeline that you simply got here throughout when you find yourself beginning to study deep studying:

The Resolution: GPU-Primarily based Video Decoding and Inference

A extra environment friendly method is to maintain your complete pipeline on the GPU, from video decoding to inference, eliminating redundant CPU-GPU transfers. This may be achieved utilizing FFmpeg with NVIDIA GPU {hardware} acceleration. 

Key Optimisations

  1. GPU-Accelerated Video Decoding: As a substitute of utilizing CPU-based decoding, we leverage FFmpeg with NVIDIA GPU acceleration (NVDEC) to decode video frames instantly on the GPU.
  2. Zero-Copy Body Processing: The decoded frames stay in GPU reminiscence, avoiding pointless reminiscence transfers.
  3. GPU-Optimized Inference: As soon as the frames are decoded, we carry out inference instantly utilizing any mannequin on the identical GPU, considerably lowering latency.

Palms on! 

Stipulations 

 With a view to obtain the aforementioned enhancements, we might be utilizing the next dependencies: 

Set up

Please, to get a deep perception of how FFmpeg is put in with NVIDIA gpu acceleration, observe these directions. 

Examined with:

  • System: Ubuntu 22.04
  • NVIDIA Driver Model: 550.120 
  • CUDA Model: 12.4
  • Torch: 2.4.0
  • Torchaudio: 2.4.0
  • Torchvision: 0.19.0

1. Set up the NV-Codecs

2. Clone and configure FFmpeg

3. Validate whether or not the set up was profitable with torchaudio.utils

Time to code an optimised pipeline!

Benchmarking

To benchmark whether or not it’s making any distinction, we might be utilizing this video from Pexels by Pawel Perzanowski. Since most movies there are actually brief, I’ve stacked the identical video a number of instances to offer some outcomes with totally different video lengths. The unique video is 32 seconds lengthy which supplies us a complete of 960 frames. The brand new modified movies have 5520 and 9300 frames respectively.

Unique video

  • typical workflow: 28.51s
  • optimised workflow: 24.2s

Okay… it doesn’t appear to be an actual enchancment, proper? Let’s take a look at it with longer movies.

Modified video v1 (5520 frames)

  • typical workflow: 118.72s
  • optimised workflow: 100.23s

Modified video v2 (9300 frames)

  • typical workflow: 292.26s
  • optimised workflow: 240.85s

Because the video length will increase, the advantages of the optimization turn into extra evident. Within the longest take a look at case, we obtain an 18% speedup, demonstrating a big discount in processing time. These efficiency positive factors are notably essential when dealing with massive video datasets and even in real-time video evaluation duties, the place small effectivity enhancements accumulate into substantial time financial savings.

Conclusion

In immediately’s submit, we now have explored two video processing pipelines, the everyday one the place frames are copied from CPU to GPU, introducing noticeable bottlenecks, and an optimised pipeline, wherein frames are decoded within the GPU and move them on to inference, saving a significantly period of time as movies’ length improve.

References

Tags: BottleneckbreakingDeepGPUOptimisedLearningProcessingVideo

Related Posts

Gradio.jpg
Artificial Intelligence

Construct Interactive Machine Studying Apps with Gradio

July 8, 2025
1dv5wrccnuvdzg6fvwvtnuq@2x.jpg
Artificial Intelligence

The 5-Second Fingerprint: Inside Shazam’s Prompt Tune ID

July 8, 2025
0 dq7oeogcaqjjio62.jpg
Artificial Intelligence

STOP Constructing Ineffective ML Initiatives – What Really Works

July 7, 2025
2025 06 30 22 56 21 ezgif.com video to gif converter.gif
Artificial Intelligence

Interactive Knowledge Exploration for Laptop Imaginative and prescient Tasks with Rerun

July 6, 2025
Rulefit 1024x683.png
Artificial Intelligence

Explainable Anomaly Detection with RuleFit: An Intuitive Information

July 6, 2025
Lineage graph.jpg
Artificial Intelligence

Change-Conscious Knowledge Validation with Column-Stage Lineage

July 5, 2025
Next Post
Tag Reuters Com 2024 Newsml Lynxmpek7k0p5 1.jpg

Finest Strategies for Microsoft Alternate Server Information Restoration

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

POPULAR NEWS

0 3.png

College endowments be a part of crypto rush, boosting meme cash like Meme Index

February 10, 2025
Gemini 2.0 Fash Vs Gpt 4o.webp.webp

Gemini 2.0 Flash vs GPT 4o: Which is Higher?

January 19, 2025
1da3lz S3h Cujupuolbtvw.png

Scaling Statistics: Incremental Customary Deviation in SQL with dbt | by Yuval Gorchover | Jan, 2025

January 2, 2025
0khns0 Djocjfzxyr.jpeg

Constructing Data Graphs with LLM Graph Transformer | by Tomaz Bratanic | Nov, 2024

November 5, 2024
How To Maintain Data Quality In The Supply Chain Feature.jpg

Find out how to Preserve Knowledge High quality within the Provide Chain

September 8, 2024

EDITOR'S PICK

1quz70j6kxwf7gf7dykmzcq.png

Lacking Information in Time-Collection? Machine Studying Strategies (Half 2) | by Sara Nóbrega | Jan, 2025

January 9, 2025
Blog Regularization Medium.png

Defined: How Does L1 Regularization Carry out Function Choice?

April 23, 2025
Fox 93847983476456.jpg

Mozilla frets about Google’s push to construct AI into Chrome • The Register

June 11, 2025
Ftx set to distribute over 5 billion in stablecoins to creditors this week.webp.webp

FTX Set for $5 Billion Stablecoin Creditor Cost This Week

May 31, 2025

About Us

Welcome to News AI World, your go-to source for the latest in artificial intelligence news and developments. Our mission is to deliver comprehensive and insightful coverage of the rapidly evolving AI landscape, keeping you informed about breakthroughs, trends, and the transformative impact of AI technologies across industries.

Categories

  • Artificial Intelligence
  • ChatGPT
  • Crypto Coins
  • Data Science
  • Machine Learning

Recent Posts

  • Survey finds gaps in mainstream Bitcoin protection, leaving institutional buyers uncovered
  • Groq Launches European Knowledge Heart in Helsinki
  • Browser hijacking marketing campaign infects 2.3M Chrome, Edge customers • The Register
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy

© 2024 Newsaiworld.com. All rights reserved.

No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us

© 2024 Newsaiworld.com. All rights reserved.

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?