Abstract:
he gemstone trade faces challenges in accurate and efficient identification due to reliance on
subjective manual inspections and costly spectrochemical methods, which are inaccessible to
small-scale traders, particularly in markets like Sri Lanka. Limited access to advanced tools
and expertise hinders scalability, while existing machine learning solutions prioritize gemstone
type classification, neglecting shape recognition critical for jewelry valuation. This gap
necessitates an automated, scalable system for simultaneous type and shape identification
without expert intervention or specialized equipment.
Gemident employs a hybrid machine learning approach, integrating EfficientNetB0 with multihead attention for visual feature extraction, selected for its efficiency and pre-trained on
ImageNet to handle limited data. Handcrafted color and texture features are extracted via
OpenCV and NumPy. Type classification uses an ensemble of Random Forest, SVM, XGBoost,
Gradient Boosting, and a deep classifier, optimized via grid search in Scikit-learn and
TensorFlow/Keras. Shape recognition leverages contour-based geometric features (Hu
moments, Fourier descriptors) with a Voting Classifier and hybrid CNN-geometric model.
Trained on 87 types and 10 shapes with data augmentation, preprocessing ensures real-time
performance.
Gemident achieved 75% accuracy for type classification (F1-score: 0.76, precision: 0.78) and
82% for shape classification (F1-score: 0.72), surpassing baseline CNNs (69.4%). ROC-AUC
scores of 0.82 (type) and 0.79 (shape) demonstrate strong classification performance.
Processing times of 4-7 seconds per image enable real-time applications, making Gemident a
valuable tool for gemologists and traders, with potential for further accuracy enhancements
through larger datasets.