We use Naive Bayes Model to classify the pixels.
The steps to use this code is:
- Run
generate_rgb_data.py
to compute the parameters for the Bayes model. The parameters are shown in standard output. - Copy and paste the parameters into
pixel_classifier.py
. - Run
test_pixel_classifier.py
to see the results.
We use a Bayes Model to classify the pixels and segment the image. Then we compare the contours of the segmented image to the known contours. The known contours are computed using the same Bayes Model on the training images, so that the two are unified for comparison.
The steps to use this code is:
- Run
train_model.py
to compute the parameters for the Bayes model. The parameters are shown in standard output. - Copy and paste the parameters into
bin_detector.py
. - Run
train_contours.py
to use the Bayes model to get contours of the objects in training images. The contours will be saved toknown_contours.pkl
. - Run
test_bin_detector.py
to see the results.