gpeyre / numerical-tours Goto Github PK
View Code? Open in Web Editor NEWNumerical Tours of Signal Processing
Home Page: http://www.numerical-tours.com
Numerical Tours of Signal Processing
Home Page: http://www.numerical-tours.com
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
In https://github.com/gpeyre/numerical-tours/blob/master/matlab/fastmarching_0_implementing.ipynb on In [22]
, the Delta
is calculated as
Delta = 2*W(j) - (dx-dy)^2;
while I believe it should be
Delta = 2*W(j)^2 - (dx-dy)^2;
This doesn't matter for the example with cell sizes of 1. However, in different cell sizes, it seems to cause a numerical approximation of the L^p norm close to the goal cell, where p equals the grid size.
In [14] both dX and dY are undefined and an error message will appear
Thank you very much
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.
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
Would it be possible to change the typesetting of the exercises from
Exercise 3
BLABLA
to something lighter like
Exercise 3: BLABLA
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.
There is an error in the perform_convolution
function the python module
perform_blurring
.
On line 218, the array d
should be converted to an integer type as its used for indexing.
Suggested fix:
d = np.floor((p-1)/2.).astype(int)
Thank you in advance!
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
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
would you please help to provide exo4 solution to check the correct code
Thanks
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.
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.
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.
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,
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.
mxCreateNumericArray, mxGetDimensions and mxSetDimensions parameters and return type mismatch with Matlab 2021a
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!!!
Apparently the translation to ipynb is not ok (?).
When I navigate to the numerical tours' website and choose a programming language, I see that under the basics section, the second chapter link is Le traitement numérique des images. The Jupyter Notebook also seems to be in French. I was looking for some resources in English.
Thank you and please let me know if I could be of help.
Are you ready to update the link in the README and the top of the Github page to point to the gh-pages site?
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
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.
It would be nice if (in the spirit of matlab NTs) if the solution code for exercices was hided (still in the output, but displayed in a cell).
It seems that this is possible to achieve through manipulation of the DOM, see for instance http://joergdietrich.github.io/notebook-collapse-input.html for an example of collapsible cell or http://www.damian.oquanta.info/posts/hide-the-input-cells-from-your-ipython-slides.html
Does anyone known the cleanest way to do it ?
To really make this an open source project an OSI approved open source license 📜 needs to be added (no license means copyrighted material that is not open source 😢 ).
The license type is up to the authors but I suggest Apache 2.0 (or GPL-v3), see also https://choosealicense.com/.
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
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 ?
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.
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
Small issue when generating the solutions : the exercises seems to be starting at exo0 instead of exo1.
Would it be possible to remove the cells
%%matlab
Insert your code here.
when converting toward the matlab notbooks ?
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
?
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.
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 ?
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
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.
would you please help to provide exo4 solution to check the correct code
Thanks
img = imgpi/(2length(theta));
why the img need to multioly pi/(2*length(theta) so that we can get the right img.
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 !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.