# Batch Extraction

{% hint style="success" %}
A tutorial video is available at the bottom of the page.
{% endhint %}

In our software, batch extraction of features follows the workflow outlined in the[ initial chapter of the IBSI](https://pubs.rsna.org/doi/10.1148/radiol.2020191145). This approach limits user control over processing steps and feature selection, requiring any adjustments to be made in the back-end code. This limitation is implemented to ensure that Radiomics analysis of datasets aligns with international standards.

The *Batch Extraction* page is dedicated to extracting features from datasets. This process involves a preprocessed dataset of [MEDscan objects](https://medimage.readthedocs.io/en/latest/tutorials.html#medscan-class), a [CSV file](https://medimage.readthedocs.io/en/latest/csv_file.html) containing information about the regions of interest (ROIs) to be analyzed, and, lastly, a [JSON settings file](https://medimage.readthedocs.io/en/latest/configurations_file.html).

<figure><img src="https://314741292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWC0t7nEhhoOT73GRY714%2Fuploads%2F6LfSDJMZzcmtTLKYNU7t%2FBatchExtractor.PNG?alt=media&#x26;token=15502a84-6bf2-489d-8ed7-6cd7b5fa5789" alt=""><figcaption><p><em>BatchExtractor</em> Page</p></figcaption></figure>

The extraction process utilizes parallelization through the [Ray ](https://www.ray.io/)Python library. Users can control the number of cores allocated for this step; a higher number leads to faster extraction. However, extraction time is contingent on the size of the dataset.

Below are the steps to configure batch extraction for your dataset, assuming you have the necessary files:

1. Specify the path to your processed dataset.
2. Specify the path to your JSON configuration file. Once loaded, the Edit button will be activated for live editing on the page.
3. Specify the path to your dataset ROIs CSV file.
4. Specify the folder where you want to save the extracted features.
5. Click the Run button. If the button is inactive, ensure you have completed all the required steps.

The following image illustrates the setup process for your batch extraction:

<figure><img src="https://314741292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWC0t7nEhhoOT73GRY714%2Fuploads%2FFvG6aWhE1T1xTxuR5lhR%2FBatchExtractionSteps.png?alt=media&#x26;token=f2d3e455-ce3c-4c33-998d-487b33e80625" alt=""><figcaption><p><em>BatchExtractor</em> Page - Setup steps</p></figcaption></figure>

### Tutorial video <a href="#tutorial-video" id="tutorial-video"></a>

{% embed url="<https://www.youtube.com/watch?ab_channel=MEDomicsLab&v=J5T9W2Scfas>" %}
