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

**URL:** <https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959>\
**Category:** Just KNIME It!\
**Tags:** justknimeit\
**Created:** [August 23, 2023, 2:16pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959 "2023-08-23T14:16:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![alinebessa](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alinebessa/32/33306_2.png) [@alinebessa](https://forum.knime.com/u/alinebessa)\
**Post date:** [August 23, 2023, 2:16pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/1 "2023-08-23T14:16:14Z")

</div>

💥 New Wednesday, new _Just KNIME It!_ challenge! 💥

⛳ This week you’ll improve your solution for last week’s challenge by not only identifying golf balls, but also _counting_ them! 🏌️‍♀️ Caddie Tom was too impressed with your work and wants to keep collaborating! 😁 How complicated is this new task?

[Here](https://www.knime.com/just-knime-it) is the challenge. Let’s use this thread to post our solutions to it, which should be uploaded to your public [KNIME Hub](https://hub.knime.com/)spaces with tag **JKISeason2-22**.

🆘 **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. 🙂 Let us know if you have any problems!

---

<div class="post-metadata">

**Author:** ![tomljh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tomljh/32/67732_2.png) [@tomljh](https://forum.knime.com/u/tomljh)\
**Post date:** [August 23, 2023, 4:19pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/3 "2023-08-23T16:19:45Z")

</div>

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.  

> **[JKISeasor2-22\_tomljh\_ver1 – tomljh](https://hub.knime.com/tomljh/spaces/Public/latest/JKISeason2/JKISeasor2-22_tomljh_ver1~Bbm1PAqM3mFKqQcH)**
>
> Challenge 22: Help the Caddie (Part 2)

Best wishes

---

<div class="post-metadata">

**Author:** ![rfeigel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/7ea924/32.png) [@rfeigel](https://forum.knime.com/u/rfeigel)\
**Post date:** [August 24, 2023, 12:49am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/4 "2023-08-24T00:49:38Z")

</div>

Here’s my solution.

> **[JKISeason2-22 – rfeigel](https://hub.knime.com/rfeigel/spaces/Public/latest/JKISeason2-22~piU0fq0-vZ2nCTBW)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

---

<div class="post-metadata">

**Author:** ![HeatherPikairos](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/h/a88e4f/32.png) [@HeatherPikairos](https://forum.knime.com/u/HeatherPikairos)\
**Post date:** [August 25, 2023, 8:46am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/5 "2023-08-25T08:46:32Z")

</div>

Hi Everyone 🙂

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:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/b/ebfd30ac3f0b75c19bd87cac1eb2c346ba01c4ee.jpeg)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/3/a/3a3710004ed2c15952c1d5db49112c4c0f172469.jpeg)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/7/7/779222d6f8d4bb9e479d631b50efec9f925e9995.jpeg)

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

Here is my link to the workflow:

> **[20230824 Pikairos Just KNIME It Season 2 Challenge 22 Help the Caddie (Part 2)...](https://hub.knime.com/heatherpikairos/spaces/Public/latest/Just%20KNIME%20It/Season%202/20230824%20Pikairos%20Just%20KNIME%20It%20Season%202%20Challenge%2022%20Help%20the%20Caddie%20(Part%202)~fLFcl7fJ0rYdnR9M)**
>
> Last week you helped caddie Tom by identifying golf balls in the provided images. Tom is impressed by your work and asks you to improve your workflow, such tha…

Thanks  
Heather

---

<div class="post-metadata">

**Author:** ![MoLa\_Data](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mola_data/32/58742_2.png) [@MoLa\_Data](https://forum.knime.com/u/MoLa_Data)\
**Post date:** [August 25, 2023, 10:37am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/6 "2023-08-25T10:37:16Z")

</div>

As always, @HeatherPikairos , your work is brilliant! 🤯

---

<div class="post-metadata">

**Author:** ![HeatherPikairos](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/h/a88e4f/32.png) [@HeatherPikairos](https://forum.knime.com/u/HeatherPikairos)\
**Post date:** [August 25, 2023, 10:56am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/7 "2023-08-25T10:56:12Z")

</div>

Thanks a lot @MoLa_Data 🙂

---

<div class="post-metadata">

**Author:** ![tark](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tark/32/79770_2.png) [@tark](https://forum.knime.com/u/tark)\
**Post date:** [August 25, 2023, 12:13pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/8 "2023-08-25T12:13:12Z")

</div>

Hello everyone,  
Here’s my solution.

> **[JKISeason2-22 – tark](https://hub.knime.com/tark/spaces/Just%20KNIME%20It/latest/JKISeason2-22_tark~7uN8NdGQHFFMPYAs)**
>
> Challenge 22: Help the Caddie (Part 2) Level: Medium Description: Last week you helped caddie Tom by identifying golf balls in the provided images. Tom is impr…

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/1/b/1bc4ca10ece05df7e8d3e904e5a50f5dfa952f66.jpeg)  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/6/e63a4ca5f07021b9a7cba62240df2941e1c2e879.png)  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/b/dbe575386ce759973bab4ff92b6bfff43bde0f75.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![alinebessa](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alinebessa/32/33306_2.png) [@alinebessa](https://forum.knime.com/u/alinebessa)\
**Post date:** [August 25, 2023, 4:37pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/9 "2023-08-25T16:37:13Z")

</div>

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! 😃

---

<div class="post-metadata">

**Author:** ![AnilKS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/anilks/32/52258_2.png) [@AnilKS](https://forum.knime.com/u/AnilKS)\
**Post date:** [August 27, 2023, 6:22pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/10 "2023-08-27T18:22:41Z")

</div>

My try on the image challenge…part 2

> **[Justknimeit-S2C22 – anilks](https://hub.knime.com/anilks/spaces/Just%20Knime%20It%20Challenges/latest/JustKnimeit-S2/Justknimeit-S2C22~tdOuwuQXDtfkOPT9)**
>
> JKISeason2-22

---

<div class="post-metadata">

**Author:** ![Artem](https://forum-cdn.knime.com/user_avatar/forum.knime.com/artem/32/47971_2.png) [@Artem](https://forum.knime.com/u/Artem)\
**Post date:** [August 28, 2023, 4:50am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/11 "2023-08-28T04:50:54Z")

</div>

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.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/9/4913dbba140e3390bf3ca17945e2fea6a40d8cdc.jpeg)

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?

> **[JKISeason2-22 – artem](https://hub.knime.com/artem/spaces/Public/latest/JK/JKISeason2-22~fyvTXMstd73Wk4OZ)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

---

<div class="post-metadata">

**Author:** ![alinebessa](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alinebessa/32/33306_2.png) [@alinebessa](https://forum.knime.com/u/alinebessa)\
**Post date:** [August 29, 2023, 2:19pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/12 "2023-08-29T14:19:24Z")

</div>

✨ As always on Tuesdays, here’s our solution to last week’s _Just KNIME It!_ challenge ✨

> **[Challenge 22 - Help the Caddie (Part 2) – knime](https://hub.knime.com/knime/spaces/Just%20KNIME%20It!/latest/Challenge%2022%20-%20Help%20the%20Caddie%20(Part%202)~pKSOJb_mV2SKmEfb)**
>
> Level: Medium Description: Last week you helped caddie Tom by identifying golf balls in the provided images. Tom is impressed by your work and asks you to impr…

🖼 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. 🤓

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [November 27, 2023, 2:20pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-22-season-2/71959/13 "2023-11-27T14:20:12Z")

</div>

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