Giter Club home page Giter Club logo

numerical-tours's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

numerical-tours's Issues

can't set up NtToolBox julia package on my computer

julia> using Pkg; Pkg.activate("."); Pkg.instantiate();
Activating new environment at C:\Users\assia\Documents\DeepLearningIntern\numericalTours\NtToolBox\Project.toml
Updating registry at C:\Users\assia\.julia\registries\General
┌ Warning: Some registries failed to update:
│ — C:\Users\assia\.julia\registries\General — registry dirty
└ @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Types.jl:1194
No Changes to C:\Users\assia\Documents\DeepLearningIntern\numericalTours\NtToolBox\Project.toml
No Changes to C:\Users\assia\Documents\DeepLearningIntern\numericalTours\NtToolBox\Manifest.toml

a typo on numerical tours - Brenier's OT

Hi developers/or mathematicians,

First of all thanks for your numerical tours! They are very helpful.

I notice that on http://www.numerical-tours.com/matlab/optimaltransp_2_benamou_brenier/, when you define

PolyCoef = @(m0,f0,lambda)[ones(length(f0),1), 4lambda-f0, 4lambda^2-4f0, -lambdasum(m0.^2,2) - 4lambda^2f0];

The coefficient for the f term is inconsistent with the formula.

image

For the f term in this polynomial, in the formula it writes “4lambda^2-4lambdaf0” while in this line it’s written as “4lambda^2-4*f0”. Since later in the optimization procedure lambda is set to 1 so the results should make no difference, but I just want to give attention to this just in case someone might be using it with different parameters.

Thanks,
Hongyi

Examples of image warping

Are there any examples of image warping/image morphing? I see interp2 used in the optical flow example but I don't quite understand how the rotated coordinates are set up.

General question

Hi,
This is not an issue, but a general question about your development. First I would like to say great job on the numerical-tours, it is good stuff.

Now, on to my question. I'm a heavy Matlab user and see that you started with Matlab, but also branched out to Python. I'm curious as to why you decided to do this. Do you plan to migrate away from Matlab to using Python for your future work? Do you find the IPython notebook experience better than using Matlab's publish feature?

Again, I'm just curious. I have oscillated back and forth over the past year or so of going from Matlab to Python's scientific stack. Feel free to e-mail me directly if you do not want to consume your "issues" area with this thread.

Thanks
-Simon

Invalid MEX-file perform_front_propagation_mesh.mexmaci64 MacOS Catalina 10.15

Hi,
first of all thanks for sharing this awesome package with the community and maintaining it! I really appreciate it :)

Starting to use it as a dependency of this project

I realized an error that I could not seem to fix:

Invalid MEX-file '/<Path-to-file>/numerical-tours/matlab/toolbox_graph/perform_front_propagation_mesh.mexmaci64':
dlopen(/<Path-to-file>/numerical-tours/matlab/toolbox_graph/perform_front_propagation_mesh.mexmaci64, 6):
Symbol not found: _mxCreateDoubleMatrix_700

After investigating the error in some useful stackoverflow issues, matlab issues and more useful compiling hints, I figured that I might need to recompile the MEX file since due to changes in the OS system from MACOS Sierra. Therefore, I wanted to ask you if you might have seen this issue before and might have an updated .c file I could use for creating the MEX function? I have little experience with C, therefore I am not 100% what needs to be changed besides adding a mexfunction in order to compile it with the current clang version. Thanks a lot for your time! Let me know, if you have any hints or might be able to create a new .mexmaci64 file even.

Have a very nice day!
Lisa

Tensor Driven Diffusion Flows

First of all, your site is amazing.
I'd be happy if you shed more information on math aspect of things (For instance how does the Fast Marching algorithm solve the "Redistancing" needed in the Active Contours and is it required at all, why mathematically the level set becomes "Blurred") yet still this is a great information source.

Anyhow, I read the book on "Tensor Driven Diffusion Flows".
I remember David Tschumperlé's article, Fast Anisotropic Smoothing of Multi-Valued Images using Curvature-Preserving PDE's, which is very similar.

What's the innovation in David's work?
Could it be implemented in tour notebook?

Sharing your great knowledge is amazing, thank you for that.

nt_toolbox module

It would be nice to replace the monolithic nt_toolbox.py by separate functions in nt_toolbox/, like a module one would load at the beginning.

Version compatibility with Matlab?

I ran into some problems using R2016a with these notebooks. The first (although perhaps not only) was that wavread has been replaced by audioread, so the first audio processing notebook would not work.

More relevant to the issue title, I could not find reference of what version of Matlab these notebooks are supposed to be compatible with. I am installing 2013a currently, in hopes that it will work with the tours, but having that information available somewhere in the readme files would be useful.

Contribution to the project for Python Gradient Descent

Hello! Hope you're doing great!

A huge thank you for developing these Numerical Tours, it has been a blessing as a guidance for my Intro to AI course.

I want to contribute to the project, specifically in the Python Gradient Descent Notebook. I coded the solutions for exercises 4 and 5 (adapted from the ones you did in MATLAB), improved the code for solution 3 and fixed some typos in the notebook.

It would be cool to know if it would be in your interest to update the repository or give me some feedback on them.

@gpeyre @pierrestock @blink1073

Greetings from Colombia, take care,

Indicating matlab binaries to pymatbridge

When I run %load_ext pymatbridge for the first time after launching ipython notebook, it fails to start MATLAB on ZMQ socket.

However, running a cell with

from pymatbridge import Matlab
mlab = Matlab()
mlab = Matlab(executable='/Applications/MATLAB_R2013b.app/bin/matlab')
mlab.start()

succeeds. And then, if I restart the ipython kernel (or start another notebook), %load_ext pymatbridge is now working. Apparently, it seems that one needs to explictely tells where is the Matlab executable, and then pymatbridge remembers it unless the whole ipython notebook is re-launched.

denoisingadv_3_structure_tensor

Would you please share the whole code of the denoisingadv_3_structure_tensor project, I find some *.m files in the solutions dir of denoisingadv_3_structure_tensor, I didn't find any other source codes related to these EXO scripts.

Many many thanks, your projects are very impressive!!!

Problems running codes in Jupyter Notebook

Hello,

I am using Matlab R2016b and Anaconda 2. I was successfully able to start Matlab from the command prompt:

image

However, I am getting the following error when running my code on Jupyter Notebook:

image

Grateful if anyone can help.

Cheers.

Error in denoising by sparsity

Hi gpeyre,

I get this error :
Error using *
Inner matrix dimensions must agree.

Error in denoise2 (line 1)
Y1 = reshape(D*x, [w w m]);

for the code line no. 360 in 'sparsity_5_dictionary_learning_denoising.m' . Could you help me out in resolving this error?

Thanks in advance,
Poonam

pymatbridge problem for opengl display

Apparently opengl rendering is not working properly with pymatbridge.

For instance, a call to

%%matlab
membrane

is ok. But apparently then it does resort to zbuffer for rendering, so probably non opengl, and using

shading interp

gives weird looking figure. And then calling

light('Position',[0 -2 1])

makes the notebook freeze.

And also, display of large 3d meshes becomes very slow.

denoisingadv_6_nl_means.ipynb missing brackets

denoisingadv_6_nl_means:
It seems brackets are missing to normalise the distance by the patch area according to the distance matrix definition:
In the function distance_0 (section "Localizing the Non-local Means")
return np.sum((H2 - np.tile(H[i[0],i[1],:],(len(sel[0]),len(sel[1]),1)))**2,2)/w1*w1
should be
return np.sum((H2 - np.tile(H[i[0],i[1],:],(len(sel[0]),len(sel[1]),1)))**2,2)/(w1*w1)

to get a weight map similar to the section above

pymatbridge re-naming isrow

When I do a matlab addpath after launching pymatbridge, I get the warning

[Warning: Function isrow has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In path at 110
In addpath at 87
In pymat_eval at 38
In matlabserver at 27]�

Is there a way to avoid this ?

Issue about optim_4_fb

In the article, it says
"% it has a (L)-Lipschitz gradient with
% [ L = \norm{ \Phi^* \Phi }. ]"

Should it be [ L = \norm{ \Phi }^2. ] which is equal to [ L = \lambda_max{ \Phi^* \Phi }. ]?

It refers to http://epubs.siam.org/doi/abs/10.1137/080716542

ps: Does anyone know some references about how to calculate the L constant of a R^n function?
Also about the relationship between L constant and operator norm? I'm a little confused now~

Thanks.

Anisotropic Fast Marching

I am a researcher who is doing research about tubular shape related segmentation and tracking and I applied multi-stencil fast marching in my previous project. I find one of your numerical tour is about anisotropic fast marching and I am currently studying your code. I am new to anisotropic fast marching. I have to say your code is amazing. Is that possible for you to post some related math behind anisotropic fast marching code(fm2dAniso.h)? Thank you so much for the amazing numerical tour anyway!

Kind regards,
donghao

Python notebook exercises

Small issue when generating the solutions : the exercises seems to be starting at exo0 instead of exo1.

Add Scilab notebooks?

I'd like to add notebooks for Scilab as well, using scilab2py. I have the template ready to do it. Is this welcome? If so, would we put them in matlab\scilab_notebooks?

New directory structure

Maybe the directory structure of the matlab tours (and probably the python as well) is a bit messy. Maybe something like having

  • m_files/
  • ipynb_files/
  • toolboxes/
  • solutions/

is better (?) and then subdividing m_files/ and ipynb_files/ using sub-themes

  • audio/
  • coding/
  • denoisingadv/
  • ...

would helps to clarify.

Conversion and master files

Just to be sure : Are you using convert_all to convert the original .m files both to python (which go to python/todo/) and matlab notebooks (which go to matlab/) ?

Maybe it is safer to direct freshly converted matlab notebook in matlab/todo/, and once we are happy with them, we copy them in matlab/. Once a notebook is in matlab/ (or python/), then it becomes the master file to keep track/update. For now, I am still considering developing new tours by using the .m file, and only after, once finalized, convert it into .ipynb. Do you think this is acceptable ?

bug in load_image of nt_toolbox/signal.py?

Hello,

It sems to me there is a bug in the function load_image of nt_toolbox/signal.py. In order to load an image encoded in np.unit64 and re-normalize it between [0, 1], I think one should convert the image into a np.float64 array first (which is not done in the curent code if i am not mistaken)

Best,
Jia

Behavior of matlab / notebook regarding matlab paths.

This is not really something to fix but a question...

I have noticed a change of behavior between matlab execution and ipython execution. Here is a typical example. I have defined cconv.m in toolbox_signal/, but (I did not know at that time) the same name is used in some (additional, not shipped in the basic matlab) matlab toolbox. This is the reason toolbox_signal/ is added at the beginning of the path. But apparently, when using ipython notbook, it keep calling matlab toolbox cconv, which makes the code crashes. Of course the correct way to fix this is to rename my function (I am now using cconvol), but I am wondering about why this aspens.

Correction for exercise 2

Hey, I don't know if you noticed, but the exercise 2 correction is empty :(
If it is possible, could you please push it ? Currently a student in Computer Science, it would help us a lot to understand the Morphing Algorithm!

Thank you !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.