This is task to detect the yellow seeds that will turn into black monster seeds. For more information visit this documentations
- Python 3.6.8
- OpenCV 4.0.0
- Scikit-learn
- Download the dataset. Store it in project directory folder under
imagesfolder.
You can see the sample pair of image below. Goal is to achive the best accuracy for the prediction of which seeds will turn to black.
| Day One | Day Two | Predicted Image |
|---|---|---|
![]() |
![]() |
![]() |
To train images and train model run following code
python train.py or
python train.py --datasetPath 'PATH_OF_DATASET' --outputPath 'PATH_OF_OUTPUT_DIR'
In above code both datasetPath and outputPath are optional.
To test and create model with predicted result file run following command
python test.py or
python test.py --datasetPath 'PATH_OF_DATASET' --outputPath 'PATH_OF_OUTPUT_DIR'
- First
indexed_images.csvwill be generated, it seperated the both 24 hours before and after images by it's name. - Training file will crop the circles in
croppedfolder, both images folderbeforeandafterwill be created insidecroppedfolder. - Then the seeds are seperated from above folders. In root directory of project two folders will created named as
beforeandafter - Store the
seeds_converted.csvinside foldersaved_csvwhere the seeds that are converted into purple monster will be saved. - Now the size and position will be captured in
final_data.csv. If the seeds conveted or not that detail will be stored inmaindf.csv - It's time to train model. Model will be created based on the images.
- File will be cropped and will find the seeds details.
- Seeds details will act as an input for saved model
- If the seed detected as monster it will draw ellipse around it.


