Example Project Data

Sample screening data can be used to create new projects (as long as a unique project name is used).

Tutorial for Sample Data

Download and extract

First, download one of the sample archives above. After the download is complete, extract the archive.

You should now have a directory containing subdirectories called 'img' and 'bw,' which contain the original and segmented images, respectively.

Create project

Next, open QDREC in a new browser tab or window, and select "Create Project" from the navigation bar. Make sure the new window is wide enough to display the entire navigation bar, with 5 entries. We recommend you make the QDREC browser window as wide as possible (maximized).

Once the page has loaded, enter a unique name for your project. You can see what project names have already been used, by switching to the "Load Project" tab, and look through the drop-down menu of available projects.

Next, you may choose to deselect the "Public project" checkbox. If this box is checked, you (or anyone else) will be able to load the project using the "Load Project" page. If the box is unchecked, then a secret six-character project identifier will be assigned, which can be used to load the project.

Now, choose a segmentation method from the "Segmentation" drop-down menu. The default "Asarnow-Singh" method has the best performance. To save time, select "Upload." This will allow you to use the segmented images provided in the data archive, rather than waiting for the server to completely segment the original images.

To upload images files for your new project, open the 'img' directory from the data archive and drag the images into the file upload area labeled "Upload images." Parallel data upload will begin immediately, and may take up to 10-20 minutes depending on the speed of your connection.

If the Segmentation method has been set to "Upload," you must also open the 'bw' directory from the archive and drag the segmented images onto the second file upload area (labelled "Upload segmented images").

Please wait for all uploads to complete before proceeding (or else some images may be dropped by the server).

Finally, click . A loading animation will be shown while the server registers each image and performs segmentation using the selected method (if applicable). When segmentation and registration are complete, the loading animation will be replaced with some information about your new project. If this is a private project, then you must save the six-character project identifier token in order to access the project again later.

Once project creation is finished, switch to the "Review Segmentation" tab and inspect the segmented images directly. Now that your project has been created and is loaded by the server, navigate to the "Define Subsets" page.

Define subsets

For the Mevastatin sample data, please enter all of the images into a single subset called 'complete' and then proceed directly to the "Run Classifier" section of the tutorial.

When training a new classifier, project images must be divided into at least two subsets for use in training and testing. The Niclosamide sample data should be divided into the following 'training' and 'testing' sets:

Subsets for Niclosamide Sample Data
Training Testing
072913-CTRL-0-4-a 072913-CTRL-0-4-b
072913-NIC-0001-4-a 072913-NIC-0001-4-b
072913-NIC-001-4-a 072913-NIC-001-4-b
072913-NIC-01-4-a 072913-NIC-01-4-b
072913-NIC-1-4-a 072913-NIC-1-4-b
072913-NIC-10-4-a 072913-NIC-10-4-b

Subsets are defined by selecting images from the list on the right side of the page. When the desired images are chosen, the subset name is entered into the "New subset" field. Click the button to create the subset, which will appear in the list of subsets.

The and buttons control selection of images by inverting and clearing the selection, respectively. The is especially convenient for defining a test set which is the complement of an already defined training set.

Once acceptable training and testing sets have been defined, navigate to "Create New Classifier."

Create classifier

Annotate Data

The first step in creating a new classifier is manually annotating the training set, conducted on the "Annotate Data" tab. The annotation interface holds two high-resolution images side-by-side, so you may need to maximize your browser window.

To train, select the desired training subset from the menu at the top of the training interface. Once selected, the interface will switch to the chosen set of images.

QDREC will present you with a series of matched experiment and control images. The experimental images are decorated with bounding rectangles which indicate the parasites which were found by the computer vision algorithm. These rectangles are blue, which indicates the "normal" classification.

Click inside a bounding box to mark a parasite as "degenerate." The bounding box will turn red, reflecting the recorded state of that parasite. You can switch a "degenerate" parasite back to "normal" by clicking in the box again. This will also toggle the box color back to blue.

Clicking will cause all parasites in the image to swtich state (e.g. from normal to degenerate or vice versa). Clicking will reset all of the parasites to the normal state.

When you have finished classifying the parasites in an image, click to advance to the next image. As you advance through the images, your progress will be noted. You may also return to previously visited images by clicking .

QDREC will remember your progress, so if at any time you would like a break from training, just exit the system. When you return and load the project, you will be able to pick up with training where you left off. You may also explicitly save annotations for the current image by clicking , for example if you plan on immediately closing the browser window completely.

The sample data sets are small enough to enable rapid training. If differences from control parasites are difficult to recognize, we recommend that you review the brief slideshow (10 slides) on manual screening for schistosomula, which is provided with the sample data.

QDREC will notify you when annotation of the selected subset is complete. At this point you should switch to the "Train Classifier" tab.

Train Classifier

Use the drop-down menu for selection of the training subset, then use the radio buttons to select the desired classification algorithm. For the sample data sets, please select either SVM (RBF) or SVM (linear).

Fields for any required method parameters will appear. For details, see here. It should be fine to leave the parameters set to their default values.

Once the training set and parameter values have been selected, click to train. Be aware that training may take several minutes depending on the size of the data. When training is complete, the cross-validated confusion matrix for classification of the training set, as well as the single-image response values, will be displayed in tabular form.

At this point, proceed to "Run Classifier."

Run classifier

Select the subset for classification from the drop-down menu. In the case of the sample data sets, this should be the 'Testing' subset.

Then, select either the existing or newly trained classifier and click

Classification may take several minutes. When classification is complete, the results will be available in two forms.

Plot Results

First, a simple plotting interface will appear under the "Plot Results" heading. Click this heading to hide and show the plotting interface.

A particular drug compound can be chosen from the drop-down menu. For the sample data, only one drug ('nic' or 'meva') and an entry for 'control' will be available. Due to the small size of the sample sets, the 'control' entry is not informative and should be ignored.

Click in order to display interactive response plots for the selected compound.

Tabular Results

The tabular results include single-image response values for the test set. Click under this heading in order to view the results table. Click to download the results in comma-separated-values (CSV) format.

Thank you for taking the time to peruse this tutorial.