This paper presents a new approach by training and improving a convolutional neural network (CNN) based on You Only Look Once version 2 (YOLOv2) to efficiently detect fuel trucks from images in embedded systems. The proposed method considers the entire image area for strong object detection compared with existing methods that only focus on the image area where the class object exists to predict its probability to be in a class. The loss function for CNN is improved to enhance effective learning, especially when only a limited amount of data is available for training. The class probability can be learned by improving the loss function although the anchor boxes are not in the center of the target object. The learning process of the model can be in a limited range and achieve rapid convergence although the sizes of the initial anchor and target boundary boxes are different. Experimental results of various fuel truck images show the efficiency of the proposed approach under different detection scenarios of real fuel trucks. The detection rate of the proposed method is approximately 4% higher than the YOLOv2 object detection method. The proposed method is suitable to monitor long country borders using unmanned drones. © 2013 IEEE.