Skip to content

Wiktor-git/Ekosystem

Repository files navigation

Ekosystem Score Calculator 🃏🌿

An Android app built with .NET MAUI that helps calculate scores for the card game Ekosystem published by 'nasza księgarnia' - .
This project was created as an exercise to combine mobile development with machine learning (YOLO11 Object Detection).


✨ Features

  • Responsive UI that automatically updates when values are changed
  • Take photos using your phone’s camera.
  • app automatically converts the photo of the cards into a 5x4 grid based on position of left corners of bounding boxes and displays it using
    • a conversion done with a Yolo11 model running on ONNX Runtime with Android NNAPI for fast calculations on CPU/GPU.
  • Calculate scores once every player is added (calculated with my own script in Ekosystem.cs based on rules of the game).
  • Get a detailed breakdown of each player’s score.

🎮 How It Works

  1. Add a player.
  2. Assign a name.
  3. Capture a photo of their card layout.
  4. The app converts the photo into a grid (5 high × 4 wide) for calculations.
  5. Repeat for all players.
  6. Tap "Policz punkty" to calculate scores.
  7. View the breakdown and total score for each player.
  8. Celebrate the winner!

Screenshot_20251126_124303 Screenshot_20251126_124328 Screenshot_20251126_124341 Screenshot_20251126_124454 Screenshot_20251126_124525 Screenshot_20251126_124534 Screenshot_20251126_174154 Screenshot_20251126_175350 Screenshot_20251126_175400 Screenshot_20251126_175427


🛠️ Tech Stack

  • .NET MAUI – Cross-platform app framework (app should also work on IPhone if you change line 26 in DetekcjaKart.cs from NNapi to CoreML).
  • ONNX Runtime – Executes the YOLO model.
  • YOLO Model – Detects and classifies card elements for scoring.

🧠 Model Training

The YOLO model was trained in two stages:

  1. Collected and labeled 15 images using Label Studio, then trained a large model.
  2. Used the large model to auto-label 50 additional images, imported them back into Label Studio.
  3. Verified and corrected labels manually.
  4. Trained a smaller, refined model on the corrected dataset for faster inference on mobile devices.

📝 TODO

  • Model works very slowly - 30 to 60 seconds on a phone from 2019 - by adding additional ~200 labeled pictures of cards the model could be further shrunk into a nano model with 320x320 resolution which would run up to 16 times faster than the current medium model with 640x640 res (simpler models are more prone to erros). Acomplishing this task would take around 6 hours, but right now I am relatively satisfied with the state of the app as it was mostly done as a programming excercise and i would learn nothing by improving the model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages