Datasets:
image image | ice_likelihood float64 |
|---|---|
0.800741 | |
1 | |
0.773542 | |
0.9375 | |
0.768378 | |
0.953125 | |
0.8675 | |
0.795417 | |
0.759583 | |
0.9375 | |
0.770081 | |
0.670001 | |
0.700209 | |
0.682708 | |
0.9375 | |
0.682293 | |
0.584168 | |
0.288125 | |
0.439584 | |
0.516088 | |
0.128125 | |
0.523334 | |
0.005417 | |
0.23875 | |
-0.030625 | |
0.21 | |
0.833333 | |
0.557499 | |
0.791619 | |
0.670416 | |
0.400661 | |
0.75147 | |
0.735035 | |
0.884684 | |
0.791666 | |
0.713803 | |
0.817709 | |
0.921875 | |
0.691358 | |
0.670001 | |
0.9375 | |
0.800417 | |
0.763125 | |
0.450416 | |
0.757917 | |
0.601876 | |
0.550834 | |
0.441249 | |
0.284375 | |
0.266875 | |
0.539793 | |
0.19 | |
-0.121875 | |
-0.029375 | |
0.22 | |
0.05375 | |
0.153125 | |
0.28 | |
0.669374 | |
0.325833 | |
0.10875 | |
-0.0175 | |
0.23125 | |
0.21875 | |
-0.02375 | |
0.108125 | |
0.178125 | |
0.36375 | |
0.457499 | |
0.13625 | |
-0.145625 | |
-0.0825 | |
0.229375 | |
0.20125 | |
-0.068125 | |
-0.1275 | |
0.106875 | |
0.2475 | |
0.350625 | |
0.238125 | |
0.348333 | |
0.18375 | |
0.106875 | |
-0.093125 | |
-0.09875 | |
0.169375 | |
-0.075625 | |
-0.143125 | |
-0.148125 | |
-0.27375 | |
0.135 | |
0.362917 | |
0.128125 | |
-0.191875 | |
-0.194375 | |
-0.158125 | |
-0.198125 | |
0.1825 | |
-0.245625 | |
-0.18875 |
Hello!
cMars8k is a collection of 8,120 200x200 .jpg images of Martian craters, as well as their corresponding likelihoods of having subsurface ice at a depth of 0-1m.
A short explanation of how the dataset was derived:
- The THEMIS IR Day Map was used to create this dataset, owing to its lightweight nature and scientific reputability.
- Robbins & Hynek's 2020 Mars crater database was used to source the geographic coordinates of the craters' (approximate) centers.
- NASA's SWIM Project 0-1m Ice Consistency map was used to source the likelihood of subsurface ice at the location of each crater.
- All of these individual datasets were combined together by overlaying them on top of each other inside of QGIS, and then utilizing a python script to mass-export the images.
Data Formatting
As stated, each image is exactly 200x200 pixels and is stored as a .jpg file within cMars8k/images.
The ice_likelihood value is a float64 ranging from approximately -0.375 to 1.000, with 1.000 representing an extremely high probability or confirmed presence of subsurface ice.
Accessing Data
This dataset can be accessed via:!git clone https://huggingface.co/datasets/evans44/cMars8k
or via the Hugging Face API.
Normalization
Many CNNs prefer normalized images as opposed to RGB. The following script loads the images directly from the downloaded folder into a pandas dataframe and performs said action.
!! Note: within metadata.csv, the file_name for each image is in the format images/crater_####, and as such the images directory/folder does not need to be specified when accessing the images.
import pandas as pd
import cv2
from concurrent.futures import ThreadPoolExecutor
import os
# Load metadata
metadata = pd.read_csv("cMars8k/metadata.csv")
IMAGES_DIR = "cMars8k" # file_name column already includes "images/" prefix
def load_and_normalize(file_name):
path = os.path.join(IMAGES_DIR, file_name)
img = cv2.imread(path) # loads as BGR, uint8, shape (200, 200, 3)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # convert to RGB
img = img.astype(np.float32) / 255.0 # normalize to [0, 1]
return img
with ThreadPoolExecutor(max_workers=8) as executor:
images = list(executor.map(load_and_normalize, metadata["file_name"]))
df_master = pd.DataFrame({ # 3 columns:
"file_name": metadata["file_name"], # file_name (over from metadata.csv)
"image": images, # image: the normalized version of the image
"ice_prob": metadata["ice_likelihood"] # ice_prob: probability of ice (over from metadata.csv/ice_likelihood)
})
print("Shape of df_master:")
print(df_master.shape)
print(df_master["image"].iloc[0].shape, df_master["image"].iloc[0].dtype)
- Downloads last month
- 589