Help

Histogramo isn’t responding when I start a game

When starting a game, you may see an Application Not Responding (ANR) error modal indicating that the app is not responding. While inconvenient, this is a known issue that occurs because Android is initializing the TensorFlow delegate, which is a computationally intensive process. It is especially true for the NNAPI delegate.

To resolve the issue, simply choose Wait and the model should load eventually. On a Google Pixel 3, loading takes about five seconds. Alternatively, you can use the CPU delegate which loads faster but is slower for inferring dice rolls.

ANR Error Modal

ANR Error Modal

How do I load models?

In the Settings Tab, make sure that the Enable Loading Custom Models checkbox is checked. Note that this feature is only available in Histogramo Pro. Once enabled, in games you will see an overlay button on the Detection Tab allowing you to select a model file from device storage.

Model files must be in the TFLite flat buffer format (usually ending in .tflite). While Histogramo can load any object detection model, it only utilizes the following labels: one, two, three, four, five, six, red_one, red_two, red_three, red_four, red_five, red_six, boat, blue, yellow, and green.

Due to the nature of how Android handles file permissions and the fact that Histogramo strives for as minimal permissions as possible, custom model files must be loaded every game.

For a list of available dice models, see the Histogramo Dice Model Zoo.

Settings Explained

This section describes the various settings and how they affect functionality.

Roll to Speech

  • Always On: Whenever a roll is recorded, the value of the roll will be announced via Android TextToSpeech (TTS).
  • Always Off: Whenever a roll is recorded, a toast message will display.
  • Toggle: An overlay button is displayed on the Detection Tab allowing the user to toggle the Roll to Speech mode.

Accuracy Threshold for Detection

TensorFlow Lite continuously evaluates camera data for objects that are potentially dice. When it recognizes such an object, there is an associated confidence that the object actually is a die. This percentage (with 1.0 being the highest possible confidence) is shown in the bounding box for the object. Any detections where this number is less than the accuracy threshold are ignored.

Number of Threads

If your device has multiple cores, you can set the number of threads so that you can leverage them. For single and dual core machines, it is best to use one thread. More threads does not necessarily mean better performance.

TFLite Delegate

  • NNAPI: uses the Android Neural Networks API (NNAPI) to perform hardware-accelerated inference. For Android devices that lack a specialized vendor driver, the NNAPI runtime executes the requests on the CPU.
  • CPU: Inference runs on the CPU, faster to load but slower inference.
  • GPU: Inference runs on the GPU if available.

Enable Loading Custom Models

Only available for Histogramo Pro

When checked, displays an overlay button in the Detection Tab which allows loading custom dice models.

Roll Candidate Sample Size

Histogramo keeps track of a finite number of dice detections, also known as roll candidates. When the list of candidates grows beyond the sample size limit, the oldest candidate is removed when a new candidate is added.

Minimum Confidence to Record

Histogramo keeps track of a finite number of dice detections, also known as roll candidates. Everytime a candidate is added, Histogramo tallies the count of each roll permutation. If the most frequent roll permutation represents a percentage of candidates that is higher than the Minimum Confidence to Record, it is determined to be the Detected Roll and will be shown in the Detected Roll Overlay at the bottom of the Detection Tab.

Consecutive Empty to Record Roll

Histogramo determines that a roll has concluded when it no longer detects any dice. This setting determines how many empty frames constitute the end of a roll. The higher the number, the longer it will take from when the dice are picked up to when the roll is recorded. If set to Tap to Record, each roll must be manually recorded by tapping on the Detected Roll Overlay at the bottom of the Detection Tab.

Dice Localization

Histogramo clusters dice detections to get a time-averaged picture of each die in the roll candidate. If the camera is not stable, the positions of dice will fluctuate. This can cause the same die to be grouped into multiple clusters and thus be interpreted as multiple dice. The tightness of the clusters can be configured with the Dice Localization setting.