taskGNU Astronomy Utilities - Tasks: task #16362, Library: The pooling program for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #16362: Library: The pooling program for the Gnuastro

Submitter:  Faezeh Bidjarchian <fbidjarchian>
Submitted:  Thu 04 May 2023 08:43:58 PM UTC
   
 
Should Start On:  Thu 04 May 2023 12:00:00 AM UTC Should be Finished on:  Thu 04 May 2023 12:00:00 AM UTC
Category:  Libraries Priority:  5 - Normal
Item Group:  Enhancement Status:  None
Privacy:  Public Assigned to:  None
Percent Complete:  80% Open/Closed:  Open
Effort:  0.00

Sat 08 Jul 2023 03:02:29 PM UTC, comment #3: 

We are expecting the selected pixels to be located in the center of the pooling window.
Because the pooling is a general operator and we want to use it in another application like WCS. For example, we don't want to shift the input by one pixel in the sky when we select stride 1. So we must consider (like the conv layer when using "same" padding) the row and column beside the input. But this is not what the pooling operator is doing in ML.

When the CNN in Gnuastro is completed, It would be better to define such a function and check how the CNN outputs change.

Faezeh Bidjarchian <fbidjarchian>
Group Member
Fri 05 May 2023 12:50:07 PM UTC, comment #2: 

Many thanks for your great comments.
I think I must write this subsection like the other subsections.
I am very eager to use figures and have more descriptions.
I apply all of your comments and inform you.

Faezeh Bidjarchian <fbidjarchian>
Group Member
Fri 05 May 2023 11:44:33 AM UTC, comment #1: 

Thanks Faezeh! This is a useful operator in many scenarios ;-).

I rebased all the commits on your branch to a single commit on the 'pool' branch of this repository: https://gitlab.com/makhlaghi/gnuastro-dev/-/tree/pool

I started to edit the description in the book, but noticed that you hadn't actually described what pooling is! It was mainly a description of its importance in CNNs. So I edited that first part of the description, but noticed that it would be better if you do it.

For example, I see that you have a nice ASCII-art figure of pooling in the 'pool_type_on_thread' function. It would be good to bring this into the manual and describe it more completely there. Similar to the description and ASCII-art figure we have in the k-d trees section: https://www.gnu.org/software/gnuastro/manual/html_node/K_002dd-tree.html

When you are done, please commit your changes in a new commit over this branch in your repository and post it here for me to check as soon as I have some free time ;-).

Mohammad Akhlaghi <makhlaghi>
Group administrator
Thu 04 May 2023 08:43:58 PM UTC, original submission:  

In machine learning, pooling is a technique to decrease the complexity of the images (feature maps).
We consider a set of pixels inside a squared window. The width of this window is determined by the poolsize.
We apply an operator like maximum (pool-max) on the selected pixels (the window).
In Gnuastro, there was no function to do this. So, I had to write and add this program to use in my own job.
I'm delighted to announce that the pooling program is now complete!
You can use any image as an input of this program. It means your input can be a rectangle or square image.
Also, it can contain blank values.
You must determine the poolsize (that can be any positive and non-zero value greater than the width of your
image) and the type of the desired operator(poolmax, pool-min, pool-mean, pool-median).
So if you test this program with the "during-dev.sh" script, you use the command below:

utilname=arithmetic
arguments="image.fits 2 pool-max"

That image is your desired input, 2 is the size of pooling, and "pool-max" is the selected operator.
I tested the program with different images and according to my understanding, it seems to be working correctly!
If you have any suggestions or comments, or if you encounter any issues while testing it with other images, please
let me know.

Faezeh Bidjarchian <fbidjarchian>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by fbidjarchian (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-05 makhlaghi CategoryNone Libraries
        Item GroupNone Enhancement
        Percent Complete0% 80%

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code