weird idea, work in progress: (1) get DistilBERT hidden states (768 dimensions) for 768 sentences (of Frankenstein, in this instance) → stack vertically to form a 768x768 square → subtract the column-wise mean, normalize → lil bit of gaussian blur and threshold → "skeletonize" with skimage → "asemic" "writing"?
first attempt at sending this to the plotter. I ended up cutting the plot short because I could see some aesthetic and technical problems that I want to fix, and I didn't want to bother waiting another 45mins for the plot to finish, haha. but the basic idea is there and I think it looks nice?
more progress! I ended up having to write my own skeleton tracing algorithm, which I thiiiink is working okay now—basically it does a flood fill starting with pixels having exactly one neighbor, and each connected pixel is a node in a graph; later I use visvalingam-wyatt line simplification on each segment between nodes w/3+ edges. this technique gives me nice long lines, clean intersections, & hopefully more elegant plotter gestures. (this is just a raster preview, will try an actual plot soon)
the colors are just for debugging (fading from red to blue according to the index of the given polyline)—the final piece will just be b/w. also this is using debug data (thresholded uniform noise w/gaussian filter), not DistilBERT states like I'll use for the final version. I'm at the point in the project where I need to break the code out into standalone modules instead of having one big spaghetti notebook