Skip to content
TR EN

First model

Demir-1

Our first model for rock and mineral recognition from photos. Identifying a stone in the field takes years. Demir-1 takes a single phone photo, crops it to 288×288, and returns one of 63 classes. Not publicly available yet.

%81.15
Test accuracy
%83.12
Validation accuracy
63
Classes
37,800+
Training images
125 MB
Model size

Development

We trained in three stages, measuring test accuracy after each. The final stage reached 81.15%. Training used over 37,800 photos.

Three-stage bar chart of test accuracy across development stages
Test accuracy across development stages.

Input and output

The model takes one photo and returns:

  1. Class name, in Turkish and English
  2. Formation type: igneous, sedimentary or metamorphic
  3. Mineral composition and hardness
  4. Tips to tell confusing stones apart
  5. Where it's found, in Türkiye and worldwide
  6. What it's used for

Input is JPEG or PNG; we scale the short edge to 288 pixels. Output is plain text.

Rocks it knows

Demir-1 knows 63 classes. Each card's percentage is that class's test accuracy. The best five hit 100%, the lowest around 55%. With this many classes the average drops to 81.15%. We expected that.

Igneous 19 classes

Andesite Andezit %65.0
Basalt Bazalt %90.0
Carbonatite Karbonatit %95.0
Gabbro Gabro %75.0
Granite Granit %80.0
Granulite Granülit %75.0
Komatiite Komatit %90.0
Obsidian Obsidyen %90.0
Pegmatite Pegmatit %70.0
Porphyry Porfiri %100.0
Pumice Pomza %85.0
Pyroxenite Piroksenit %55.0
Quartz diorite Kuvars diyorit %95.0
Quartz monzonite Kuvars monzonit %85.0
Quartzolite Kuarzolit %66.67
Rhyolite Riyolit %60.0
Scoria Skoriya %90.0
Tephrite Tefrit %85.0
Tuff Tüf %75.0

Sedimentary 21 classes

Anthracite Antrasit %90.0
Breccia Breş %75.0
Chalk Tebeşir %85.0
Chert Çört %90.0
Coal Kömür %95.0
Conglomerate Konglomera %75.0
Diamictite Diamiktit %100.0
Dolomite Dolomit %65.0
Evaporite Evaporit %90.0
Flint Çakmaktaşı %80.0
Greywacke Grovak %60.0
Limestone Kireçtaşı %85.0
Mudstone Çamurtaşı %70.0
Oil shale Petrol şeyli %80.0
Oolite Oolit %95.0
Sandstone Kumtaşı %90.0
Shale Şeyl %75.0
Siltstone Silttaşı %85.0
Travertine Traverten %80.0
Turbidite Türbidit %90.0
Wackestone Vaketaşı %80.0

Metamorphic 13 classes

Amphibolite Amfibolit %65.0
Blueschist Mavişist %85.0
Eclogite Eklojit %95.0
Gneiss Gnays %60.0
Greenschist Yeşilşist %80.0
Hornfels Hornfels %70.0
Marble Mermer %85.0
Migmatite Migmatit %75.0
Phyllite Fillit %100.0
Quartzite Kuvarsit %55.0
Serpentinite Serpantinit %90.0
Slate Arduvaz %75.0
Talc carbonate Talk-karbonat %65.0

Minerals 10 classes

Biotite Biyotit %85.0
Bornite Bornit %70.0
Chrysocolla Krizokol %95.0
Hornblende Hornblend %100.0
Malachite Malahit %95.0
Muscovite Muskovit %90.0
Plagioclase Plajiyoklaz %60.0
Potassium Feldspar Potasyum Feldspat %70.0
Pyrite Pirit %100.0
Quartz Kuvars %80.0

Performance

The numbers come from the test set. Training data never leaked into tests; we split by MD5. The charts show per-class results and the data distribution. Per-class accuracy, F1, precision and recall live in the CSV.

Top 10 classes

test accuracy
  1. 01 Pyrite %100.0
  2. 02 Porphyry %100.0
  3. 03 Phyllite %100.0
  4. 04 Hornblende %100.0
  5. 05 Diamictite %100.0
  6. 06 Quartz diorite %95.0
  7. 07 Oolite %95.0
  8. 08 Malachite %95.0
  9. 09 Eclogite %95.0
  10. 10 Coal %95.0

Bottom 10 classes

test accuracy
  1. 01 Pyroxenite %55.0
  2. 02 Quartzite %55.0
  3. 03 Gneiss %60.0
  4. 04 Greywacke %60.0
  5. 05 Plagioclase %60.0
  6. 06 Rhyolite %60.0
  7. 07 Amphibolite %65.0
  8. 08 Andesite %65.0
  9. 09 Dolomite %65.0
  10. 10 Talc carbonate %65.0
Histogram of training data distribution across classes
Training data distribution across classes.

Per-class results are also downloadable as CSV.

sinif_tablosu.csv indir

Comparison with the literature

Not the same task. Narrow studies report over 90% on 5 to 25 classes. We measured 81.15% on 63. Accuracy falls as classes grow; we chose breadth.

Accuracy comparison of Demir-1 against academic rock-recognition studies
Accuracy of Demir-1 vs. rock-recognition studies in the literature.
Study Classes Reported accuracy
Narrow studies in the literature5 to 25 classesOver 90%
Demir-1 (Cevher Labs)63 classes81.15%

We held the test stones by hand, shooting at different angles and light. So 81.15% reads close to the field.

See the test results