Climate change has become a major source of concern to the global community. The steady pollution of the environment including our waters is gradually increasing the effects of climate change. The disposal of plastics in the seas alters aquatic life. Marine plastic pollution poses a grave danger to the marine environment and the long-term health of the ocean. Though technology is also seen as one of the contributors to climate change many aspects of it are being applied to combat climate-related disasters and to raise awareness about the need to protect the planet. This study investigated the amount of pollution in marine and undersea leveraging the power of artificial intelligence to identify and categorise marine and undersea plastic wastes. The classification was done using two types of machine learning algorithms: two-step clustering and a fully convolutional network (FCN). The models were trained using Kaggle’s plastic location data, which was acquired in situ. An experimental test was conducted to validate the accuracy and performance of the trained models and the results were promising when compared to other conventional approaches and models. The model was used to create and test an automated floating plastic detection system in the required timeframe. In both cases, the trained model was able to correctly identify the floating plastic and achieved an accuracy of 98.38%. The technique presented in this study can be a crucial instrument for automatic detection of plastic garbage in the ocean thereby enhancing the war against marine pollution.