Skip to contents

Estimates brush strokes and drawing time for artworks when only color palette data is available. Use these functions to generate metrics for unverified artworks (those without Procreate stats) so they can be included in portfolio-relative benchmarking via `artutils::update_artist_benchmarks()`.

The predictions come from machine learning models trained on verified artwork data where both Procreate stats and color metrics are available. Model files are bundled with the package (see `data-raw/model_artwork_stats`).

**When to use:** For artworks uploaded without Procreate metadata (e.g., photos of physical art, scanned drawings). For verified digital artworks, use actual stats from `calc_art_metrics()` instead.

Usage

predict_strokes(n_colors)

predict_minutes(n_colors)

Arguments

n_colors

Integer. Total unique colors in the artwork palette. Obtain from `get_image_rast(img_path)$colors` (row count) or from the `n_unique_colors` metric if already computed. Valid range: typically 100-50000 for realistic artworks; extreme values may produce unreliable predictions.

Value

data.table with two columns: - `n_unique_colors`: Integer. The input color count (for joins/verification) - `pred_strokes` (for `predict_strokes()`): Integer. Predicted brush stroke count - `pred_minutes` (for `predict_minutes()`): Integer. Predicted drawing time in minutes

Functions

  • predict_strokes(): Predict brush strokes from color count

  • predict_minutes(): Predict drawing time (minutes) from color count

Examples

if (FALSE) { # \dontrun{
# Extract color count from image
rast_data <- get_image_rast("/path/to/artwork.png")
n_colors <- nrow(rast_data$colors)

# Predict missing metrics
strokes_pred <- predict_strokes(n_colors)
minutes_pred <- predict_minutes(n_colors)

# Use predictions in benchmark calculations
# (actual metrics still preferred when available)
} # }