What is the difference between CNN and R-CNN?

CNN (Convolutional Neural Network) and R-CNN (Region-based CNN) are both used in computer vision, but they serve different purposes. CNNs are general-purpose models for tasks like image classification, while R-CNNs are designed specifically for object detection. CNNs process entire images, using convolutional layers to extract features and classify the image into predefined categories. For example, a CNN can identify whether an image contains a cat or a dog. R-CNNs extend CNNs by identifying regions of interest (ROIs) in an image and applying a CNN to each region for object detection. R-CNN is slower than CNN because it requires generating and processing multiple ROIs, but it excels in detecting and classifying multiple objects in an image.