Adding object detection to a Novatek-based smart camera is less about the algorithm itself and more about avoiding the mess of debugging ISP, codec, and NPU all at once. Many teams rush to get detection running right away, only to end up with unstable image quality, stuttering video streams, and NPU operator errors that are so intertwined it is difficult to identify the root cause. A more practical approach is to break the work into three phases, each with clear acceptance criteria, before proceeding to the next.
Phase one is to nail down ISP and image quality. The input to object detection is video frames. If the image is overexposed, shadows are noisy, or white balance drifts, even a good model will make mistakes. In this phase, use Novatek's ISP toolchain to tune AE/AWB and noise reduction for the actual scene, and verify that detection targets are clear under different lighting conditions. You can skip integrating a complex model for now; simply use a fixed scene image or basic color patches to confirm stable ISP output. The acceptance criteria are that the target contour is clear to the human eye, edges are not blurry, and shadow details are preserved.
Phase two handles the codec and video stream pipeline. Detection results usually need to be overlaid on the video stream, whether for local display or network streaming, which involves encoding latency and frame synchronization. In this phase, integrate the encoder, bitrate control, and OSD overlay, and use simulated detection box data instead of real results to verify that the boxes move smoothly with the scene and that there is no visual corruption or frame dropping after encoding. The key metric is the end-to-end latency from image capture to encoded output, ensuring detection results appear at the correct timestamp.
Phase three focuses on NPU adaptation and model optimization. Novatek's NPU imposes constraints on network structures, and not all operators are natively supported. In this phase, perform model conversion and quantization calibration to turn the floating-point model into an int8 or fp16 firmware format. First validate accuracy loss on a PC, then test single-frame inference latency on the board. If an operator is not supported, either replace it with an equivalent structure or offload that part to the CPU. Finally, run the actual video stream for several hours continuously to check whether the detection boxes remain stable and whether the NPU overheats and throttles.
Phasing the work this way minimizes risk. If ISP is not tuned well, all subsequent codec and NPU work is wasted. If the encoding pipeline is unstable, accurate detection results cannot be delivered anyway. If NPU performance is inadequate, you can still go back to optimize the model or adjust ISP resolution. Each phase is relatively independent, so problems can be quickly traced to hardware, drivers, or the algorithm layer. Once all three phases pass, you can return to overall system integration with much less pressure, because each component has already been validated and only interface coordination remains.
