Spaces:
Sleeping
Sleeping
import os | |
# Directories | |
DATA_DIR = "data" | |
IMAGE_DIR = os.path.join(DATA_DIR, "core_images") | |
MODEL_DIR = "models" | |
OUTPUT_DIR = "output" | |
# Create directories if they don't exist | |
os.makedirs(IMAGE_DIR, exist_ok=True) | |
os.makedirs(MODEL_DIR, exist_ok=True) | |
os.makedirs(OUTPUT_DIR, exist_ok=True) | |
# Model parameters - adaptive to data size | |
NUM_CLUSTERS = 3 # Reduced default | |
IMAGE_SIZE = (224, 224) | |
BATCH_SIZE = 32 | |
# Candidate labels for classification | |
CANDIDATE_LABELS = [ | |
"gold-bearing rock", | |
"iron-rich rock", | |
"lithium-rich rock", | |
"copper-bearing rock", | |
"waste rock", | |
"quartz-rich rock", | |
"sulfide-rich rock" | |
] | |
# Public geology repositories | |
DATASET_SOURCES = [ | |
{ | |
"name": "Geoscience Australia", | |
"url": "https://geology.csiro.au/datasets/drill-core-images", | |
"description": "Australian geological survey drill core images" | |
}, | |
{ | |
"name": "USGS Mineral Resources", | |
"url": "https://mrdata.usgs.gov/geology/state/map-viewer.php", | |
"description": "US Geological Survey mineral resources data" | |
}, | |
{ | |
"name": "BGS OpenGeoscience", | |
"url": "https://www.bgs.ac.uk/discovering-geology/rock-library/", | |
"description": "British Geological Survey rock sample images" | |
} | |
] | |