Welcome to the Vision-based Automation for Nanoparticle Tracking and Guided Extraction (VANTAGE) User Manual. This comprehensive guide is designed to ensure the proper operation and optimal use of the VANTAGE software.
VANTAGE is an advanced automation solution developed for the Durmus Lab at Stanford University. It streamlines the process of cell sorting within the Magnetic Levitation (MagLev) system, enhancing efficiency and accuracy in research applications.
CAUTION: VANTAGE is intended for research purposes only. This software is not approved for use in medical environments or in any situation where human health may be directly affected. Always adhere to proper laboratory safety protocols and guidelines when using VANTAGE.
This user manual provides:
Detailed instructions for software installation and setup
Step-by-step guidance on operating VANTAGE
A comprehensive troubleshooting guide for any errors
For the latest updates and additional resources, please visit our official website: simitbey.github.io/VANTAGE
Operating System: Windows 10 (64-bit), macOS 10.14+, or Ubuntu 18.04+
Processor: Intel Core i5 or equivalent (i7 recommended for optimal performance)
RAM: 8 GB minimum (16 GB recommended)
Storage: 1 GB of available space
Camera: USB 3.0 compatible camera with at least 720p resolution
Python: Version 3.7 or higher
OpenCV: Version 4.5 or higher
NumPy: Latest stable version
Download the VANTAGE software package from the official website.
Extract the downloaded package to your desired installation directory.
Open a terminal or command prompt and navigate to the installation directory.
Run the following command to install required dependencies:
pip install -r requirements.txt
python vantage.py --version
VANTAGE is built on a modular architecture, consisting of two main classes:
The Region
class represents a specific area of interest in the image.
Key attributes and methods:
x1, y1, x2, y2
: Coordinates defining the region’s boundaries
name
: Identifier for the region
cell_count
: Number of cells detected in the region
white_pixels
: Count of white pixels in the region after processing
update_white_pixels(erosion)
: Updates the white pixel count
calculate_cell_count(one_cell_pixel_count)
: Estimates the number of cells
draw(image, color, thickness)
: Draws the region on the image
The CellDetector
class is the core of the VANTAGE system, handling image processing and cell detection.
Key attributes and methods:
aspect_width, aspect_height, aspect_multiplier
: Image sizing parameters
img_width, img_height
: Calculated image dimensions
one_cell_pixel_count
: Estimated pixel count for a single cell
regions
: List of Region objects
setup_regions()
: Initializes the regions of interest
process_frame(frame)
: Processes a single video frame
canny_edge_detection(frame)
: Applies Canny edge detection
fill_edges(edges)
: Fills and erodes detected edges
draw_regions(image)
: Draws all regions on the image
get_cell_counts()
: Returns cell counts for all regions
To start VANTAGE, open a terminal in the installation directory and run:
python vantage.py
Upon launching, VANTAGE will display the following windows:
Main Display: Shows the processed image with regions of interest and cell counts
Debug Blur: Displays the blurred image
Debug Edges: Shows the result of edge detection
Debug Fill: Displays the filled and eroded edges
For optimal performance with VANTAGE, we recommend the following camera setup:
We strongly recommend using a 73:27 aspect ratio for your camera feed. This specific ratio has been optimized for the VANTAGE software and the MagLev system, ensuring the best detection and analysis results.
To set up this aspect ratio:
Configure your camera or capture software to output a resolution that matches or can be cropped to a 73:27 ratio.
If your camera doesn’t support this ratio natively, you can use software cropping to achieve it.
For users with AmScope microscopes, we recommend using Open Broadcaster Software (OBS) to capture and stream the microscope feed. This setup provides greater flexibility and control over the video input.
To set up OBS with your AmScope:
Download and install OBS from the official website (https://obsproject.com/).
Launch OBS and create a new scene.
Add a new source by clicking the ‘+’ button in the Sources box and select ‘Window Capture.
Choose your AmScope window from the device dropdown.
In the OBS Settings menu, go under video to set the resolution to a 73:27 aspect ratio, i.e: 2920x1080
If needed, use the ‘Crop/Pad’ filter to fine-tune the aspect ratio.
Start the Virtual Camera in OBS before running VANTAGE.
To use the OBS output with VANTAGE:
Ensure OBS is running before starting VANTAGE.
In the VANTAGE configuration file, set the video source to the OBS Virtual Camera’s port. i.e:
cap = cv2.VideoCapture(0)
To find the port the camera is setup at, run the camera listing function by running the software with the -l flag.
By using this setup, you ensure that VANTAGE receives a consistent, high-quality video stream in the optimal aspect ratio, which can significantly improve the accuracy of cell detection and counting.
Each region of interest is outlined in blue
“nwp” indicates the number of white pixels in the region
“CC” shows the estimated cell count for the region
FPS (Frames Per Second) is displayed in the top-left corner
To exit VANTAGE, press the ‘q’ key while the main display window is active.
To modify region parameters, edit the setup_regions()
method in the CellDetector
class:
def setup_regions(self):
# Modify these values to adjust region sizes and positions
initial_boundary_height = self.aspect_multiplier * 6
secondary_boundary_height = self.aspect_multiplier * 7
# ... (other parameters)
# Add or modify regions as needed
self.regions.append(Region(x1, y1, x2, y2, "Custom Region"))
To adjust the cell detection sensitivity, modify the one_cell_pixel_count
attribute in the CellDetector
class:
class CellDetector:
def __init__(self, aspect_width=73, aspect_height=27, aspect_multiplier=14):
# ...
self.one_cell_pixel_count = 125 # Adjust this value for calibration
# ...
Error Code | Description | Problem Identification | Solving Steps |
---|---|---|---|
CPT001 | Error in image capture | Unable to capture frames from the camera | 1. Check camera connection 2. Verify camera selection 3. Update camera drivers 4. Restart the software |
STP001 | Error in initialization phase | Software fails to initialize properly | 1. Verify required libraries 2. Check configuration files 3. Ensure sufficient system resources 4. Restart the software |
LVC001 | Error in cleanup or output | Issues occur when closing or during data output | 1. Check available disk space 2. Verify file write permissions 3. Check LabVIEW connection settings 4. Restart the software |
For detailed solving steps, refer to the Error Codes section in the full manual.
MagLev: Magnetic Levitation, the principle used for cell sorting in this system
ROI: Region of Interest, a specific area in the image for analysis
FPS: Frames Per Second, the rate at which video frames are processed
For additional support or inquiries, please contact:
Email: support@vantage.io
Phone: +90 (538) 796 16 79
Website: simitbey.github.io/VANTAGE