Rust Game Item Recognizer
Recognizes in-game items from Rust (Facepunch) by their inventory icons.
Input: a single inventory cell crop, RGB, resized to 224ร224, pixel values divided by 255 (no normalization), layout [N, 3, 224, 224].
Output: a normalized 256-dimensional embedding.
The model does not predict a class directly. Classification is done by comparing the embedding against precomputed class centroids (centroids.npy, shape [1211, 256]) โ the nearest centroid by cosine similarity wins. Predictions below a similarity of 0.73 are rejected as uncertain.
Test accuracy: 99.83% top-1, 99.99% top-5 across 1211 item classes (13,629 real screenshots).
Trained with ArcFace loss on synthetically generated data. Full development process, training notebooks and data generator: GitHub repository
Files
| file | purpose |
|---|---|
item_recognizer.onnx |
the model (image โ embedding) |
centroids.npy |
class centroids [1211, 256], NumPy format |
centroids.pt |
same centroids, PyTorch format |
items_meta.json |
class index โ item name |
preprocess.json |
preprocessing parameters and confidence threshold |
Limitations
- The model expects a single inventory cell crop, not a full screenshot. Cell localization is handled separately.
- Items sharing identical icons in the game files are merged into single classes and cannot be distinguished.
- Trained on icons from a specific game version. New items added by future updates require adding their centroids (no retraining needed).
- Accuracy degrades on very low UI scale settings, where icons are rendered at roughly 40 pixels.
Attribution
Item icons are extracted from Rust game files and remain the property of Facepunch Studios. This is a non-commercial project intended for use alongside the game.
Model tree for maksim0840/Rust-Game-Items-Recognition
Base model
timm/convnext_tiny.in12k_ft_in1k