AI Examples: A Step-By-Step Guide to Hunting Dinosaurs with Intel® AI

Get the Latest on All Things CODE

author-image

By

August 08, 2022 – In case you missed the workshop Hunting Dinosaurs with Intel AI during the July 12th oneAPI DevSummit for AI, I’m here to provide a summary so you can try it for yourself.   

Did the dinosaur bone map lead to the discovery of fossils? I won’t spoil the surprise, but you will be amazed at the findings.

For some background on hunting dinosaur bones using Intel AI, start with my previous blog Hunt Dinosaurs with Intel® AI.

The Goal: Create a Dinosaur Bone Likelihood Map and Use It to Discover New Dinosaur Fossils 

Figure 1 is an example of a dinosaur bone map that was created during the workshop. This likelihood map was created by using data from aerial photographs of the Morrison Formation (a famous dinosaur bone bed in the Western United States) and the GPS coordinates for small bone fragments discovered there. Images were input into a convolutional neural network (CNN) to train computer vision models to classify the images as to their likelihood of having bones. From that, this dinosaur-bone likelihood map was created. To help narrow a bone hunter’s search, the areas in green show where dinosaur bones are likely to be found.

Figure 1. Sample dinosaur bone likelihood map

 

Process for Creating a Dinosaur Bone Likelihood Map

GitHub* Repository for the Workshop

Readme File

The workshop exercises are in notebooks: 

  • 02_ContextMattersClustering.ipynb 
  • 07_BuildTrainScorePyTorchModel.ipynb 
  • 09_Dino_bone_find_OpenVINO.ipynb 

Remaining notebooks are informational.

The base kernel is Python 3.7 (Intel oneAPI).

Recommended browser incognito mode.

Need notebooks and assets, data, models folders. Refresh if you do not see those folders.

Figure 2 shows the process of creating a dinosaur bone likelihood map.

There’s also a short demo of how to create the map.

Figure 2. Process to create a dinosaur bone likelihood map

To create a likelihood map:

  1. Collect Data: This contains the latitude and longitude of the location of the fossils.
  2. Cluster and Classify Tabular Data (exercise using 02_ContextMattersClustering.ipynb): This step is using K-Means from the Intel® Extension for Scikit-learn* to cluster the fossil samples based on proximity (GPS coordinates) to each other.  The clusters tend to reveal that fossils of a similar nature are found together.  
  3. Semi-supervised Labels Tabular: This step is using 2D Gaussian Kernel Density Estimation where a type of histogram is created to examine the density of the bones and help estimate whether a location does or does not have bones. Rather than a binary classification of bone or no bone, you end up with no bone, bone very likely, and bone possible. 
  4. Create New Mexico Training Data: Acquire the aerial photos from New Mexico, prep the image tiles, and score the tiles. This creates a labeled map of the geographical area to help you get to a dinosaur bone likelihood map. 
  5. Build, Train, Score Model (exercise using 07_BuildTrainScorePyTorchModel.ipynb): In this step, the aerial images are transformed into tensors and the training data distribution is checked for balance. A ResNet* 18 model in PyTorch* is used to classify each image as:
    0 Definitely no bones 
    1 Bones are possible 
    2 Found bones
     
  6. Score Utah Photos (exercise using 09_Dino_bone_find_OpenVINO.ipynb): In this step, the Utah photos are scored, and a bone map is created for the Dinosaur National Monument. To do this, the ResNet 18 for PyTorch model is first converted to Open Neural Network Exchange (ONNX*), then to an OpenVINO™ toolkit model. Inference is conducted using the OpenVINO intermediate representation with Model Optimizer to boost performance.

The results are in: Dinosaur bones were discovered in Utah using the dinosaur bone likelihood map created from following this process.

Use this code snippet to get the data from the workshop.

Download data​
$ mkdir Jurassic​ 
$ cd Jurassic​ 
$ cp –r /data/oneapi_workshop/big_datasets/Jurassic .​ 
$ mv Jurassic data

 

Full Workshop Video and Presentation

The following video is of the full workshop. I’ve also included the chapters of the video so you can easily navigate to the steps and information you need. You can also download the presentation.

Download the Intel® AI Tools 

You can either use the Intel DevCloud to complete the workshop or download and install these tools on your machine: 

Think You’ve Found a Dinosaur Bone?  

Awesome…and…now what? 

Do NOT dig it up. Dinosaur bones are often protected wherever they’re found. (For example, they are protected on U.S. Federal lands.)  

DO take pictures, note the location, and contact a paleontologist through your local natural history museum.

Explore Intel AI Tools & Training Opportunities 

The AI & Machine Learning Page is where you’ll find the software development tools, languages, frameworks, and other resources to help you solve your AI needs—from dinosaur hunting to beyond. 

At this point, you have everything you need to give the workshop a try. Happy dinosaur bone hunting!  

You May Also Like

 

Accelerate AI Deep Learning with Intel® oneAPI Deep Neural Network Library (oneDNN)
Read

Intel Employs Machine Learning to Computer Graphics Creation 
Read

 

Performance & Scalability of CNN-based Deep Learning Inference 
Watch

Optimize Data Science & Machine Learning Pipelines 
Watch