The control of territorial waters is critical, since water occupies more than 70% of earth surface. Due to that fact, maritime security and safety is essential, in order to reduce illegal operations including piracy, illegal fishing and transportation of illicit goods. With the rapid development of artificial intelligence, ship detection research has increased as well. Several researchers have addressed this issue by proposing a variety of solutions such as VGG and Dense Net. Nevertheless, these proposed solutions have not provided enough accuracy in term of ship detection. Therefore, the primary objective of this work is to propose a robust model that can detect ships by applying artificial intelligence and machine learning models, those are Random Forest, Decision Tree, Naive Bayes and CNN. The result achieved in this experiment will tackle the forementioned problems and conduct research on how ships could be detected. Based on the result, Random Forest outperforms other models in terms of accuracy, scoring 97.20% for RGB and 98.90% for HSV, in comparison with Decision Tree and Naive Bayes those are scored 96.82% for RGB and 97.18% for HSV and 92.43 for RGB and 96.30% for HSV respectively. Meanwhile, CNN scored 90.45% for RGB and 98.45% for HSV. Overall, Random Forest is the best model so far, achieving a good result in terms of RGB and HSV 97.20% and 98.90% respectively. The significance of the proposed method for the field of artificial intelligence is to introduce a novel method to detect Ships.