Acoustics of Coffee Roasting: Machine Learning Edition - Page 3

Discuss roast levels and profiles for espresso, equipment for roasting coffee.
btreichel
Posts: 141
Joined: 8 years ago

#21: Post by btreichel »

Nice Job!

luma (original poster)
Posts: 77
Joined: 10 years ago

#22: Post by luma (original poster) »



My roast profile for this bean is shaping up a little better (after 10 revisions) and I've kept it from scorching and tipping which is nice. The two classifiers are both working a little more accurately here. With more training data under their belt, the classifiers themselves are getting larger and slower to execute.

Here's how the setup works under the covers: the scripts monitor the recording folder for a new 1-second wave file that is at (or above) the expected size because SoX writes out sequentially and I don't want to classify a half-written WAV. Once a new full-sized file is found, it's handed to the classifiers for processing. Once they've reached a determination, the result is written to a file and the process starts over again. As the model gets larger, the classifiers take longer, and they start skipping individual 1-second segments (this is by design). They're currently somewhere in the range of 2+ seconds per run, increasing latency and decreasing resolution, but at the same time a couple seconds lag here isn't a big deal and the processing requirements will be halved once I decide on a specific classifier to run. kNN has been reliably producing solid results thus far and seems to be the likely candidate for rolling out something I can hand out to other users.

luma (original poster)
Posts: 77
Joined: 10 years ago

#23: Post by luma (original poster) »

I've recorded a video demonstrating the system running a full roast in Artisan. The interesting bit starts at about 9:20, here's a direct link because I don't know how to get the forum to stop stripping the timecodes.

Nearly the entire roast is on auto-pilot. I turned on the heaters manually for purposes of this video, then I started the video right before clicking "on" to start a new roast. This triggers the DHT monitor for temp and humidity as it consumes very little overhead so I leave it running for the entire roast. At BT 250 (a couple seconds later in this clip), an alarm starts the roast, launches the audio recording, and starts the two classifiers. I am charging the roast at 300 and receive a couple prompts to make that happen.

In the bottom right of the screen you'll see 4 LCDs, showing the output from the classifiers:
  • SVM Classifier % confidence "environmental"
  • SVM Classifier % confidence "firstcrack"
  • kNN Classifier % confidence "environmental"
  • kNN Classifier % confidence "firstcrack"
For actual use you'd probably only run one classifier with just the one first crack LCD enabled, I have all 4 displayed here for test purposes.

Outside of charging the beans this profile runs on auto-pilot through Artisan alarms. The KNN classifier is looking accurate enough for me to set an Artisan alarm to trigger marking FCs automatically. I'm going to need to do some filtering for FCe, I think 3 consecutive samples of 0% confidence of FC would probably be a good point and it aligns well with the recorded data from previous roasts.

Anyway, here's the video!

Post Reply