Abstract. Automatic container code recognition plays an important role in customs logistics and tra-nsport management. Due to difficulties such as character color and font size variation, illumination conditions, image degradation, and exist of many other characters, automatic detect and recognition of container code is still a difficult task. This paper proposes a container code detection algorithm based on deep convolutional neural network named holistically-nested edge detection (HED). In the training phase, a bounding box was drawn around container code as virtual edges, and they were feed to the network together with original image to train the HED model. In the test phase, probability map of bounding box was predict by trained model and finally bounding box is obtained by thresholding and connected region analysis. Experimental results on 9953 container images show that the performance of IOU and recall precision on test set can reach 0.646 and 0.934 respectively with the proposed algorithms.