I've attempted to build the site locally through various methods, including via the Makefile
and with jupyter-book
. So far, I haven't been successful with either approach. When I try to build with the Makefile
(after manually installing the dependencies to work around #63) I see the following:
make[1]: *** book: No such file or directory. Stop.
make: *** [Makefile:37: html] Error 2
I tried working through some of the other steps in the Makefile manually, but haven't been able to progress to getting the site built.
When I try with jupyter-book (e.g. jb build .
) I see the following:
jb build output
Running Jupyter-Book v0.11.3
Traceback (most recent call last):
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/jupyter_book/cli/main.py", line 244, in build
parse_toc_yaml(toc)
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/sphinx_external_toc/parsing.py", line 82, in parse_toc_yaml
return parse_toc_data(data)
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/sphinx_external_toc/parsing.py", line 88, in parse_toc_data
raise MalformedError(f"toc is not a mapping: {type(data)}")
sphinx_external_toc.parsing.MalformedError: toc is not a mapping:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ross/.virtualenvs/skimage-tutorials/bin/jb", line 8, in
sys.exit(main())
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/jupyter_book/cli/main.py", line 246, in build
_error(
File "/home/ross/.virtualenvs/skimage-tutorials/lib/python3.9/site-packages/jupyter_book/utils.py", line 48, in _error
raise kind(box)
RuntimeError:
The Table of Contents file is malformed: toc is not a mapping: <class 'list'>
You may need to migrate from the old format, using:
jupyter-book toc migrate /home/ross/repos/skimage-tutorials/_toc.yml -o /home/ross/repos/skimage-tutorials/_toc.yml
===============================================================================
Hi,
Can we do 3D image segmentation using skimage. If Yes, can you please guide me to a few algorithms?
Thank you very much.
We will have people using both Python 2 and Python 3 at tutorial sessions for the forseeable future. This is just prudent to keep us out of trouble.
If a print
statement is ever used in a cell, it would also be reasonable to import print_function
in that notebook.
Personally I like this to be cell zero, even before the title, along with %matplotlib inline
, in the style of scikit-learn.
As discussed a couple months back I've put together a tutorial on image moments from some notes for a particular project. I've put it in its own repo here for now and can submit a PR when it's improved and meets the format for this repo.
Tutorial outline
- The tutorial gives a background introducing what image moments are and then shows how to calculate them in scikit-image.
- Since it's reasonable(?) to assume images are going to be discrete when working with scikit-image, I quickly dropped the integral notation for summation
- After the technical intro, there's a practical extension on drawing a "clock" and showing how it's possible to "tell the time" (or not quite!) by using the orientation obtained from SVD on the covariance matrix formed from the 2nd order central moments matrix.
- Lastly there's a brief note on some further reading where the topic can be explained in greater depth
Interactivity
I used ipywidgets
to make an interactive slider so the "clock hand" could be moved around and the effect on the image moment-derived orientation could be observed directly by the reader, however all the web platforms I've looked at seem to remove this functionality and I've saved the widget state so it's now viewable on nbviewer
The interactive widgets are usable in Binder (I used f strings so it requires 3.8 and binder default is 3.7 so I had to specify that in an environment.yml
file) after a bit of investigation!
It's just a first draft and I'll take a look at the style guides for how to clean this up for publishing, thoughts welcome! ๐
Dear all,
recently I tried to run some viewer examples, and I had an issue with 6_watershed_demo.py
. It follows:
jaguar@spaghetti:~/Documents/Repositories/skimage-tutorials/viewer_examples$ python 6_watershed_demo.py
Watershed plugin
----------------
Use mouse to paint each region with a different label.
Press OK to display segmented image.
Traceback (most recent call last):
File "6_watershed_demo.py", line 39, in <module>
plugin += OKCancelButtons()
File "/home/jaguar/anaconda3/lib/python3.6/site-packages/skimage/viewer/widgets/history.py", line 25, in __init__
self.ok = QtGui.QPushButton('OK')
AttributeError: module 'PyQt5.QtGui' has no attribute 'QPushButton'
For PyQT5, this issue could be solved with:
in __init__
self.ok = QtWidgets.QPushButton('OK')
in skimage/viewer/widgets/history.py
, I think. However, this file is adapted to work also with PyQT4.
Is that right? How could we solve that?
Thanks in advance. Kind regards,
Alex
ic = io.ImageCollection('../images/.png:../.jpg') Does not work even though I am able to load
the balloon image. so it does not seem to be a path issue?
image = io.imread('../images/balloon.jpg') works fine!
The image collection is given an error which implies 0 images. I tried even this piece of code from imported data_dir within skimage and it gave the same error. I am on windows 7 and python 2.7
from skimage import data_dir
coll = io.ImageCollection(data_dir + '/lena*.png')
len(coll)
coll[0].shape
IndexError: There are only 0 images in the collection
The idea comes from https://github.com/amueller/scipy-2018-sklearn
Instead of duplicating the notebooks, they use the %load instruction to load py files stored in a solution directory. I think it's brilliant. I moved to this way for my notebooks; it will be much easier to maintain the code, and it makes the repo lighter.
For the tutorial, the lecturer can either provide the solutions or not, can type the solution or load it...
I have to admit that moving to this solution takes some time... :(
In the "images are numpy arrays" section, my "draw an H" exercise was rather contrived and a bit tedious. Drawing a grid is a bit more natural and would show the same principles.
When I run the check_setup.py I get the following error:
Traceback (most recent call last):
File "check_setup.py", line 41, in
status, pkg.ljust(13), version_installed)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2713' in position 1: ordinal not in range(128)
Note that I am using a Mac OS X 10.13.6, with miniconda installation; conda version 4.7.5 and python version 3.6.8
When working through the tutorial 'Image analysis in Python with SciPy and scikit-image', I encountered a problem in the section Combining regions with a Region Adjacency Graph (RAG). When attempting to generate the graph, I get an exception:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-123-d2130ec30b20> in <module>
6 # Pass centroid data into the graph
7 for region in regions:
----> 8 rag.node[region['label']]['centroid'] = region['centroid']
AttributeError: 'RAG' object has no attribute 'node'
It appears the API has changed since the tutorial was given.
I am using scikit-image version: 0.16.2 (downloaded with pip3 today), IPython version 7.8.0 and Python version 3.7.4.
The provided command ic = io.ImageCollection('..\images*.png:..\images*.jpg') is not working in python 3.9
although an append of files is working by seprately reading two ic individually, enumerating the appended ic wont show the jpg files.
ic1 = io.ImageCollection('../images/*.png')
ic2 = io.ImageCollection('../images/*.jpg')
#append ic1 files to ic2
for images in ic1.files:
ic2.files.append(images)
print('Type:', type(ic2))
ic2.files
The first step of make html
is pip install -q -r requirements.txt
, but unfortunately it is not currently possible to install the dependencies with pip due to conflicts in pip's dependency resolver. The failure mode is particularly frustrating because it sends pip
down a path where it tries to download very old versions of e.g. pytest
and will only fail after these fail to build.
I've encountered this problem before with the executablebooks project (executablebooks/MyST-NB#333, executablebooks/MyST-NB#289) so I suspected jupyter-book/jupytext as the culprit. Indeed, if jupyterbook and jupytext are removed from the requirements file and installed separately, the failure is resolved.
I'm creating this issue as an external to-do for possible papers on which to build tutorials / examples.
I upgraded my Anaconda distribution after submitting #17 and noticed IPython/Jupyter is now converting notebooks to a new format.
We need to decide if we want to
- keep the dependency at 2.0, in which case we must be extremely careful all of our changes are saved and committed only from 2.x
- require version 3.x, which is backwards compatible with older notebooks (the consensus decision)
I favor requiring version 3.x. The former is possible, but it's going to be increasingly difficult to support. One accidental save, commit, and merge, and we're in trouble.
This would require modifications to the check_env.py
script.
Hi respected Developers!
In above image you see red dots are the brags peaks from electron diffraction simulation in an ideal crystal(image 512x512). I wanted to remove dominant these red spots( called brags peaks ) so that i can see only diffuse scattering(background) in my images. The problem is intensity of diffuse scattering is quite low as comparing to brags peaks , that can be only be seen by plotting this image at low intensity limit,(so when i try to reduce the intensity, brags peaks becomes so dominant that i almost lost the information of diffuse scattering from background,hence therefore) would it be possible that i can somehow able to mask those red dots and remove these brags diffraction peaks and see the only diffuse patterns in background, can any one walk me through this (i am not pro in python).? I shall be very grateful for this!
Thanks
Recommend Projects
-
-
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. ๐๐๐
-
Recommend Topics
-
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.
-
Recommend Org
-
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.
-