The problem with identifying rocks has always been the same: rocks are visually complex, and the features that distinguish one from another require pattern recognition that takes years to develop. A geologist can look at a hand specimen and identify it in seconds because they've spent years building an internalized visual taxonomy of rocks and minerals. Field guides tried to externalize this knowledge, but plates and written descriptions are poor substitutes for the pattern recognition that comes from experience.
AI rock identification solves this differently. Instead of externalizing knowledge into text and images that humans then try to match against specimens, it builds the pattern recognition directly into the model — trained on millions of labeled geological images until the model develops reliable intuitions about what differentiates granite from diorite, basalt from gabbro, or amethyst from fluorite.
What Is Computer Vision, and How Does It Apply to Rocks?
Computer vision is the branch of AI concerned with enabling computers to extract meaningful information from images. Modern computer vision uses convolutional neural networks (CNNs) and, increasingly, transformer architectures — the same technology behind large language models like GPT-4 and Claude.
For rock identification specifically, computer vision models learn to recognize combinations of visual features that reliably predict what a rock or mineral is:
- Color patterns: Not just dominant color, but color distribution, zoning, and how color varies across the specimen. Amethyst's purple coloration in quartz crystals, pyrite's uniform brass-yellow metallic color, and malachite's distinctive banded green-and-black are all color-pattern signatures.
- Grain size and texture: Whether crystals are visible to the naked eye (coarse-grained granite) or too small to see (fine-grained basalt) is a fundamental discriminator between related rocks. The AI can assess grain size from the apparent texture in a photo.
- Crystal morphology: Cubic pyrite crystals, hexagonal quartz prisms, and platy mica crystals all have distinctive shapes that the AI has learned to recognize. Even when crystals aren't perfectly formed, the tendency toward certain geometric arrangements is usually preserved.
- Surface lustre: How light reflects from a surface — metallic, glassy, pearly, resinous, waxy, dull — is highly characteristic. The AI has learned what each lustre type looks like across different lighting conditions.
- Fracture and cleavage: Conchoidal (curved, shell-like) fracture is characteristic of quartz and obsidian. Perfect cubic cleavage appears in halite and galena. The pattern of how a mineral breaks is visible in photos as smooth flat faces (cleavage) or irregular curved surfaces (fracture).
- Structural context: Whether minerals appear in isolation, intergrown with other minerals, as veins cutting through host rock, or as vesicle fillings all provide geological context that a sufficiently powerful model can use.
Why Large Language Models Changed Everything
Early rock identifier apps used purpose-built image classifiers: neural networks trained specifically on geological images, output limited to a fixed set of rock and mineral species. These worked for well-documented common specimens but were brittle — unusual lighting, weathering, or anything outside the training distribution led to wrong answers, and the model had no way to express uncertainty meaningfully.
Large multimodal models like Google Gemini — which Stone Snap uses — are different in kind, not just degree. These models have been trained on vast amounts of scientific text (geology textbooks, mineralogy papers, museum catalogs) alongside millions of images. They don't just pattern-match visual features against a database; they reason about what they're seeing in geological context.
This means a large model can:
- Recognize that a specimen looks like quartz but the crystal habit and context suggest it's actually topaz (both vitreous, both can be colorless, but topaz has different crystal system and cleavage)
- Note when an identification has low confidence and explain why — "the texture is consistent with basalt but the high silica content suggested by the mineralogy could indicate andesite"
- Provide geological context that a classifier can't — not just "granite" but its formation environment, typical mineral assemblage, and why it looks the way it does
- Identify weathering products separately from the parent rock
What Visual Features Does AI Prioritize?
Research into AI geological identification suggests the model's attention (which parts of the image are most influential in the identification) concentrates on several key areas:
Mineral grain boundaries
The boundaries between mineral grains in coarse-grained rocks carry substantial information about rock type. Granite's interlocking quartz, feldspar, and mica grains have a distinctive intergrown texture that contrasts with gabbro (interlocked pyroxene and plagioclase) or diorite (quartz-poor, dominated by feldspar and hornblende).
Surface microtexture
Fine-scale texture — visible when photographed close-up — carries information about grain size, crystal habit, and weathering state. The AI has learned correlations between specific microtextures and rock types that are not always obvious to human observers.
Color histograms and distributions
Beyond the dominant color, the distribution of colors across the specimen is diagnostic. Granite's salt-and-pepper pattern (interspersed white, grey, and black grains) differs from gneiss's segregated alternating bands of the same colors. The AI analyzes both what colors are present and how they're spatially distributed.
Specular reflection patterns
How light reflects from crystal faces — the pattern of highlights — reveals crystal orientation and habit. Mica's characteristic sheet-parallel glitter, pyrite's cubic face reflections, and quartz's prismatic reflections are all identifiable from photo specular patterns.
What Stone Snap Returns After AI Identification
Stone Snap uses Google Gemini AI to do more than just name the specimen. After identifying a rock or mineral, it returns a complete geological profile:
- Mohs hardness: The relative hardness of the mineral on a scale from 1 (talc) to 10 (diamond). This is immediately verifiable with physical tests — quartz (Mohs 7) scratches glass, calcite (Mohs 3) is scratched by a steel knife.
- Chemical composition: The mineral formula (SiO₂ for quartz, CaCO₃ for calcite, FeS₂ for pyrite) explains why it looks and behaves as it does.
- Crystal system: The geometric symmetry of the mineral's internal structure — cubic, hexagonal, orthorhombic, etc.
- Formation environment: Where and how the rock or mineral formed. Basalt in lava flows, granite in deep plutonic bodies, sandstone in ancient river deltas or beaches.
- Common locations: Where this specimen is typically found geographically, which helps contextualize whether your find makes geological sense for your location.
- Industrial uses: What the mineral is used for commercially — granite in construction, quartz in electronics, calcite in cement.
Where AI Rock Identification Still Struggles
Honest assessment of the technology requires acknowledging its limits:
- Heavily weathered specimens: Weathering transforms surface chemistry and color dramatically. A fresh pyrite surface is metallic brass-yellow; heavily oxidized pyrite is brown-red (limonite coating). The AI sees the weathered surface, not the fresh mineral.
- Rare minerals: AI accuracy correlates with the volume of training examples. Common minerals with thousands of labeled training images (quartz, feldspar, calcite) are identified reliably. Rare minerals with sparse training data are less reliable.
- Mixed specimens: Rocks that contain veins, coatings, or inclusions of different minerals can confuse identification if the photo shows the secondary feature rather than the primary rock.
- Poor photo quality: Motion blur, flash photography, extreme lighting, and very small specimens in large frames all degrade identification accuracy. The AI can only analyze what's in the image.
- Petrographically similar species: Some rocks and minerals are visually very similar and require optical microscopy or chemical analysis for definitive identification. AI from photos can distinguish granite from basalt but may struggle to distinguish granodiorite from tonalite.
For high-confidence identifications of common specimens from good photos, AI rock identification is accurate and fast. For uncertain results — indicated by low confidence scores or identification of a rare mineral — treat the AI result as a hypothesis to verify with physical tests (hardness, streak, acid test) or professional consultation.
Try AI Rock Identification
Stone Snap uses Google Gemini AI — free on Android, 5 identifications included.
download Download Stone SnapFrequently Asked Questions
How does AI identify rocks from photos?
AI rock identification uses large vision models trained on millions of labeled geological images. When you submit a photo, the model analyzes visual features — color patterns, grain texture, crystal morphology, lustre, fracture patterns — and cross-references them with geological knowledge to produce an identification. Apps like Stone Snap use Google Gemini, which can reason about geological context rather than just matching patterns against a fixed database.
How accurate is AI rock identification?
For common rocks and minerals photographed clearly in good light, AI rock identification accuracy is 85-95%. This is comparable to an experienced amateur geologist for standard specimens. Accuracy decreases for rare minerals, heavily weathered specimens, and poor-quality photos. High-confidence identifications of common specimens are generally reliable; low-confidence results should be verified with physical tests.
What AI does Stone Snap use?
Stone Snap uses Google Gemini AI — a large multimodal model that analyzes both images and geological context. Gemini returns not just the specimen name but chemical composition, Mohs hardness, crystal system, formation environment, and common locations. This is significantly more informative than purpose-built classifiers that only return a species label.
Is AI better than a field guide for rock identification?
For most practical purposes, yes. AI rock identification from photos is faster, returns more structured data, and for common specimens is more accurate than cross-referencing written field guide plates. Field guides remain useful for understanding geological context, reading the landscape, and verifying uncertain AI results. The best approach is using both: AI for rapid identification, physical tests and field guides for verification of unusual specimens.