uit-cosmo / blobmodel

Model of propagating blobs in 1D and 2D
https://blobmodel.readthedocs.io
MIT License
6 stars 2 forks source link

implement individual labels for individual blobs #42

Closed gregordecristoforo closed 2 years ago

gregordecristoforo commented 2 years ago

In order to track individual blobs over time give every blob an individual label. If multiple blobs overlap choose the blob with highest amplitude.

leanderkirkeland commented 2 years ago

With some changes to the model, i have made two extra label types: simple diff: Same as the one you created but with label for each created blob. The problem with this one is that it overwrites the old ones even if it has higher amplitude. diff: Takes into account the self.__density field, to chech if there already is a higher amplitude at the point, and does not overwrite it, but you get some gaps between the blobs.(this can be both good and bad). Here is an image of the last one.

Figure_1

Another thing is that this would not be a great set for CNN only, since if one blob leaves the image after say12 sec, then the image would not have label 1, but only higher, and as CNN treats each image seperatly, but this would be good for CNN-RNN where it is timedependent of the previous image. So i think if we use this on the models i use now, it would be just random and it would predict every pixel to be 0.

Also i do not know how to send the changes i made, or upload the python file in this issue.

gregordecristoforo commented 2 years ago

Thanks for looking into this! You can upload your scripts to uit-cosmo/2d-propagating-blobs simply by pushing your local commits in this branch to github . If you haven't used git before, here is a quick tutorial: https://hackmd.io/@coderefinery/cosmo-2022 but you find tons of stuff online. Let me know if you still want help.

It would be very helpful to upload the code so that I can give feedback on your implementation and see how your implementation works.

Regarding the different amplitudes; if you order the blobs by increasing amplitude and assume you have constant radial velocities you won't have the issue of small blobs overwriting the labels of larger blobs. Alternatively, you could check for each time step which amplitude is the highest, that would however be much more work to implement and also slower at runtime.