Page tree
Skip to end of metadata
Go to start of metadata

Cytomine-Python-Client and utilities include basic functions to import/export data. Basically, these functions perform http requests to web services exposed by a Cytomine server.

Cytomine-DataMining includes algorithms and applications (for image classification, segmentation, and interest point detection, see description here) that rely Cytomine Python Client and utilities.


The Cytomine-Python-client and  Cytomine-Python-DataMining packages are already installed together with other Cytomine components using our regular Docker installation. These algorithms can be executed from the Cytomine-WebUi (see user guide). Indeed, following the standard installation procedure, algorithms are installed locally in the software_router docker container and we use RabbitMQ to send messages from Cytomine-WebUi/Cytomine-Core to the corresponding docker container. You can have access to algorithm code and logs here:

 

However, you might be interested to install Cytomine-DataMining package on another computer without the core server components and run them through regular command lines (e.g. to make some tests to access another Cytomine remote server, to extend our algorithms, to make your own algorithms and test them, ...).

To do so, you need to follow these instructions.

Installation

Here are instructions to install and test the Python packages:

1. Python environment with miniconda

First, setup a Python environment using Miniconda installer  (basically: get the installer script, run it, add the anaconda binary directory to your PATH variable), e.g.:

In order to avoid having to update you path everytime you come back on you machine, you might want to append the export command (line 2) at the end of the ~/.bashrc file and then run:

2. Cytomine-python-client and Cytomine-python-datamining

Pre-requirements:

2.1 Get Cytomine Python Client & utilities from our source repository

Clone cytomine python client

Install the basic Cytomine client with basic functions to communicate with the Cytomine-Core (it will install this package into anaconda subdir):

Install the some Cytomine utilities  (it will install this package into anaconda subdir):

2.2 Get Cytomine DataMining from our source repository

Install the Datamining Cytomine client with our machine learning algorithms:

2.3 Install pyxit (located in cytomine-datamining/algorithms/pyxit/)

Cythonize, compile and install pyxit:

3. SLDC workflow

If you want to install the SLDC (Segment-Locate-Dispatch-Classify) workflow, follow the installation instructions here.

 

4. Install Groovy and Cytomine-Java-Client

The segmentation_prediction and object_finder applications are using Groovy scripts (union4.groovy) and the Cytomine-Java-Client to perform local unions of geometries.

These are located in the lib/ subdirectory of the repository. If you plan to use these applications, you therefore need to install Groovy and update the

lib/Cytomine-client-java.jar  (or include it in your PATH) with the latest one from our https://github.com/cytomine/cytomine-java-client/releases repository.

sudo apt-get install groovy 

Instructions to use

Our application examples (for classification, segmentation, landmark detection) are located in cytomine-applications/

In general, you need first to add the software to Cytomine-Core (once), then you can add (associate) this software to your project(s) using the add_software.py file in each subdirectory.

Then you can test it using the bash file in each subdirectory (e.g. test-classification-validation.sh in classification_validation/ subdirectory).

Important note: Because our analysis algorithms use the pyxit, client, and utilities code, each time you modify some parts of this code, you'll have to "build" and "install" these changes on your computer using python setup.py commands (they will install your new packages into the local anaconda directory). 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • No labels