Categories
Misc

Facebook Self-Supervised AI Outperforms State-of-the-Art Computer Vision Models

Facebook AI researchers this week announced SEER, a self-supervised model that surpasses the best self-supervised systems.

Facebook AI researchers this week announced SEER, a self-supervised model that surpasses the best self-supervised systems, and also outperforms supervised models on tasks including image classification, object detection, and segmentation. 

Combining RegNet architectures with the SwAV online clustering approach, SEER is a billion-parameter model pretrained on a billion random images.

Instead of relying on labeled datasets, self-supervised learning models for computer vision generate data labels by finding relationships between images with no annotations or metadata. Such models are considered key to developing AI with “common sense,” says Yann LeCun, Facebook AI’s chief scientist. 

After using a billion public Instagram images for pretraining, SEER achieved 84.2 percent accuracy on the popular ImageNet dataset, beating state-of-the-art self-supervised systems. The researchers also trained SEER using just 10 percent of images in the popular ImageNet dataset, still achieving nearly 78 percent accuracy. Even when trained with just 1 percent of ImageNet, the model was over 60 percent accurate. 

SEER was trained on 512 NVIDIA V100 Tensor Core GPUs with 32GB of RAM for 30 days, said Facebook software engineer Priya Goyal. The researchers used mixed precision from the NVIDIA Apex library and gradient checkpointing tools from PyTorch to reduce memory usage and increase training speed of the model. 

The researchers chose RegNet architecture for its ability to scale to billions or trillions of parameters while accommodating runtime and memory constraints. The SwAV algorithm helped achieve record performance with 6x less training time.

Image credit: Facebook

“Eliminating the need for human annotations and metadata enables the computer vision community to work with larger and more diverse data sets, learn from random public images, and potentially mitigate some of the biases that come into play with data curation,” wrote Facebook AI in a blog post. “Self-supervised learning can also help specialize models in domains where we have limited images or metadata, like medical imaging.”

Facebook also open-sourced VISSL, the PyTorch-based general-purpose library for self-supervised learning that was used to develop SEER.

Read more from Facebook AI

The full paper is available on ArXiv

Categories
Offsites

PAIRED: A New Multi-agent Approach for Adversarial Environment Generation

The effectiveness of any machine learning method is critically dependent on its training data. In the case of reinforcement learning (RL), one can rely either on limited data collected by an agent interacting with the real world, or a simulated training environment that can be used to collect as much data as needed. This latter method of training in simulation is increasingly popular, but it has a problem — the RL agent can learn what is built into the simulator, but tends to be bad at generalizing to tasks that are even slightly different than the ones simulated. And obviously building a simulator that covers all the complexity of the real-world is extremely challenging.

An approach to address this is to automatically create more diverse training environments by randomizing all the parameters of the simulator, a process called domain randomization (DR). However, DR can fail even in very simple environments. For example, in the animation below, the blue agent is trying to navigate to the green goal. The left panel shows an environment created with DR where the positions of the obstacles and goal have been randomized. Many of these DR environments were used to train the agent, which was then transferred to the simple Four Rooms environment in the middle panel. Notice that the agent can’t find the goal. This is because it has not learned to walk around walls. Even though the wall configuration from the Four Rooms example could have been generated randomly in the DR training phase, it’s unlikely. As a result, the agent has not spent enough time training on walls similar to the Four Rooms structure, and is unable to reach the goal.

Domain randomization (left) does not effectively prepare an agent to transfer to previously unseen environments, such as the Four Rooms scenario (middle). To address this, a minimax adversary is used to construct previously unseen environments (right), but can result in creating situations that are impossible to solve.

Instead of just randomizing the environment parameters, one could train a second RL agent to learn how to set the environment parameters. This minimax adversary can be trained to minimize the performance of the first RL agent by finding and exploiting weaknesses in its policy, e.g. building wall configurations it has not encountered before. But again there is a problem. The right panel shows an environment built by a minimax adversary in which it is actually impossible for the agent to reach the goal. While the minimax adversary has succeeded in its task — it has minimized the performance of the original agent — it provides no opportunity for the agent to learn. Using a purely adversarial objective is not well suited to generating training environments, either.

In collaboration with UC Berkeley, we propose a new multi-agent approach for training the adversary in “Emergent Complexity and Zero-shot Transfer via Unsupervised Environment Design”, a publication recently presented at NeurIPS 2020. In this work we present an algorithm, Protagonist Antagonist Induced Regret Environment Design (PAIRED), that is based on minimax regret and prevents the adversary from creating impossible environments, while still enabling it to correct weaknesses in the agent’s policy. PAIRED incentivizes the adversary to tune the difficulty of the generated environments to be just outside the agent’s current abilities, leading to an automatic curriculum of increasingly challenging training tasks. We show that agents trained with PAIRED learn more complex behavior and generalize better to unknown test tasks. We have released open-source code for PAIRED on our GitHub repo.

PAIRED
To flexibly constrain the adversary, PAIRED introduces a third RL agent, which we call the antagonist agent, because it is allied with the adversarial agent, i.e., the one designing the environment. We rename our initial agent, the one navigating the environment, the protagonist. Once the adversary generates an environment, both the protagonist and antagonist play through that environment.

The adversary’s job is to maximize the antagonist’s reward while minimizing the protagonist’s reward. This means it must create environments that are feasible (because the antagonist can solve them and get a high score), but challenging to the protagonist (exploit weaknesses in its current policy). The gap between the two rewards is the regret — the adversary tries to maximize the regret, while the protagonist competes to minimize it.

The methods discussed above (domain randomization, minimax regret and PAIRED) can be analyzed using the same theoretical framework, unsupervised environment design (UED), which we describe in detail in the paper. UED draws a connection between environment design and decision theory, enabling us to show that domain randomization is equivalent to the Principle of Insufficient Reason, the minimax adversary follows the Maximin Principle, and PAIRED is optimizing minimax regret. This formalism enables us to use tools from decision theory to understand the benefits and drawbacks of each method. Below, we show how each of these ideas works for environment design:

Domain randomization (a) generates unstructured environments that aren’t tailored to the agent’s learning progress. The minimax adversary (b) may create impossible environments. PAIRED (c) can generate challenging, structured environments, which are still possible for the agent to complete.

Curriculum Generation
What’s interesting about minimax regret is that it incentivizes the adversary to generate a curriculum of initially easy, then increasingly challenging environments. In most RL environments, the reward function will give a higher score for completing the task more efficiently, or in fewer timesteps. When this is true, we can show that regret incentivizes the adversary to create the easiest possible environment the protagonist can’t solve yet. To see this, let’s assume the antagonist is perfect, and always gets the highest score that it possibly can. Meanwhile, the protagonist is terrible, and gets a score of zero on everything. In that case, the regret just depends on the difficulty of the environment. Since easier environments can be completed in fewer timesteps, they allow the antagonist to get a higher score. Therefore, the regret of failing at an easy environment is greater than the regret of failing on a hard environment:

So, by maximizing regret the adversary is searching for easy environments that the protagonist fails to do. Once the protagonist learns to solve each environment, the adversary must move on to finding a slightly harder environment that the protagonist can’t solve. Thus, the adversary generates a curriculum of increasingly difficult tasks.

Results
We can see the curriculum emerging in the learning curves below, which plot the shortest path length of a maze the agents have successfully solved. Unlike minimax or domain randomization, the PAIRED adversary creates a curriculum of increasingly longer, but possible, mazes, enabling PAIRED agents to learn more complex behavior.

But can these different training schemes help an agent generalize better to unknown test tasks? Below, we see the zero-shot transfer performance of each algorithm on a series of challenging test tasks. As the complexity of the transfer environment increases, the performance gap between PAIRED and the baselines widens. For extremely difficult tasks like Labyrinth and Maze, PAIRED is the only method that can occasionally solve the task. These results provide promising evidence that PAIRED can be used to improve generalization for deep RL.

Admittedly, these simple gridworlds do not reflect the complexities of the real world tasks that many RL methods are attempting to solve. We address this in “Adversarial Environment Generation for Learning to Navigate the Web”, which examines the performance of PAIRED when applied to more complex problems, such as teaching RL agents to navigate web pages. We propose an improved version of PAIRED, and show how it can be used to train an adversary to generate a curriculum of increasingly challenging websites:

Above, you can see websites built by the adversary in the early, middle, and late training stages, which progress from using very few elements per page to many simultaneous elements, making the tasks progressively harder. We test whether agents trained on this curriculum can generalize to standardized web navigation tasks, and achieve a 75% success rate, with a 4x improvement over the strongest curriculum learning baseline:

Conclusions
Deep RL is very good at fitting a simulated training environment, but how can we build simulations that cover the complexity of the real world? One solution is to automate this process. We propose Unsupervised Environment Design (UED) as a framework that describes different methods for automatically creating a distribution of training environments, and show that UED subsumes prior work like domain randomization and minimax adversarial training. We think PAIRED is a good approach for UED, because regret maximization leads to a curriculum of increasingly challenging tasks, and prepares agents to transfer successfully to unknown test tasks.

Acknowledgements
We would like to recognize the co-authors of “Emergent Complexity and Zero-shot Transfer via Unsupervised Environment Design”: Michael Dennis, Natasha Jaques, Eugene Vinitsky, Alexandre Bayen, Stuart Russell, Andrew Critch, and Sergey Levine, as well as the co-authors of Adversarial Environment Generation for Learning to Navigate the Web: Izzeddin Gur, Natasha Jaques, Yingjie Miao, Jongwook Choi, Kevin Malta, Manoj Tiwari, Honglak Lee, Aleksandra Faust. In addition, we thank Michael Chang, Marvin Zhang, Dale Schuurmans, Aleksandra Faust, Chase Kew, Jie Tan, Dennis Lee, Kelvin Xu, Abhishek Gupta, Adam Gleave, Rohin Shah, Daniel Filan, Lawrence Chan, Sam Toyer, Tyler Westenbroek, Igor Mordatch, Shane Gu, DJ Strouse, and Max Kleiman-Weiner for discussions that contributed to this work.

Categories
Misc

What Is a Cluster? What Is a Pod?

Everything we do on the internet — which is just about everything we do these days — depends on the work of clusters, which are also called pods. When we stream a hot new TV show, order a pair of jeans or Zoom with grandma, we use clusters. You’re reading this story thanks to pods. Read article >

The post What Is a Cluster? What Is a Pod? appeared first on The Official NVIDIA Blog.

Categories
Misc

Juicing AI: University of Florida Taps Computer Vision to Combat Citrus Disease

Florida orange juice is getting a taste of AI. With the Sunshine State’s $9 billion annual citrus crops plagued by a fruit-souring disease, researchers and businesses are tapping AI to help rescue the nation’s largest producer of orange juice. University of Florida researchers are developing AI applications for agriculture. And the technology — computer vision Read article >

The post Juicing AI: University of Florida Taps Computer Vision to Combat Citrus Disease appeared first on The Official NVIDIA Blog.

Categories
Misc

Save TensorFlow subclass model

Hello,

I am working on an image caption model but I faced a problem with saving the model as tflite or HDF5. I tried a lot of things but does not work.

My model is a subclass model and similar to this work :

https://tensorflow.google.cn/tutorials/text/image_captioning?hl=en

Can anyone help me?

submitted by /u/Rama_AI
[visit reddit] [comments]

Categories
Misc

Supercomputing Demystifies How Metals Crystallize at Atomic Scale

Simulations by Lawrence Livermore National Laboratory researchers have uncovered a new mechanism for freezing in metals, advancing scientists’ understanding of nucleation.

Simulations by Lawrence Livermore National Laboratory researchers have uncovered a new mechanism for freezing in metals, advancing scientists’ understanding of nucleation, the process of gases or liquids cooling into crystalline solids. 

Run on 256 NVIDIA Tensor Core GPUs on the Lassen supercomputer, the simulations modeled how heated copper solidifies, providing atomic-scale insights into the Ostwald step rule — a nearly 150-year-old discovery that liquids first freeze into a metastable structure before stabilizing into a final solid stage. 

In a research article published in the Proceedings of the National Academy of Sciences, researchers Babak Sadigh, Luis Zepeda-Ruiz, and Jon Belof share findings revealing that this metastable phase can be kinetically stabilized by temperature.

”Using modern simulation methods, we have tried to provide a framework for predicting how process conditions can be manipulated to design completely new materials using both a modern laser platform as well as classical heating in furnaces,” said Sadigh. 

The powerful supercomputing resources allowed the scientists to for the first time simulate with dynamic experiments how nucleation occurs in liquids compressed to a high density, such as in Earth’s metal core, which has a liquid outer layer around a solid center. The findings were surprising, revealing that nucleation first occurs through a body-centered cubic phase that is unstable.

“Under these extreme conditions, such as in the center of Earth, the thermodynamic phase diagram sort of goes out the window in terms of predictive capability and one needs to turn to kinetic phase maps,” said Belof, the project principal investigator for phase transition kinetics and program leader for the Equation of State program at LLNL.

In the visualization below, the team simulated 0.5 nanoseconds of the solidification of copper at a very high pressure, showing fluctuations as the molecules nucleate:

The findings led to a modification of classical nucleation theory, with a new nucleation model now incorporated into the SAMSA hydrodynamics code for modeling the transition between phases of matter. 

Read more from Lawrence Livermore National Laboratory

The full article is available from PNAS: “Metastable-solid phase diagrams derived from polymorphic solidification kinetics.”

Categories
Misc

New on NGC Catalog: Samsung SDS Brightrics, an AI Accelerator for Automating and Accelerating Deep Learning Training

The Kubernetes-based, containerized application, is now available on the NVIDIA NGC Catalog – a GPU-optimized hub for AI and HPC containers.

Training AI models is an extremely time-consuming process. Without proper insight into a feasible alternative to time-consuming development and migration of model training to exploit the power of large, distributed clusters, training projects remain considerably long lasting. To address these issues, Samsung SDS developed the Brightics AI Accelerator. The Kubernetes-based, containerized application, is now available on the NVIDIA NGC catalog – a GPU-optimized hub for AI and HPC containers, pre-trained models, industry SDKs, and Helm charts that helps simplify and accelerate AI development and deployment processes.  

The Samsung SDS Brightics AI Accelerator application automates machine learning, speeds up model training and improves model accuracy with key features such as automated feature engineering, model selection, and hyper-parameter tuning without requiring infrastructure development and deployment expertise. Brightics AI Accelerator can be used in many industries such as healthcare, manufacturing, retail, automotive and across different use cases spanning computer vision, natural language processing and more.  

Key Features and Benefits: 

  • Is case agnostic and covers training all AI models by applying autoML to tabular, CSV, time-series, image or natural language data to enable analytics; image classification, detection, and segmentation; and NLP use cases. 
  • Offers model portability between cloud and on-prem data centers and provides a unified interface for orchestrating large, distributed clusters to train deep learning models using Tensorflow, Keras and PyTorch frameworks as well as autoML using SciKit-Learn.
  • AutoML software automates and accelerates model training on tabular data by using automated model selection from Scikit-Learn, automated feature synthesis, and hyper-parameter search optimization. 
  • Automated Deep Learning (AutoDL) software automates and accelerates deep learning model training using data-parallel, distributed synchronous Horovod Ring-All-Reduce Keras, TensorFlow, and PyTorch frameworks with minimal code. AutoDL exploits up to 512 NVIDIA GPUs per training job to produce a model in 1 hour versus 3 weeks using traditional methods. 
Figure 1. The amount of time it takes to train 1 iteration of a ResNet 50 image classification model using a normal 8 GPU machine is about 504 hours. Using the enhanced inter-GPU communication of Brightics AI Accelerator lowers this to about 4 hours using 128 GPUs. In total, this represents a speed improvement of 126 times.

Get started by pulling Samsung’s Brightics AI Accelerator container from the NGC catalog.

Categories
Misc

GFN Thursday — 21 Games Coming to GeForce NOW in March

Guess what’s back? Back again? GFN Thursday. Tell a friend. Check out this month’s list of all the exciting new titles and classic games coming to GeForce NOW in March. First, let’s get into what’s coming today. Don’t Hesitate It wouldn’t be GFN Thursday if members didn’t have new games to play. Here’s what’s new Read article >

The post GFN Thursday — 21 Games Coming to GeForce NOW in March appeared first on The Official NVIDIA Blog.

Categories
Misc

Guide to Abstract Meaning Representation(AMR) to text with TensorFlow – Analytics India Magazine

Guide to Abstract Meaning Representation(AMR) to text with TensorFlow - Analytics India Magazine submitted by /u/analyticsindiam
[visit reddit] [comments]
Categories
Misc

Jetson Project of the Month: OpenDog, a Gesture Controlled Robot

The project uses the NVIDIA Jetson Nano Developer Kit to recognize hand gestures and control a robot dog without a controller.

James Bruton of XRobots was awarded the ‘Jetson Project of the Month’ for OpenDog V2. This project uses the NVIDIA Jetson Nano Developer Kit to recognize hand gestures and control a robot dog without a controller. 

James, a robot inventor, thought it’d be nice if his OpenDog robot responded to hand gestures. To make this happen, he used transfer learning to retrain an existing SSD-Mobilenet object detection model using PyTorch. During the training process, he identified five hand gestures for the robot to move forward, backward, left, right and to jump. Using the camera capture tool, he captured these gestures and assigned them to the appropriate class. 

Capturing and labeling hand gesture data

He ensured that these images were captured at a specific distance from the camera to make sure the OpenDog doesn’t get distracted by hand gestures or similar patterns in the background.

James notes that the project can be improved by adding more training data which includes gestures in different indoor and outdoor backgrounds and from different users. Furthermore, he plans to convert OpenDog to a ROS robot similar to his Really Useful AI Robot. He created a series of videos to show his journey of building this project and the code is available on GitHub.