skills/cv/conv1d-lstm-stroke-classifier/SKILL.md
Stack 1D convolutions for local feature extraction before bidirectional LSTMs to classify variable-length stroke sequences into hundreds of doodle categories
npx skillsauth add wenmin-wu/ds-skills cv-conv1d-lstm-stroke-classifierInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Sketches can be represented as sequences of (x, y, stroke_id) points rather than rasterized images. A Conv1D-LSTM architecture processes this raw sequence: 1D convolutions extract local patterns (corners, curves), then LSTMs capture long-range stroke order dependencies. This approach works directly on stroke coordinates without rendering, preserving resolution-independent information.
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import (Conv1D, LSTM, Dense,
Dropout, BatchNormalization)
n_classes = 340
max_points = 128
model = Sequential([
BatchNormalization(input_shape=(max_points, 3)),
Conv1D(48, 5, activation="relu"),
Dropout(0.3),
Conv1D(64, 5, activation="relu"),
Dropout(0.3),
Conv1D(96, 3, activation="relu"),
Dropout(0.3),
LSTM(128, return_sequences=True),
Dropout(0.3),
LSTM(128, return_sequences=False),
Dropout(0.3),
Dense(512, activation="relu"),
Dropout(0.3),
Dense(n_classes, activation="softmax"),
])
model.compile(optimizer="adam", loss="categorical_crossentropy",
metrics=["accuracy"])
data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF