Direct observation to study biodiversity can be time consuming, however, other methods often provide indirect measurements and are possibly biased. To solve these problems, images can be a useful tool and ecologists have started to rely more and more on images as a source of data and on automated image analysis. However, the existing methods mostly perform image classification. In this paper we present an efficient method based on object detection to access deeper information the content of an image. Using high resolution images, we built a pipeline to slice the original images, perform detections and later refine these observations. We illustrate the interest of this pipeline by using it on-field images taken in agroforestery banana-coffee systems to study invertebrate communities around the banana pests Cosmopolites sodidus and Metamasius sp. and the interactions between the different animals within this community. Experimental results show that our pipeline reaches 87.8% F1score and allows us to successfully detect and identify 23 species and ant castes. These 23 species are divided into 7 superclasses, but the ant super-class, that shows more individuals and interactions is described more precisely. We are then able to study the interaction network between different species of this community and identify major predators of banana pests within this ecosystem.