Ramya Ravi, AI Software Marketing Engineer, Intel | LinkedIn
Susan Kahler, AI/ML Products and Solutions Marketing Manager, Intel | LinkedIn
PyTorch is an AI and machine learning framework for building deep learning models. This framework is used in computer vision and natural language processing applications. PyTorch was developed by Meta and is now part of the Linux* foundation. Intel collaborates with the open-source PyTorch project to optimize the framework for Intel® architectures and releases the newest optimizations and features in Intel® Extension for PyTorch* before upstreaming them into the stock distribution of PyTorch.
This blog emphasizes the below sessions focused on PyTorch that were delivered at oneAPI DevSummit for AI 2023.
- Shaping the Future of AI with PyTorch
- Accelerating Autoencoder Training with oneAPI: A Success Story
- TraffiKAI: An AI-Powered Solution for Efficient Traffic Management
- Using PyTorch to Predict Wildfires
Keynote: Shaping the Future of AI with PyTorch
The keynote was delivered by Lucy Hyde, Program Manager and Data Scientist from the Linux Foundation. She starts by mentioning that PyTorch is built to empower developers to shape AI as we know it today and gave an example of how she started using PyTorch to sort through and classify images for the intelligence community while working at the Department of Defense. The Linux Foundation assumed responsibility for PyTorch from Meta in September 2022. A key accomplishment was that PyTorch 2.0 came out in March of this year and comprised 4,500+ commits and 400 contributors. PyTorch 2.0 emphasizes greater flexibility, streamlined workflows, and enhanced integration with the PyTorch ecosystem. A key enhancement in 2.0 is the ability to bolster performance across a diverse range of configurations. One area of particular interest is Generative AI diffusion models and how PyTorch 2.0 can be used to speed up inference. She also mentions that PyTorch provides multiple tools/libraries to enable mixed parallelism in large language models. Lastly, she introduced PiPPy, which provides a framework for pipeline parallelism in PyTorch by allowing a model to be trained on larger datasets than utilizing data parallelism alone.
Watch the full video recording here.
Tech Talk 1: Accelerating Autoencoder Training with oneAPI: A Success Story
In this tech talk, Alex Porter and Timothy Porter explained how oneAPI acceleration transformed the performance of autoencoder models by enhancing accuracy, convergence rates and saving time and costs. Alex kicked off her presentation by introducing autoencoders. An autoencoder is an unsupervised neural network that compresses, encodes data, and reconstructs data from compressed data. She explained that accelerating autoencoders training is essential because it is slow, especially with large datasets like in a film.
Then, Timothy pointed out that they were able to achieve 32X acceleration and enhance performance using Intel® Extension for PyTorch*. Finally, they explained the steps to accelerate the performance:
- First trial dataset is a 5000-image dataset with 64 images per batch, resulting in a trained model within 24 hours.
- Weights will be adjusted for maximum quality.
- Next phase is a full-scale test of over 50k images that will be processed over a 10-30 day period to deliver the final algorithm.
Watch the full video recording here.
Tech Talk 2: TraffiKAI: An AI-Powered Solution for Efficient Traffic Management
This tech talk is about how Nishank Satish, Guru Akhil Mandala, Mani Kanta, Pothuri Vineel Akash, and Shreyas K, undergraduate Students from Dayananda Sagar College of Engineering, created an AI solution for efficient traffic management – TraffiKAI.
The project’s objective is to automate the traffic signal system and increase the efficiency of the existing one. TraffiKAI is created by integrating Emergency Vehicle Detection and Dynamic Traffic Signaling. Also, they explained that traffic density calculations play a crucial role in processing the number of vehicles based on the rule-based algorithm.
The tools used in the project are:
- PyTorch and TensorFlow are optimized for Intel architecture by the oneAPI platform
- Intel® Extension for Scikit-Learn* seamlessly speeds up your scikit-learn applications
- Intel® AI Analytics Toolkit – Involves support for pre-trained models such as DenseNet-169, YOLOv3, LSTM (Long Short Term Memory - audio)
- Intel® Distribution of OpenVINO™ Toolkit - To boost the performance for object detection models
Finally, they showed that they achieved better performance using oneAPI environment and explained the future scope for the project.
Watch the full video recording here.
Workshop: Using PyTorch to Predict Wildfires
Forest fires pose a significant threat to ecosystems, wildlife, and human lives. The ability to predict forest fires plays a crucial role in mitigating their impact. Early identification of high fire likelihood allows precious resources to be used wisely. In this workshop, Bob Chesebrough explained how to perform image analysis to predict potential forest fire likelihoods based on regions of known forest fires acquired via the MODIS (Moderate Resolution Imaging Spectroradiometer) dataset.
The objectives involved in the project are:
- Apply Intel® Extension for PyTorch* to convert model and data to xpu
- Apply fine tuning to satellite images to predict fire 2 years in advance
- Generate synthetic satellite images using Stable Diffusion
- Optimize a four-stage Stable Diffusion pipeline using Intel® Extension for PyTorch*
Go to the GitHub repository for the workshop to access the code sample used in this session and try out the code samples. For this workshop, the code sample is implemented on Intel® Developer Cloud.
Follow the Intel® Developer Cloud registration and login process.
Also, Bob explained about the various notebooks implemented in the GitHub repository:
- Notebook number 1 - Describes how to use the MODIS Burn Area dataset to establish known fire burn areas in California from 2018 to 2020 and acquire USDA/NAIP/DOQQ dataset images to train on.
- Notebook number 2 - Takes synthetic data we created before the workshop and “Salt” these images to be slightly more or less brown, and establish a faux Modis Burn area and faux image coordinates.
- Notebook number 3 - Use fine-tuning to adapt a pre-trained Resnet 18 model (never trained on aerial photos) and use transfer learning on an Intel® Data Center GPU Max Series GPU.
- Notebook number 4 - Generates a confusion matrix and a map showing where the mispredicted images would align with respect to the burn area.
- Notebook number 5 - Demonstrates how to generate synthetic data using Stable Diffusion.
- Notebook number 6 - Describes where and how you can download the actual images to predict real fires.
Watch the full video recording here and check the Medium article to learn more about the project.
What’s Next?
Download PyTorch and Intel Extension for PyTorch from Intel® AI Analytics Toolkit. We encourage you to check out and incorporate Intel’s other AI/ML Framework optimizations and end-to-end portfolio of tools into your AI workflow and learn about the unified, open, standards-based oneAPI programming model that forms the foundation of Intel’s AI Software Portfolio to help you prepare, build, deploy, and scale your AI solutions.
For more details about 4th Gen Intel® Xeon® Scalable processors, visit AI Platform to learn how Intel empowers developers to run end-to-end AI pipelines on these powerful CPUs.
About the Speakers
Lucy Hyde, Senior Program Manager at The Linux Foundation
Lucy Hyde is a Senior Program Manager specializing in Machine Learning. She worked closely with the intersection of data science and device forensics, implementing machine learning to forward operations further to include identifying and locating illicit materials, trafficked persons, and terrorist networks.
Alex Porter, CEO of Mod Tech Labs
Alex Porter is the CEO of Mod Tech Labs and is an innovator in AI-powered real-time content. With a background in Interior Design and Construction Tech, she is driving the use of cutting-edge technology for visual experiences by bringing novel tools to market.
Timothy Porter, CTO of Mod Tech Labs
Tim is a Co-Founder and CTO of MOD Tech Labs, revolutionizing the industry with AI-powered technology. With a background in animation and technical development, he bridges art and technology. Tim creates innovative tools like MOD, streamlining production tasks and empowering studios.
Nishank Satish, Guru Akhil Mandala, Mani Kanta, Pothuri Vineel Akash, Shreyas K
Undergraduate students at Dayananda Sagar College of Engineering
Bob Chesebrough, Technical Evangelist at Intel
Bob Chesebrough is currently a Technical Evangelist in the Intel Developer Academy. His educational background is in physics. He is a data scientist, using machine learning/ deep learning for eight years while working for Intel and other high-tech companies.
Useful Resources
- Intel AI Developer Tools and Resources
- oneAPI unified programming model
- Official documentation - PyTorch* Optimizations from Intel
- Official Documentation - Intel® Extension for PyTorch*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.