Production systems using robotic manipulators have become common in the last few decades, and the trend is towards fenceless cells that save from space. Thus, the safety and flexibility of these systems have become more critical. The safety systems are based on either sensor data or camera images. Although the flexibility of the camera-based systems is better, conventional image processing methods are sensitive to the working environment. Artificial intelligence may be a powerful tool for them to adapt to change requirements quickly and improve accuracy and stability. In this study, a low-cost 2-D camera-based safety system was designed and installed in an experimental fenceless robotic work cell. The system controller was coupled with three alternative deep learning (ResNet-152, AlexNet, SqueezeNet) and three machine learning modules (support vector machine, random forest and decision tree). These modules were trained using photo images of ten distinct foreign objects penetrating the alarm zone. To include the ever-changing conditions of the industrial environment, disruptive effects including camera vibrations, shadows, reflections, illuminance variations etc. are included by using multiple images up to 550 for each class. Using the restricted data used for training and testing the six systems, the SqueezeNet deep learning model gave the best accuracy of 95% without any over-fitting. Despite this, machine learning-based models have been found to have 100 times faster prediction time than deep learning-based ones. Thus, the safety system can be adapted quickly to any possible changes and noise that may arise from working conditions is prevented, and time losses that may occur in industrial production may be prevented.