Project Type: Object Detection
Operating System & Browser: [Windows 11, Chrome]
Project Universe Link or Workspace/Project ID: Detect, Count, and Visualize 2
Hi everyone,
I’m working on a school project where I trained a Roboflow object detection model to recognize two types of chocolate bars: Bounty and Twix. The model is working well and successfully detecting the bars in images.
The Goal:
I want to:
- Count each type of chocolate bar detected and store it in a dictionary format like:
{"Bounty": 2, "Twix": 1}
- Assign calorie values to each bar (e.g., Bounty = 103 kcal, Twix = 95 kcal).
- Calculate the total calorie count and display it on screen when the model is deployed.
It’s enough if this works on Roboflow’s web interface, but ideally, I’d love to get it working on an embedded device too.
The Problem:
The Workflow UI looks great and seems like it should make this easy, but I keep running into problems.
Right now, the output I get is just a list of detected labels, after using a Property Definition block on the model:
[
“Bounty”,
“Bounty”,
“Twix”
]
I can’t figure out how to transform that list into a dictionary with counts. When I try using the AI Beta for help, it suggests blocks or operations that don’t exist. I also haven’t been able to get a Custom Python block to work.
If anyone has tips on how to do this, especially how to properly use custom blocks in the Workflow, I’d really appreciate it. I’ll admit I’m struggling to fully understand how the Workflow system is supposed to work.
Thanks in advance!