Pig farms management is involved in multiple factors such as environmental conditions, animal behavior, weight gaining and others. In all those scenarios, it is fundamental to detect each individual and its development as it grows to reach the shipment phase. Therefore, the objective of this study was to apply an automatic individual pig detection algorithm using Deep Learning Techniques, in frames taken from videos recorded during the weaning phase in real production conditions of small and medium producers in tropical conditions in Colombia. The weaning phase was selected because individual detection in each cage is more difficult due to environmental adaptations that piglets undergo after nursing. Piglets tend to cluster together during this phase, making image processing more challenging compared to the fattening phase, where animals are more isolated. The You Only Look Once (YOLOv7) algorithm and VGG Image Annotator were used to detect individuals in two pens separated by gender. All animal postures, lighting conditions were considered. The Precision, Recall and mAP metrics were used to assess the model performance with different confidence values. A precision of 98.3% in a threshold of 0.9 was reached, Recall of 98.5% in a threshold of 0.85. Data augmentation techniques were important to increase the dataset and to have a more realistic model for individuals’ detection. The method used allowed us to identify all the complete pigs’ bodies under different posture and lighting situations.