- Can using either
threadingormultiprocessingfor concurrent and parallel processing, respectively, of the data generator. - In the
threadingapproach (model.fit_generator(..., pickle_safe=False)), the generator can be run concurrently (but not parallel) in multiple threads, with each thread pulling the next available batch based on the shared state of the generator and placing it in a shared queue. However, the generator must be threadsafe (i.e. use locks at synchronization points). - Due to the Python global interpreter lock (GIL), the threading option generally does not benefit from >1 worker (i.e.
model.fit_generator(..., nb_worker=1)is best). One possible use case in which >1 threads could be beneficial is the presence of exceptionally long IO times, during which the GIL will be released to enable concurrency. Note also that TensorFlow's `session.run(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Collections of scripts harvested mainly from Pete, but also picked up from the forums | |
| TOC | |
| Annotation subtraction example.groovy - An example of creating and subtracing ROIs through scripting | |
| Create annotation of fixed size.groovy - see https://petebankhead.github.io/qupath/scripting/2018/03/09/script-create-fixed-size-region.html | |
| Create object based on Viewer position.groovy - Creates an object at the Viewer position. In this case a rectangle. Useful if you want | |
| to create the exact same size object multiple times and then move it to an area of interest for subsampling. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Collections of scripts harvested mainly from Pete, but also picked up from the forums | |
| TOC | |
| Accessing dynamic measurements.groovy - Most annotation measurements are dynamically created when you click on the annotation, and | |
| are not accessible through the standard getMeasurement function. This is a way around that. | |
| Affine transformation.groovy - access more accurate measurements for the affine transformation used in the image alignment (m5/m6+) | |
| Alignment of local cells.groovy - check neighborhood for similarly aligned cells |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Collections of scripts harvested mainly from Pete, but also picked up from the forums | |
| If you are starting with 0.2.0m4+ START HERE: https://petebankhead.github.io/qupath/2019/08/21/scripting-in-v020.html | |
| TOC | |
| Access objects in other project images.groovy - in later versions of 0.2.0M#, access the hierarchies of other images | |
| Access other project images or data.groovy | |
| Access project metadata.groovy - interact with user defined, per image metadata. Useful for sorting projects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install software-properties-common | |
| sudo add-apt-repository ppa:jonathonf/python-3.6 | |
| sudo apt-get update | |
| sudo apt-get install python3.6 libpython3.6 | |
| sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 2 | |
| sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 | |
| sudo rm /usr/bin/python3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import SimpleITK as sitk | |
| import vtk | |
| import numpy as np | |
| import sys | |
| from vtk.util.vtkConstants import * | |
| filename = sys.argv[1] |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
- The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.
Translations: (No guarantee that the translations are up-to-date)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import SimpleITK as sitk | |
| import vtk | |
| import numpy as np | |
| from vtk.util.vtkConstants import * | |
| def numpy2VTK(img,spacing=[1.0,1.0,1.0]): | |
| # evolved from code from Stou S., |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import SimpleITK as sitk | |
| import vtk | |
| import numpy as np | |
| import sys | |
| from vtk.util.vtkConstants import * | |
| filename = sys.argv[1] |