Package: prusek-spheroid
Prusek-SpheroidPrusek-Spheroid is a Python package designed for spheroid segmentation based on provided microscope images. This package provides an easy-to-use interface and functionalities that are essential for determination of properties and characteristics of the spheroids.InstallationInstalling PythonFor Windows:Download Pythonfrompython.org.Run the downloaded installer. Ensure to check the "Add Python to PATH" option.Verify the installationby opening CMD and typingpython --version.For MacOS/Linux:Check if Python is installedby typingpython3 --versionin the terminal. If not installed:On MacOS: Install via Homebrew withbrew install python3.On Linux: Install usingsudo apt-get install python3.Verify the installationby typingpython3 --versionin the terminal.Installing MinicondaDownload Minicondafrom theofficial Miniconda website.Install Minicondaand follow the on-screen instructions.Verify the installationby opening a new terminal or CMD and typingconda list.Creating a Virtual Environment and Installing Prusek-SpheroidCreate a virtual environmentusing Miniconda:conda create -n myenv python=3.x.Activate the virtual environment:conda activate myenv(Windows) orsource activate myenv(MacOS/Linux).Install the Prusek-Spheroid package:pip install prusek_spheroid.Running the PackageTo use the package, first ensure it is up to date:pip install --upgrade prusek_spheroidthen run the program using the command:python -m prusek_spheroid.GUIUser Guide for Prusek-Spheroid GUIPrusek-Spheroid is a sophisticated Python package equipped with a user-friendly graphical interface (GUI) that facilitates image segmentation and optimization tasks. This guide provides an overview of the GUI functionalities and how to use them effectively. The whole program is based on the knowledge of segmentations of several (approximately 15 to 20) spheroids. Based on these segmentations, the program learns to segment the remaining spheroid images in the dataset (project). So far the only possible format in which the segmentations can be loaded is the COCO 1.0 format. This is the format supported by the CVAT (Computer Vision Annotation Tool) platform.Key FeaturesFile Selection: Users can easily select image files or datasets for processing. This feature allows you to work with your preferred data seamlessly.Progress Windows: The GUI includes dedicated windows displaying the ongoing progress of image processing and optimization tasks, keeping you informed every step of the way.Segmentation Parameters: Customize your segmentation process with adjustable parameters. These settings allow you to fine-tune the segmentation to suit your specific needs.Optimization Tools: Enhance the accuracy of your segmentation with built-in optimization algorithms based on the well-known Gradient descent algorithm. These tools are designed to improve the outcome of your image processing tasks.Using the GUIThe Prusek-Spheroid GUI is designed to be intuitive, providing a range of functionalities for effective image segmentation. Here’s a detailed overview of the key elements:Input File and Folder Selection: These two buttons are used for selecting and loading the annotations from CVAT in COCO 1.0 format and directory where your dataset images for segmentation are stored. You can easily navigate and choose the required folders and zip file (in COCO 1.0 format from downloaded from CVAT) that contain your image files.Output Folder Selection: After processing, the results will be saved in the selected output folder. This feature allows you to specify where you want the segmented images and other outputs to be stored. If selected, the properties of the contours are also saved in the resulting folder as an excel file. Furthermore, the JSON file with the optimal parameters is also saved in the selected output folder in the "IoU" subfolder.Project Name Field: Here, you enter the name of your project. This name will be used for organizing and saving the results in a structured manner.Method Selection: This checkbox menu lets you choose the segmentation method. The GUI includes various methods like Sauvola, Niblack, Gaussian and Mean Shift. Notably, Sauvola and Niblack methods are considered the best choices due to their effectiveness and robustness in segmentation of spheroids on a variable background subject to inhomogeneous light conditions.Gradient Descent Parameters: These parameters are crucial for the Gradient Descent algorithm. They include settings like learning rate, number of iterations, and delta stop condition (the number below which, if the change of parameters in two consecutive iterations of the Gradient descent algorithm falls, the optimization stops). It's generally recommended not to alter these parameters unless you have specific requirements or understanding of the algorithm.Other Settings Checkboxes: This section contains various checkboxes for additional settings. These settings might include options for finding also inner contours, the possibility to create a zip file in COCO 1.0 format, which will contain the resulting segmentations and can then be uploaded to the CVAT platform. It is also possible to calculate the characteristics and properties from the obtained outer contours, whose values are then stored in a separate Excel file.'I Already Know the Parameters' Checkbox: If you have pre-determined parameters from a previous Gradient descent project, you can use this checkbox. It's useful when you want to segment images using already optimized parameters without going through the Gradient descent process again. Is also recommended to use when knowing the parameters from a visually similar project.Additional InformationThe GUI is structured to facilitate both beginners and advanced users in the field of image processing.Each feature and button is designed to provide maximum control over the segmentation process, ensuring that users can tailor the process to their specific data and requirements.Regular updates and feedback from users are encouraged to continuously improve the functionality and user experience.For detailed explanations of the segmentation methods and Gradient Descent algorithm, refer to the technical documentation provided with the package.If you encounter any issues or need further assistance, please feel free to reach out toprusemic@fjfi.cvut.czSupportFor any issues or queries, contact me at:prusemic@fjfi.cvut.cz