Image Matching to solve captcha
Here's one simple yet effective solution without using the deep learning algorithm.

Divide the problem into 2 parts:


Segmentation: You'll need to do some image processing like edge detection and segment all the objects in the given captcha and save the region of interest (OpenCV can help). Assign labels to the objects.
Similarity Measurement: Use some scale and rotational invariant feature descriptor algorithm to extract features from the objects, and a matcher to compare the objects for a similarity measure (check SIFT/SURF features). 


Based on the similarity scores, make a decision.