Solutions to "Just KNIME It!" Challenge 22 - Season 2

:boom: New Wednesday, new Just KNIME It! challenge! :boom:

:golf: This week you’ll improve your solution for last week’s challenge by not only identifying golf balls, but also counting them! :golfing_woman: Caddie Tom was too impressed with your work and wants to keep collaborating! :grin: How complicated is this new task?

Here is the challenge. Let’s use this thread to post our solutions to it, which should be uploaded to your public KNIME Hub spaces with tag JKISeason2-22.

:sos: Need help with tags? To add tag JKISeason2-22 to your workflow, go to the description panel in KNIME Analytics Platform, click the pencil to edit it, and you will see the option for adding tags right there. :slight_smile: Let us know if you have any problems!

Hello everyone, This is my solution.

Explanation:

  1. The scaling of the x-axis and y-axis is not necessary, just for faster calculation speed. Converting channels from 3 to 1 can avoid subsequent multi-channel filtering.

  2. If I only counted the number of balls, I found three methods.

  3. I personally prefer the first method, as it can be seen in the interactive view of the “Connected Component Analysis” node that no additional processing is required.Just set the necessary options.

Best wishes

2 Likes

Here’s my solution.

2 Likes

Hi Everyone :slight_smile:

I’ve adapted my solution from last week to loop through images with different numbers of golf balls, including no balls at all.

In my solution, the optimum number of clusters is equivalent to the number of balls. Therefore, I have made a table of results including the original image, a couple of plots and the number of balls column:

The results show that the workflow successfully counts the correct number of balls for each image and can handle different image sizes :slight_smile:

Here is my link to the workflow:

Thanks
Heather

6 Likes

As always, @HeatherPikairos , your work is brilliant! :exploding_head:

3 Likes

Thanks a lot @MoLa_Data :slight_smile:

2 Likes

Hello everyone,
Here’s my solution.



After calculating the number of pixels and perimeters of each segment in the image, k-Means clustering was performed to find the segments of golf balls. From the clustering analysis, the segments of cluster_0 are concentrated at almost the same coordinates, suggesting the golf ball cluster. The labeling filter node extracted the segments of cluster_0 from the original image and you see they are eight golf balls. Thank you.

5 Likes

As always, you guys are killing it! Feel free to share your work on social media if you will! We’d be happy to repost! :smiley:

4 Likes

My try on the image challenge…part 2

3 Likes

Hello everyone,

Since in the last challenge I have already defined the number and positions of the objects with native Knime nodes, in the new challenge I decided to experiment a bit more with Segmentize Anything. And actually it works pretty well, since it gives a lot of useful output just out of the box. The only problem is that this model is quite expensive to use. So the output shows the objects in boxes, returns the number of objects and return the box parameters: x, y, width and height.

The code could be optimized, so there is no loop outside of Python script, however it seems to be impossible to gather the images as a table using Python. Or am I missing anything?

5 Likes

:sparkles: As always on Tuesdays, here’s our solution to last week’s Just KNIME It! challenge :sparkles:

:framed_picture: It turns out that our solution is not so different from last week’s! After performing image segmentation using the same logic, we went a bit further in the image processing world and used a label filtering technique to identify how many balls there were. :nerd_face:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.