First, it is important to understand the differences between the Arduino and the Raspberry Pi. You can read more here and here.
- The Arduino is a microcontroller. It is a specialized board that handles low level, often repetitive tasks like reading a sensor or controlling a motor with a motor driver.
- The Raspberry Pi is a complete Linux computer that typically runs on the Raspbian OS. While the Raspberry Pi has a set of GPIO ports that can interface with sensors and motor drivers, the Pi can also process higher level tasks. The Pi is capable of running python and C/C++ libraries such as OpenCV and other AI frameworks.
Using the two boards in a project are not mutually exclusive! You can use the Arduino for controlling motors and processing sensors while using the Raspberry Pi for your AI libraries and decision making steps.