This project is implemented as a part of the Data Science Practicum (CSCI 8360) course at the University of Georgia, Spring 2019. The goal was to develop a video segmentation pipeline that identifies the regions of the videos containing cilia as accurately as possible.
Please refer Wiki for more details on our approach.
The following instructions will assist you get this project running on your local machine for developing and testing purpose.
Python:
To install Python, go here
Tensorflow:
If you don't have it installed, download Tensorflow here.
Opencv:
pip install opencv-python
Pandas:
pip install panadas
Scikit-learn:
pip install scikit-learn
The following data files/folders are all available on GCP bucket: gs://uga-dsp/project2
train.txt, test.txt, data directory, masks directory
Download these files into your project directory using gsutil:
gsutil cp -r gs://uga-dsp/project2/* base_dir
You may install the package using pip
as follows:
$ pip install --user -i https://test.pypi.org/simple/ thweatt
In this case you can import the package and call different methods as follows:
>>> import thweatt
>>> thweatt.process_train(base_dir, dim_x=640, dim_y=640, n_frames=30, pre_type='none')
>>> thweatt.process_test(base_dir, dim_x=640, dim_y=640, n_frames=30, pre_type='none')
>>> X_train, y_train, X_test, test_names = thweatt.load_data(base_dir, n_frames=30)
>>> fitted_model = thweatt.model_train(X_train=X_train, y_train=y_train, clf='rf')
>>> thweatt.model_predict(base_dir, X_test=X_test, test_names=test_names, trained_model=fitted_model)
As a result of running the above code, output masks will be saved to base_dir/output/ directory.
Alternatively, you can download the source code and simply run the following command:
$ python3 main.py --base_dir /path/to/project/directory/
List of command line arguments to pass to the program are as follows:
--base_dir: absolute project directory path.
--clf: type of classifier to use. Current choices are 'rf' and 'svm'.
--xdim: width of the images after preprocessing.
--ydim: length of the images after preprocessing.
--n_frames: number of the frames per video to consider.
--pre_type: type of preprocessing. Choices are 'none', 'resize', or 'zero'.
The only reqired argument is the base_dir
which is the directory containing train_file
, test_file
, data\
, and masks\
.
Then see the above list in command line to execute the following command:
$ python3 main.py -h
One typical usage is:
$ python3 main.py --base_dir="../dataset/" --clf="rf" --xdim=640 --ydim=640 --n_frames=30 --pre_type="none"
This project can be used as a part of a bigger project to detect and identify the effects of Cilia movement/changes that can be used for future Medical Research. This project was trained on Medical images and should only be used for detecting cilia movement from the video pipeline.
The master
branch of this repo is write-protected and every pull request must passes a code review before being merged.
Other than that, there are no specific guidelines for contributing.
If you see something that can be improved, please send us a pull request!
(Ordered alphabetically)
See the CONTRIBUTORS.md file for details.
This project is licensed under the MIT License - see the LICENSE file for details