Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Adds Inigo's week 8&9 blogposts #55

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

itellaetxe
Copy link
Contributor

Also and adapts image paths to new dedicated folder (thanks @deka27 for creating it)

3 images from past posts had not been moved to the dedicated folder, so I moved them.

…dicated folder

3 images from past posts had not been moved to the dedicated folder, so moved them
Copy link
Contributor

github-actions bot commented Jul 29, 2024

🪓 PR closed, deleted preview at https://github.com/dipy/preview-html/tree/main/dipy.org/pull/55/

Copy link
Member

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @itellaetxe,

Very interesting blog post. I learn new stuff so well explained.
See below a small comment.

also, we sure to add more spacing to make it easier to read. I know you already made a effort but I think you can add more paragraph and let the text breathe.

see your blog post preview here: https://dipy.github.io/preview-html/dipy.org/pull/55/posts/2024/2024_07_26_Inigo_week_9.html. or this one: https://dipy.github.io/preview-html/dipy.org/pull/55/posts/2024/2024_07_19_Inigo_week_8.html

Thank you in advance for updating that also


This week was a bit shorter than usual because Thursday was a holiday in the Basque Country, and today we had an outdoor activity with my lab mates (we went kayaking to the Urdaibai Biosphere Reserve). Nevertheless, it was full of advances and interesting scientific matters.

As I mentioned in my last blog post, this week I worked on the implementation of the conditional VAE based on `this implementation <https://github.com/QingyuZhao/VAE-for-Regression/tree/master>` of this `paper <https://doi.org/10.1007/978-3-030-32245-8_91>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved

@skoudoro
Copy link
Member

3 images from past posts had not been moved to the dedicated folder, so I moved them.

great catch! thanks !

@itellaetxe
Copy link
Contributor Author

itellaetxe commented Jul 30, 2024

@skoudoro, I am getting this error while building locally:
image
I investigated it on the internet but I cannot find a reasonable solution.

On the other hand, the CI fails but I am not familiar with this error:
image

I think it has to do with how make -C . html works. When the html command is issued, $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html is executed. However, $(ALLSPHINXOPTS) is defined as -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ., but if $(PAPER) is not defined, does the html command get executed?

I have barely used Makefiles, so I don't know if this a silly question 😅

@itellaetxe itellaetxe requested a review from skoudoro July 30, 2024 09:03
Copy link
Contributor

@jhlegarreta jhlegarreta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor style aspects pointed inline.

Thanks for the blog posts.

:width: 600

I also looked at the theoretical and technical implications of implementing the `beta-VAE architecture <https://openreview.net/forum?id=Sy2fzU9gl>`_ for my experiments, which could help in disentangling the latent space representation of the streamlines according to features learnt in an
unsupervised manner.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary line break

Shortly, applying a weight (bigger than 1) to the KL loss component of the VAE loss function encourages the model to learn a version of the latent space where features that can be perceived in the data space are aligned with the latent space dimensions. This way, one can modulate the generative process according to the learnt 'perceivable' features, once they are identified and located in the latent space.

However, increasing the beta weight compromises the reconstruction quality, which is what basically makes streamlines look reasonable. Finding a good beta weight is as 'simple' as running a hyperparameter search while constraining the parameter to be higher than one, and to try to prioritize
the MSE (Mean Squared Error, reconstruction loss) in the search algorithm.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary line break

posts/2024/2024_07_19_Inigo_week_8.rst Outdated Show resolved Hide resolved
posts/2024/2024_07_26_Inigo_week_9.rst Show resolved Hide resolved
posts/2024/2024_07_26_Inigo_week_9.rst Outdated Show resolved Hide resolved
:width: 600

- Visual checking fiber generation for specific bundles. Knowing that different bundles have different fiber lengths, we try to generate fibers of specific length, and see whether the generated fibers belong to the desired bundle (no matter if they are plausible or implausible).
Having length as the conditioning variable allows us to perform this trick, what would not be so intuitive to check if we had used Fractional Anisotropy or other DTI-derived metrics, as these are not visually as intuitive as length.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how these two paragraphs are rendered.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is rendered as a full stop, no line breaks. I put it there for making text edition easier

@deka27
Copy link
Member

deka27 commented Jul 30, 2024

Great Post. I need to learn more to understand the subject matter well.

@skoudoro
Copy link
Member

I investigated it on the internet but I cannot find a reasonable solution.

No idea, maybe numpydoc is not correctly installed

On the other hand, the CI fails but I am not familiar with this error:

interesting error... I will investigate later today. Sorry, it has a lower priority in my todolist. Maybe @deka27 can look at it? check pydata_sphinx_theme requirement, and if we use a newer version. maybe we need to pin the version

Copy link
Member

@robinroy03 robinroy03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good progress :)
I've not rendered the blog, so can't comment on that. But the content is good, interesting work.

posts/2024/2024_07_26_Inigo_week_9.rst Show resolved Hide resolved
:alt: First reconstruction of the training data of the conditional VAE (cVAE).
:width: 600

On the other hand, note that the FiberCup has 7 distinct bundles, and both latent spaces show (when 2D-projected with the t-SNE algorithm) 7 clusters, suggesting that the network does know about the different bundles. Samples/streamlines are colored according to their length, and even if the bundle to which they belong is not plotted, we know that each cluster is formed by streamlines of different bundles because each bundle has a distinctive length.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been thinking about this lately, FURY will be a great fit for t-SNE viz. Should make a demo/function. Not sure yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your ideas on that? Like implementing an interactive visualization for t-SNE?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Squashed 14 commits after rebasing on master to fix building error that Kaustav fixed.
@itellaetxe itellaetxe force-pushed the inigo_week_8_9_blogpost branch from 4bbeb3b to cb83457 Compare August 7, 2024 09:59
@skoudoro skoudoro merged commit e16d3df into dipy:master Aug 7, 2024
3 checks passed
github-actions bot added a commit that referenced this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants