This project aims to detect the fetal head using image processing techniques in Python, leveraging the powerful libraries sklearn and skimage. The process involves several steps including noise reduction, edge detection, threshold filtering, skeletonization, center detection, and ellipse fitting to approximate the circumference of the fetal head.
Fetal_Head_Detection/
├── test_results/
├── convolution.py
├── draw_ellipse.py
├── feature.py
├── find_center.py
├── libs.py
├── main.py
├── Process.py
├── requirements.txt
└── test-image.jpg
- test_results/: Example results are stored for the reference.
- convolution.py: Contains functions for applying convolution operations.
- draw_ellipse.py: Includes functions for drawing ellipses on the images.
- feature.py: Responsible for extracting features from the images.
- find_center.py: Implements the K-Means algorithm to find the center of the fetal head.
- libs.py: Contains utility functions and libraries used across the project.
- main.py: The main script to run the entire fetal head detection process.
- Process.py: Implements the overall image processing pipeline.
- requirements.txt: Lists the dependencies required to run the project.
- test-image.jpg: A sample image used for testing the implementation.
- Clone the repository:
git clone <[repository_link](https://github.com/JayKareliya-code/Fetal_Head_Detection.git)>
- Navigate to the project directory:
cd Fetal_Head_Detection
- Install the required dependencies:
pip install -r requirements.txt
Run the main script to start the fetal head detection process:
python main.py
The main.py
script will process the test-image.jpg
.
- Grayscale Image Acquisition: Convert the fetal head images into grayscale.
- Noise Reduction: Apply a Gaussian filter to remove noise.
- Edge Detection: Detect edges using kernels and convert the image to a binary format.
- Threshold Filtering: Extract a rough boundary of the fetal head by filtering the image using a threshold.
- Skeletonization: Obtain the mean values of the boundary representing the circumference of the fetal head.
- Center Detection: Use the K-Means algorithm to find the center of the fetal head.
- Ellipse Fitting: Determine the major and minor axes and fit an ellipse to the detected boundary.
- Overlay and Measurement: Overlay the fitted ellipse onto the original image to approximate the circumference of the fetal head.
For any questions or feedback, please contact me via LinkedIn. if not works you can copy the URL: www.linkedin.com/in/jay-kareliya
By following these instructions, you should be able to replicate the process of detecting the fetal head using image processing techniques.