Impact craters in planetary science are used to date planetary surfaces, to characterize surface processes and to study the upper crust of terrestrial bodies in our Solar System (Melosh, 1989). Thanks to the Martian crater morphology, a wide amount of information could be deduced on the geological history of Mars, as for example the evolution of the surface erosion rate, the presence of liquid water in the past, the volcanic episodes or the volatiles layer in the subsurface (Carr & Head, 2010). These studies are widely facilitated by the availability of reference crater databases.
Surveying impact craters is therefore an important task which traditionally has been achieved by means of visual inspection of images. The enormous number of craters smaller than one kilometer in diameter, present on high resolution images, makes visual counting of such craters impractical. In order to overcome this problem, several algorithms have been developed to automatically detect impact structures on planetary images (Bandeira et al., 2007 ; Martins et al., 2009). Nevertheless, these methods allow to detect only 70-80 % of craters (Urbach & Stepinski, 2009).
This challenge proposes to design the best algorithm to detect crater position and size starting from the most complete Martian crater database containing 384 584 verified impact structures larger than one kilometer of diameter (Lagain et al. 2017). We give to the users a subset of this large dataset in order to test and calibrate their algorithms.
We provide THEMIS nightime dataset (Christensen et al., 2003) already projected to avoid distortion, sampled at various scales and positions in form 224x224 pixels images. Using an appropriate metric, we will compare the true solution to the estimation. The goal is to provide detection of more than 90% (crater center and diameter) with a minimum number of wrong detection.
Bandeira, L.; Saraiva, J. & Pina, P., Impact Crater Recognition on Mars Based on a Probability Volume Created by Template Matching, IEEE Transactions on Geoscience and Remote Sensing, Institute of Electrical and Electronics Engineers (IEEE), 2007, 45, 4008-4015
Carr, M. H. and Head, J. W. III. (2010) Geologic history of Mars. Earth and Planetary Science Letters, 294, 185-203.
Christensen, P. R.; Bandfield, J. L.; Bell, J. F.; Gorelick, N.; Hamilton, V. E.; Ivanov, A.; Jakosky, B. M.; Kieffer, H. H.; Lane, M. D.; Malin, M. C.; McConnochie, T.; McEwen, A. S.; McSween, H. Y.; Mehall, G. L.; Moersch, J. E.; Nealson, K. H.; Rice, J. W.; Richardson, M. I.; Ruff, S. W.; Smith, M. D.; Titus, T. N. & Wyatt, M. B., Morphology and Composition of the Surface of Mars: Mars Odyssey THEMIS Results, Science, 2003, 300, 2056-2061
Lagain, A., Marmo, C., Delaa, O., Bouley, S., Baratoux, D., Costard, F. et al. (2017) Martian crater database: 1. Reviewing and adapting to surface ages measurement. Submission to the Journal of Geophysical Research planned to November 2017.
Martins, R.; Pina, P.; Marques, J.S & Silveira, M., Crater Detection by a Boosting Approach, IEEE Geoscience and Remote Sensing Letters, Institute of Electrical and Electronics Engineers (IEEE), 2009, 6, 127-131
Melosh, H. J. (1989) Impact cratering: a geologic process. Oxford University Press.
Urbach, E. and Stepinski, T. (2009) Automatic detection of sub-km craters in high resolution planetary images. Planetary and Space Science, 57, 880-887.
The full THEMIS map of Mars has been saved in a cylindrical projection. Raw visualization of the full map is thus quite difficult.
In order to correct for the distortions and recover the circularity of the craters, the map has to be reprojected locally. For that, we use a partitions known as quadrangles. 140 quadrangles are used to cover the whole Mars surface from which we selected some (the colored quadrangles) for this exercice.
We use the boundaries of the quadrangle to extract the relevant pixels from the raw THEMIS map (above). Here we choose the quadrangle #77, close to the equator, and thus only slightly distorted.
Then we reproject the pixels to the local stereographic projection in order to correct for the distortions. The result can be seen below.
For illustration, we use the crater database to project the labeled craters per category on the reprojected map.
After selecting a common shape for the input of image processing models 224x224, we start from the reprojected quadrangles and decide to create the patches from a tiling with overlap to cover the craters falling on the edges. The tiling is also performed on downsampled versions of the quadrangles, until all craters can be detected for all sizes of craters present. With the current set up, the craters contained in every image have radii that span the range of 5 to 28 pixels.
With no further do, let's have a look at the data.
# !conda env create -f environment.yml # use the environment.yml file to create the 'mars-craters' env
# !source activate mars-craters # activate the virtual environment
OR if you have Python already installed but are not using Anaconda, you'll want to use pip
# !pip install -r requirements.txt
If the data has not yet been downloaded locally, uncomment the following cell and run it.
There are ~700Mb of images.
# !python download_data.py
from __future__ import division, print_function
import os
import numpy as np
import pandas as pd
import rampwf as rw
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.patches import Circle
%matplotlib inline
X_train = np.load('data/data_train.npy', mmap_mode='r')
print("The training data is made of {} images of {}x{} pixels".format(
*X_train.shape))
n_img = len(X_train)
Here we display 3 randomly select images. You can play around with the values.
idx_list = [30, 3470, 7030]
fig, axes = plt.subplots(ncols=3, figsize=(15, 5))
for i, idx in enumerate(idx_list):
axes[i].imshow(X_train[idx], cmap='Greys_r')
axes[i].set_title('%d' % idx)
fig.tight_layout()
Most images have some craters but we only label a crater if their diameter is superior to 10 pixels.
y_train = pd.read_csv('data/labels_train.csv')
y_train.head()
The labels consist of a pandas.DataFrame
containing the list of craters. For each craters, the columns are
id
: index of the image it belongs torow_p
, col_p
: pixel positionradius_p
: pixel radiusLet's visualize some.
fig, axes = plt.subplots(nrows=2, ncols=3, figsize=(15, 10))
for i, idx in enumerate(idx_list):
img = X_train[idx]
lab = y_train[y_train['i'] == idx][['row_p', 'col_p', 'radius_p']].values
# First row images only
axes[0, i].imshow(img, cmap='Greys_r')
axes[0, i].set_title('%d' % idx)
# Second row, labels overlaid on the image
axes[1, i].imshow(img, cmap='Greys_r')
if lab.size != 0:
for y, x, radius in lab:
crater = Circle((x, y), radius, color='r', ec=None, alpha=0.5)
axes[1, i].add_patch(crater)
fig.tight_layout()