CoolFace
Apppublic

AmirEzze/diamond-color-grading

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes
App README

๐Ÿ’Ž Complete Diamond Grading System

An AI-powered system that analyzes diamond images and predicts Shape, Color Grade, and Clarity using deep learning.

๐ŸŽฏ Model Performance

AttributeAccuracyWithin-1Classes
Shape99.73%99.93%8
Color79.19%99.34%4
Clarity68.41%82.87%3

๐Ÿ“Š What We Classify

๐Ÿ”ท Shape (8 Types)

  • โ€”Round, Oval, Cushion, Princess
  • โ€”Emerald, Pear, Heart, Marquise

๐ŸŽจ Color (4 Grades)

  • โ€”D-F: Colorless (premium)
  • โ€”G-J: Near Colorless (excellent value)
  • โ€”K-M: Faint (good value)
  • โ€”N-R: Very Light (budget)

โœจ Clarity (3 Levels)

  • โ€”High: FL, IF, VVS1, VVS2 (eye-clean)
  • โ€”Medium: VS1, VS2, SI1 (excellent value)
  • โ€”Low: SI2, I1, I2, I3 (visible inclusions)

๐Ÿš€ Usage

Upload a clear, well-lit image of a diamond (preferably top-down view) and get instant predictions for all three attributes!

๐Ÿ”ง Technical Details

  • โ€”Architecture: EfficientNetB2 (pretrained on ImageNet)
  • โ€”Framework: TensorFlow/Keras 3.6.0
  • โ€”Input: 224ร—224 RGB images
  • โ€”Training Data: 48,726 diamond images
  • โ€”Inference Time: ~300ms for all 3 predictions

๐Ÿ“ˆ Model Files

  • โ€”shape_model.keras (35 MB) - Shape classifier
  • โ€”color_model.keras (30 MB) - Color classifier
  • โ€”clarity_model.keras (35 MB) - Clarity classifier
  • โ€”JSON files with class metadata

โš ๏ธ Limitations

  • โ€”Best for standard cuts with good lighting
  • โ€”Not a replacement for professional GIA/AGS grading
  • โ€”Works best with top-down diamond views
  • โ€”Color grading most accurate on white backgrounds

๐Ÿ“„ License

MIT License - Free for commercial and personal use


Made with โค๏ธ for the gemology community