The math of precision and recall
Among the test photos there are 100 sick leaves and 900 healthy ones. The model says sick for 110 leaves, and 90 of them really are sick. Precision is 90 out of 110, about 82 percent. Recall is 90 out of 100, which is 90 percent.
When you need a single number, people often use F1, an average of the two that punishes a model that neglects either one. Here it's about 0.86. It's handy for comparing two models, but you should choose the threshold by looking at the two numbers separately.
precision = true positives / (true positives + false positives)
recall = true positives / (true positives + false negatives)
F1 = 2 × precision × recall / (precision + recall)