Object Classifier
The object classifier can be trained to distinguish between immuno positive cells, immuno negative cells and no cells.
Last updated
The object classifier can be trained to distinguish between immuno positive cells, immuno negative cells and no cells.
Last updated
Under Classify, Object Classification, Train object classifier or ctrl+L and search it, open the PlugIn.
Under the Annotations tab choose the classes created for the cell classification, set on auto draw, and draw over some positive cells, negative cells, and no cell with the according class on Auto set chosen.
The closer you zoom into the image, the more accurate you can draw, as the image size increases but the brush stays the same.
Click on live update and the detected objects will get a suggested class, visible in the marked colors. If the class isnโt right, you can easily change it by drawing over it with the right class.
The object classifier will be trained based on those selections; therefore all the detections must have the right class.
Once satisfied with the classification of the objects the classifier should be saved as ObjectClassifier if you only have 1 tissue type, and as ObjectClassifier_componentx if you have multiple types. The name must be chosen the same as this will ensure the script runs properly. The ObjectClassifier will be saved in a subfolder of your project directly by QuPath.
A random region in a slide should be chosen to test the accuracy of the object classifier. Therefore choose a random region in a slide and run the "EstimateStainVectors" Script followed by the "CellDetection" Script. Make sure that the region is selected whilst running the cell detection.
If you have closed the Train object classifier window, you can reopen it under Classify > Object classification > Train object classifier
By clicking on load training in the Train object classifier box click the initial training image can be added and applied (your training image might be called Sparse Image (18 Regions)). Make sure that the live update is selected then the detected cells and artifacts are classified.
The classification of an object can easily be changed by drawing over it with another classification. It should be ensured that all the objects are correctly classified before adding them as training images and the repetition of the process.
Once satisfied with the classified objects, add the image to the "Load training" images as in step 8. Repeat steps 6-10 till the object classification is highly accurate.
The objects in the classifier should be saved as ObjectClassifier if you only have 1 tissue type, and as ObjectClassifier_Component1, e.g. ObjectClassifier_NP if you have multiple types.
Copy the created classifiers golder as well as the scripts folder from the classifiers folder to the regions folder. This is needed as we will run the final script within the regions folder but need to call the object classifiers.