High resolution images obtained by multispectral cameras mounted on UAVs are helping to capture the heterogeneity of the environment in images that can be discretized in categories during a classification process. Currently, there is an increasing use of supervised machine learning classifiers to retrieve accurate results using scarce datasets with non-linear relationships of the samples. We compared the accuracies of two machine learning classifiers using a pixel and object analysis approach in six coastal wetland sites. The results show that the Random Forest algorithm performs better than K Nearest Neighbour in the classification of pixels and objects and the classification based on pixel analysis is slightly better than object based. The agreement between the classifications of objects and pixels is higher in Random Forest. This is likely due to the heterogeneity of the study areas, where pixel-based classifications are most appropriate. In addition, from an ecological perspective, as these wetlands are heterogeneous, the pixel-based classification reflects a more realistic interpretation of plant community distribution.