Transfer Learning for Geological Images

Description

This is the repository for the code in Dawson et al 2022. This code can be used to easily to perform transfer learning for geological images using any of the built-in TensforFlow-Keras image classification models used in the paper.

Built-In Models

The models available here are:

ModelSizeTop-1 AccuracyTop-5 AccuracyParametersDepth
VGG16528 MB0.7130.901138.4M16
VGG19549 MB0.7270.910143.7M19
ResNet5098 MB0.7490.92125.6M107
ResNet101171 MB0.7640.92844.7M209
ResNet152232 MB0.7660.93160.4M311
InceptionV392 MB0.7790.93723.9M159
DenseNet12133 MB0.7500.9238.1M121
DenseNet16957 MB0.7620.93214.3M169
DenseNet20180 MB0.7730.93620.2M201

Installation

This project has the following dependencies:

  • Numpy sudo pip install numpy
  • OpenCV Python sudo apt-get install python-opencv
  • TensorFlow sudo pip install --upgrade tensorflow-gpu
  • Keras sudo pip install tf.keras

Usage

To use this code, please ensure you have set up your dataset in folders following this structure:

├── "dataset_name"                   
|   ├── train
|   |   ├── class_1_images
|   |   ├── class_2_images
|   |   ├── class_X_images
|   |   ├── .....
|   ├── val
|   |   ├── class_1_images
|   |   ├── class_2_images
|   |   ├── class_X_images
|   |   ├── .....
|   ├── test
|   |   ├── class_1_images
|   |   ├── class_2_images
|   |   ├── class_X_images
|   |   ├── .....

Then you can simply run combined-model.py.

Name:Transfer Learning for Geological Images
Written in:Python, TensorFlow
Paper:Harriet L Dawson, Olivier Dubrule, Cédric M John, 2022, Impact of dataset size and convolutional neural network architecture on transfer learning for carbonate rock classification, Computers & Geosciences, nan, nan, 105284
GitHub repo:https://github.com/johnlab-research/dawson-facies-2022
Released:January 2023