The invention relates to a target detection enhanced video
code rate control method, and belongs to the technical field of video compression. The method comprises the following steps: preprocessing each frame of image of an input video, dividing a plurality of coding tree units in each frame of image, and calculating gradient features of the image and the coding tree units; the video is coded through different quantization parameters, and the
code rate of the coded video and the
distortion degree of the video are calculated; fitting a cubic logarithmic model to establish a relationship between the
distortion degree and the
code rate of the video by combining the gradient characteristics of each frame and the
distortion degree and the code rate of the video; marking the ROI region of each
image frame of the input video through a target detection network, and dividing the compensation level of the
coding tree unit in combination with the ROI region and the gradient feature of the
coding tree unit; and in combination with the compensation level of each
coding tree unit, through a code rate allocation mechanism, allocating a coding code rate to each coding tree unit in each
image frame of the input video. According to the invention, the video compression process can be optimized, and the overall performance of the compressed video is improved.