I optimized the code based on the provided code, fully using OpenCV Python, and optimized the functions within it.my github: https://github.com/qsd-github/sam-clip-opencv