AttributeError: module 'cv2' has no attribute 'CascadeClassifier' (or 'xfeatures2d', 'TrackerMOSSE_create', module 'cv2.aruco' has no attribute 'Dictionary_get', module 'cv2.dnn' has no attribute 'readNetFromCaffe', any name): which OpenCV package and release has it
opencv-python 5.0 (2026-07-02) no longer has cv2.CascadeClassifier, cv2.HOGDescriptor, cv2.ml or cv2.gapi: opencv-contrib-python 5 still has them, and pip install "opencv-python<5" keeps them. OpenCV 5 also removed cv2.dnn.readNetFromCaffe, readNetFromDarknet and readNetFromTorch (5.0) and readNetFromTensorflow (5.1.0, 2026-11-17): load an ONNX model, or stay below 5. cv2.xfeatures2d, cv2.face, cv2.ximgproc and cv2.legacy have only ever been in opencv-contrib-python. 4.7.0 removed cv2.aruco.Dictionary_get (use getPredefinedDictionary); 4.5.1 moved cv2.TrackerMOSSE_create to cv2.legacy. Paste the error below: the answer says which releases of each package have the name.
Examples:
Runs in your browser on the data in this page (opencv_names.json); nothing you paste is sent anywhere.
Which package and release has it, and what replaces it?
The names people hit most. The two middle columns are measured; each "Instead" was run in the release it names (5.1.0.95 unless it says otherwise).
| Name | opencv-python | opencv-contrib-python | Instead |
|---|---|---|---|
cv2.CascadeClassifier | removed in 5.0.0.93 (last in 4.14.0.94) | has it | opencv-contrib-python 5 has it at the same name, and its cv2.data folder has the haarcascade XML files (opencv-python 5.1.0.95 has neither). Or pip install "opencv-python<5". |
cv2.HOGDescriptor | removed in 5.0.0.93 (last in 4.14.0.94) | has it | The same name in opencv-contrib-python 5, or pip install "opencv-python<5". |
cv2.ml | removed in 5.0.0.93 (last in 4.14.0.94) | has it | cv2.ml (SVM_create, KNearest_create, ...) is in opencv-contrib-python 5, or pip install "opencv-python<5". |
cv2.gapi | removed in 5.0.0.93 (last in 4.14.0.94) | has it (from 4.5.1.48) | In opencv-contrib-python 5, or pip install "opencv-python<5". |
cv2.dnn.readNetFromCaffe | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | Gone with the Caffe importer: in 5.1.0, cv2.dnn.readNet on a .caffemodel raises "Caffe importer has been removed" and asks for an ONNX-converted model or an older OpenCV. cv2.dnn.readNetFromONNX is still there; or pip install "opencv-python<5". |
cv2.dnn.readNetFromDarknet | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | Gone with the Darknet importer (5.1.0's readNet on a .weights file: "Darknet importer has been removed"). Convert the model to ONNX and use cv2.dnn.readNetFromONNX, or pip install "opencv-python<5". |
cv2.dnn.readNetFromTorch | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | Removed in the same release as the Caffe and Darknet readers. cv2.dnn.readNetFromONNX is still there; or pip install "opencv-python<5". |
cv2.dnn.readNetFromTensorflow | removed in 5.1.0.95 (last in 5.0.0.93) | removed in 5.1.0.95 (last in 5.0.0.93) | 5.0.0.93 still has it. In 5.1.0, cv2.dnn.readNet on a .pb raises "TensorFlow importer has been removed" and asks for an ONNX-converted model or an older OpenCV; readNetFromTFLite and readNetFromONNX are still there. |
cv2.KAZE_create | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | cv2.xfeatures2d.KAZE_create() in opencv-contrib-python 5. cv2.ORB_create and cv2.SIFT_create stay in opencv-python. |
cv2.AKAZE_create | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | cv2.xfeatures2d.AKAZE_create() in opencv-contrib-python 5. |
cv2.BRISK_create | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | cv2.xfeatures2d.BRISK_create() in opencv-contrib-python 5. |
cv2.logPolar | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | cv2.warpPolar(src, dsize, center, maxRadius, cv2.WARP_POLAR_LOG); OpenCV's docstring in 4.14 says the two give the same result. |
cv2.linearPolar | removed in 5.0.0.93 (last in 4.14.0.94) | removed in 5.0.0.93 (last in 4.14.0.94) | cv2.warpPolar(src, dsize, center, maxRadius, cv2.WARP_POLAR_LINEAR). |
cv2.aruco.detectMarkers | never had it | removed in 5.0.0.93 (last in 4.14.0.94) | cv2.aruco.ArucoDetector(dictionary, parameters).detectMarkers(image), there from 4.7.0. OpenCV's own text in 4.14: "Use class ArucoDetector::detectMarkers". |
cv2.aruco.estimatePoseSingleMarkers | never had it | removed in 5.0.0.93 (last in 4.14.0.94) | OpenCV's own text in 4.14: "Use cv::solvePnP" (cv2.solvePnP, once per marker, with the marker's four corners). |
cv2.setLogLevel | removed in 4.13.0.90 (last in 4.12.0.88) | removed in 4.13.0.90 (last in 4.12.0.88) | cv2.utils.logging.setLogLevel(cv2.utils.logging.LOG_LEVEL_ERROR); likewise cv2.utils.logging.getLogLevel(). |
cv2.aruco.Dictionary_get | never had it | removed in 4.7.0.68 (last in 4.6.0.66) | cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_50). |
cv2.aruco.DetectorParameters_create | never had it | removed in 4.7.0.68 (last in 4.6.0.66) | cv2.aruco.DetectorParameters(). |
cv2.aruco.drawMarker | never had it | removed in 4.7.0.68 (last in 4.6.0.66) | cv2.aruco.generateImageMarker(dictionary, id, sidePixels). |
cv2.aruco.CharucoBoard_create | never had it | removed in 4.7.0.68 (last in 4.6.0.66) | cv2.aruco.CharucoBoard((squaresX, squaresY), squareLength, markerLength, dictionary); then board.getChessboardCorners() and board.generateImage(size). |
cv2.aruco.GridBoard_create | never had it | removed in 4.7.0.68 (last in 4.6.0.66) | cv2.aruco.GridBoard((markersX, markersY), markerLength, markerSeparation, dictionary). |
cv2.aruco.Board_create | never had it | removed in 4.7.0.68 (last in 4.6.0.66) | cv2.aruco.Board(objPoints, dictionary, ids). |
cv2.aruco.custom_dictionary | never had it | removed in 4.7.0.68 (last in 4.6.0.66) | cv2.aruco.extendDictionary(nMarkers, markerSize). |
cv2.aruco.drawAxis | never had it | removed in 4.6.0.66 (last in 4.5.5.64) | cv2.drawFrameAxes(image, cameraMatrix, distCoeffs, rvec, tvec, length). OpenCV's own text in 4.5.5: "use cv::drawFrameAxes". |
cv2.aruco | has it (from 4.7.0.72) | has it | opencv-python has cv2.aruco from 4.7.0.72 (ArucoDetector, getPredefinedDictionary). Before that, and for the old functions, install opencv-contrib-python. |
cv2.aruco.ArucoDetector | has it (from 4.7.0.72) | has it (from 4.7.0.68) | New in 4.7.0. On an older release use cv2.aruco.detectMarkers(image, dictionary, parameters=parameters) from opencv-contrib-python, or upgrade. |
cv2.TrackerMOSSE_create | never had it | removed in 4.5.1.48 (last in 4.4.0.46) | cv2.legacy.TrackerMOSSE_create() in opencv-contrib-python 4.5.1 or later. |
cv2.MultiTracker_create | never had it | removed in 4.5.1.48 (last in 4.4.0.46) | cv2.legacy.MultiTracker_create() in opencv-contrib-python 4.5.1 or later. |
cv2.TrackerKCF_create | never had it | has it | Only ever in opencv-contrib-python (top level, every release read). |
cv2.TrackerCSRT_create | never had it | has it | Only ever in opencv-contrib-python (top level, every release read). |
cv2.estimateRigidTransform | removed in 4.x (not in 4.1.2.30; last in 3.4.18.65) | removed in 4.x (not in 4.1.2.30; last in 3.4.18.65) | cv2.estimateAffinePartial2D(src, dst) (what fullAffine=False did) or cv2.estimateAffine2D(src, dst) (fullAffine=True). Both return (matrix, inliers), not the matrix alone. |
cv2.createStitcher | removed in 4.x (not in 4.1.2.30; last in 3.4.18.65) | removed in 4.x (not in 4.1.2.30; last in 3.4.18.65) | cv2.Stitcher_create(). |
cv2.createOptFlow_DualTVL1 | removed in 4.x (not in 4.1.2.30; last in 3.4.18.65) | removed in 4.x (not in 4.1.2.30; last in 3.4.18.65) | cv2.optflow.DualTVL1OpticalFlow_create() in opencv-contrib-python. |
cv2.createShapeContextDistanceExtractor | removed in 4.x (not in 4.1.2.30; last in 3.4.18.65) | has it | Still at the same name in opencv-contrib-python. |
cv2.xfeatures2d | never had it | has it | Only in opencv-contrib-python. For SIFT alone, cv2.SIFT_create() is in opencv-python from 4.4.0.46. cv2.xfeatures2d.SURF_create exists but raises "This algorithm is patented and is excluded in this configuration" in the PyPI wheels. |
cv2.face | never had it | has it | Only in opencv-contrib-python (cv2.face.LBPHFaceRecognizer_create(), ...). |
cv2.ximgproc | never had it | has it | Only in opencv-contrib-python. |
cv2.legacy | never had it | has it (from 4.5.1.48) | Only in opencv-contrib-python, from 4.5.1.48. |
cv2.bgsegm | never had it | has it | Only in opencv-contrib-python. |
cv2.SIFT_create | has it (from 4.4.0.46) | has it (from 4.4.0.42) | In opencv-python from 4.4.0.46 (and in the 3.4 line from 3.4.11.43). On an older install: upgrade, or cv2.xfeatures2d.SIFT_create() from opencv-contrib-python. |
cv2.barcode | has it (from 4.8.0.76) | has it (from 4.5.3.56) | opencv-python has it from 4.8.0.76, opencv-contrib-python from 4.5.3.56. |
cv2.haarcascades | removed in 4.5.4.58 (last in 4.5.3.56) | removed in 4.5.4.58 (last in 4.5.3.56) | cv2.data.haarcascades (the folder path as a string). |
cv2.cv2 | removed in 4.6.0.66 (last in 4.5.5.64) | removed in 4.6.0.66 (last in 4.5.5.64) | Write import cv2. import cv2.cv2 works up to 4.5.5.64 (3.4.17.63 in the 3.4 line); from 4.6.0.66 it raises "ImportError: Bindings generation error". |
What did each release remove?
498 names went from opencv-contrib-python (and from opencv-python, where it had them) and 192 more from opencv-python only (those are still in opencv-contrib-python 5.1.0.95). A module or class that went as a whole is listed once, not name by name. The lookup above answers for every one, and for names that are still there.
5.1.0.95 (2026-11-17): 11 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.dnn.DNN_MODEL_TF, cv2.dnn.ENGINE_CLASSIC, cv2.dnn.ENGINE_NEW, cv2.dnn.readNetFromTensorflow, cv2.dnn.writeTextGraph
Class members (the class is still there): cv2.dnn_Layer.clear, cv2.dnn_Layer.empty, cv2.dnn_Layer.getDefaultName, cv2.dnn_Layer.read, cv2.dnn_Layer.save, cv2.dnn_Layer.write
5.0.0.93 (2026-07-02): 172 gone from opencv-contrib-python, 172 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.AGAST_FEATURE_DETECTOR_AGAST_5_8, cv2.AGAST_FEATURE_DETECTOR_AGAST_7_12D, cv2.AGAST_FEATURE_DETECTOR_AGAST_7_12S, cv2.AGAST_FEATURE_DETECTOR_NONMAX_SUPPRESSION, cv2.AGAST_FEATURE_DETECTOR_OAST_9_16, cv2.AGAST_FEATURE_DETECTOR_THRESHOLD, cv2.AKAZE, cv2.AKAZE_DESCRIPTOR_KAZE, cv2.AKAZE_DESCRIPTOR_KAZE_UPRIGHT, cv2.AKAZE_DESCRIPTOR_MLDB, cv2.AKAZE_DESCRIPTOR_MLDB_UPRIGHT, cv2.AKAZE_create, cv2.AgastFeatureDetector, cv2.AgastFeatureDetector_AGAST_5_8, cv2.AgastFeatureDetector_AGAST_7_12d, cv2.AgastFeatureDetector_AGAST_7_12s, cv2.AgastFeatureDetector_NONMAX_SUPPRESSION, cv2.AgastFeatureDetector_OAST_9_16, cv2.AgastFeatureDetector_THRESHOLD, cv2.AgastFeatureDetector_create, cv2.BOWImgDescriptorExtractor, cv2.BOWKMeansTrainer, cv2.BOWTrainer, cv2.BRISK, cv2.BRISK_create, cv2.CALIB_NINTRINSIC, cv2.CAP_GIGANETIX, cv2.CAP_OPENNI, cv2.CAP_OPENNI_ASUS, cv2.CAP_PROP_GIGA_FRAME_HEIGH_MAX, cv2.CAP_PROP_GIGA_FRAME_SENS_HEIGH, cv2.CAP_QT, cv2.CAP_UNICAP, cv2.CAP_VFW, cv2.KAZE, cv2.KAZE_DIFF_CHARBONNIER, cv2.KAZE_DIFF_PM_G1, cv2.KAZE_DIFF_PM_G2, cv2.KAZE_DIFF_WEICKERT, cv2.KAZE_create, cv2.SOLVEPNP_DLS, cv2.SOLVEPNP_UPNP, cv2.TrackerGOTURN, cv2.TrackerGOTURN_Params, cv2.TrackerGOTURN_create, cv2.aruco.ARUCO_CCW_CENTER, cv2.aruco.ARUCO_CW_TOP_LEFT_CORNER, cv2.aruco.EstimateParameters, cv2.aruco.calibrateCameraAruco, cv2.aruco.calibrateCameraArucoExtended, cv2.aruco.calibrateCameraCharuco, cv2.aruco.calibrateCameraCharucoExtended, cv2.aruco.detectCharucoDiamond, cv2.aruco.detectMarkers, cv2.aruco.drawCharucoDiamond, cv2.aruco.drawPlanarBoard, cv2.aruco.estimatePoseBoard, cv2.aruco.estimatePoseCharucoBoard, cv2.aruco.estimatePoseSingleMarkers, cv2.aruco.getBoardObjectAndImagePoints, cv2.aruco.interpolateCornersCharuco, cv2.aruco.refineDetectedMarkers, cv2.aruco.testCharucoCornersCollinear, cv2.aruco_EstimateParameters, cv2.ccm.CCM_3X3, cv2.ccm.CCM_3x3, cv2.ccm.CCM_4X3, cv2.ccm.CCM_4x3, cv2.ccm.COLORCHECKER_DigitalSG, cv2.ccm.COLORCHECKER_Macbeth, cv2.ccm.COLORCHECKER_Vinyl, cv2.ccm.COLOR_SPACE_AdobeRGB, cv2.ccm.COLOR_SPACE_AdobeRGBL, cv2.ccm.COLOR_SPACE_AppleRGB, cv2.ccm.COLOR_SPACE_AppleRGBL, cv2.ccm.COLOR_SPACE_Lab_A_10, cv2.ccm.COLOR_SPACE_Lab_A_2, cv2.ccm.COLOR_SPACE_Lab_D50_10, cv2.ccm.COLOR_SPACE_Lab_D50_2, cv2.ccm.COLOR_SPACE_Lab_D55_10, cv2.ccm.COLOR_SPACE_Lab_D55_2, cv2.ccm.COLOR_SPACE_Lab_D65_10, cv2.ccm.COLOR_SPACE_Lab_D65_2, cv2.ccm.COLOR_SPACE_Lab_D75_10, cv2.ccm.COLOR_SPACE_Lab_D75_2, cv2.ccm.COLOR_SPACE_Lab_E_10, cv2.ccm.COLOR_SPACE_Lab_E_2, cv2.ccm.COLOR_SPACE_ProPhotoRGB, cv2.ccm.COLOR_SPACE_ProPhotoRGBL, cv2.ccm.COLOR_SPACE_S_RGB, cv2.ccm.COLOR_SPACE_S_RGBL, cv2.ccm.COLOR_SPACE_WideGamutRGB, cv2.ccm.COLOR_SPACE_WideGamutRGBL, cv2.ccm.COLOR_SPACE_sRGB, cv2.ccm.COLOR_SPACE_sRGBL, cv2.convertFp16, cv2.dnn.DNN_BACKEND_HALIDE, cv2.dnn.DNN_LAYOUT_NCDHW, cv2.dnn.DNN_LAYOUT_NCHW, cv2.dnn.DNN_LAYOUT_ND, cv2.dnn.DNN_LAYOUT_NDHWC, cv2.dnn.DNN_LAYOUT_NHWC, cv2.dnn.DNN_LAYOUT_PLANAR, cv2.dnn.DNN_LAYOUT_UNKNOWN, cv2.dnn.readNetFromCaffe, cv2.dnn.readNetFromDarknet, cv2.dnn.readNetFromTorch, cv2.dnn.readTorchBlob, cv2.dnn.shrinkCaffeModel, cv2.haveOpenVX, cv2.kinfu.VOLUME_TYPE_COLOREDTSDF, cv2.kinfu.VOLUME_TYPE_HASHTSDF, cv2.kinfu.VOLUME_TYPE_TSDF, cv2.kinfu.Volume, cv2.kinfu.VolumeParams_coarseParams, cv2.kinfu.VolumeParams_defaultParams, cv2.kinfu.VolumeType_COLOREDTSDF, cv2.kinfu.VolumeType_HASHTSDF, cv2.kinfu.VolumeType_TSDF, cv2.kinfu.detail, cv2.kinfu.makeVolume, cv2.kinfu_Volume, cv2.kinfu_detail_PoseGraph, cv2.linearPolar, cv2.logPolar, cv2.mcc.CCheckerDraw, cv2.mcc.CCheckerDraw_create, cv2.mcc.DetectorParameters, cv2.mcc.DetectorParameters_create, cv2.mcc_CCheckerDraw, cv2.mcc_DetectorParameters, cv2.rectify3Collinear, cv2.rgbd, cv2.rgbd_DepthCleaner, cv2.rgbd_FastICPOdometry, cv2.rgbd_ICPOdometry, cv2.rgbd_Odometry, cv2.rgbd_OdometryFrame, cv2.rgbd_RgbdFrame, cv2.rgbd_RgbdICPOdometry, cv2.rgbd_RgbdNormals, cv2.rgbd_RgbdOdometry, cv2.rgbd_RgbdPlane, cv2.setUseOpenVX, cv2.stereo.STEREO_MATCHER_DISP_SCALE, cv2.stereo.STEREO_MATCHER_DISP_SHIFT, cv2.stereo.StereoMatcher_DISP_SCALE, cv2.stereo.StereoMatcher_DISP_SHIFT, cv2.undistortPointsIter, cv2.useOpenVX
Class members (the class is still there): cv2.ccm_ColorCorrectionModel.getCCM, cv2.ccm_ColorCorrectionModel.get_dst_rgbl, cv2.ccm_ColorCorrectionModel.get_src_rgbl, cv2.ccm_ColorCorrectionModel.infer, cv2.ccm_ColorCorrectionModel.run, cv2.ccm_ColorCorrectionModel.setCCM_TYPE, cv2.ccm_ColorCorrectionModel.setLinear, cv2.ccm_ColorCorrectionModel.setLinearDegree, cv2.ccm_ColorCorrectionModel.setLinearGamma, cv2.colored_kinfu_Params.volumeType, cv2.dnn_Net.getInputDetails, cv2.dnn_Net.getLayersShapes, cv2.dnn_Net.getOutputDetails, cv2.dnn_Net.quantize, cv2.dnn_Net.setHalideScheduler, cv2.kinfu_Params.volumeType, cv2.kinfu_VolumeParams.coarseParams, cv2.kinfu_VolumeParams.defaultParams, cv2.kinfu_VolumeParams.resolution, cv2.kinfu_VolumeParams.type, cv2.mcc_CCheckerDetector.setNet, cv2.ml_RTrees.getOOBError
Gone from opencv-python, still in opencv-contrib-python 5.1.0.95:
cv2.BaseCascadeClassifier, cv2.CASCADE_DO_CANNY_PRUNING, cv2.CASCADE_DO_ROUGH_SEARCH, cv2.CASCADE_FIND_BIGGEST_OBJECT, cv2.CASCADE_SCALE_IMAGE, cv2.CascadeClassifier, cv2.CascadeClassifier_convert, cv2.GArray, cv2.GArrayDesc, cv2.GArrayT, cv2.GCompileArg, cv2.GComputation, cv2.GFLUID_KERNEL_KIND_FILTER, cv2.GFLUID_KERNEL_KIND_RESIZE, cv2.GFLUID_KERNEL_KIND_YUV420TO_RGB, cv2.GFluidKernel_Kind_Filter, cv2.GFluidKernel_Kind_Resize, cv2.GFluidKernel_Kind_YUV420toRGB, cv2.GFrame, cv2.GIn, cv2.GInferInputs, cv2.GInferListInputs, cv2.GInferListOutputs, cv2.GInferOutputs, cv2.GKernelPackage, cv2.GMat, cv2.GMatDesc, cv2.GOpaque, cv2.GOpaqueDesc, cv2.GOpaqueT, cv2.GOut, cv2.GSHAPE_GARRAY, cv2.GSHAPE_GFRAME, cv2.GSHAPE_GMAT, cv2.GSHAPE_GOPAQUE, cv2.GSHAPE_GSCALAR, cv2.GScalar, cv2.GScalarDesc, cv2.GShape_GARRAY, cv2.GShape_GFRAME, cv2.GShape_GMAT, cv2.GShape_GOPAQUE, cv2.GShape_GSCALAR, cv2.GStreamingCompiled, cv2.HOGDESCRIPTOR_DEFAULT_NLEVELS, cv2.HOGDESCRIPTOR_DESCR_FORMAT_COL_BY_COL, cv2.HOGDESCRIPTOR_DESCR_FORMAT_ROW_BY_ROW, cv2.HOGDESCRIPTOR_L2HYS, cv2.HOGDescriptor, cv2.HOGDescriptor_DEFAULT_NLEVELS, cv2.HOGDescriptor_DESCR_FORMAT_COL_BY_COL, cv2.HOGDescriptor_DESCR_FORMAT_ROW_BY_ROW, cv2.HOGDescriptor_L2Hys, cv2.HOGDescriptor_getDaimlerPeopleDetector, cv2.HOGDescriptor_getDefaultPeopleDetector, cv2.MEDIA_FORMAT_BGR, cv2.MEDIA_FORMAT_GRAY, cv2.MEDIA_FORMAT_NV12, cv2.MEDIA_FRAME_ACCESS_R, cv2.MEDIA_FRAME_ACCESS_W, cv2.MediaFormat_BGR, cv2.MediaFormat_GRAY, cv2.MediaFormat_NV12, cv2.MediaFrame_Access_R, cv2.MediaFrame_Access_W, cv2.RMAT_ACCESS_R, cv2.RMAT_ACCESS_W, cv2.RMat_Access_R, cv2.RMat_Access_W, cv2.detail.ARG_KIND_GARRAY, cv2.detail.ARG_KIND_GFRAME, cv2.detail.ARG_KIND_GMAT, cv2.detail.ARG_KIND_GMATP, cv2.detail.ARG_KIND_GOBJREF, cv2.detail.ARG_KIND_GOPAQUE, cv2.detail.ARG_KIND_GSCALAR, cv2.detail.ARG_KIND_OPAQUE, cv2.detail.ARG_KIND_OPAQUE_VAL, cv2.detail.ArgKind_GARRAY, cv2.detail.ArgKind_GFRAME, cv2.detail.ArgKind_GMAT, cv2.detail.ArgKind_GMATP, cv2.detail.ArgKind_GOBJREF, cv2.detail.ArgKind_GOPAQUE, cv2.detail.ArgKind_GSCALAR, cv2.detail.ArgKind_OPAQUE, cv2.detail.ArgKind_OPAQUE_VAL, cv2.detail.OPAQUE_KIND_CV_BOOL, cv2.detail.OPAQUE_KIND_CV_DOUBLE, cv2.detail.OPAQUE_KIND_CV_DRAW_PRIM, cv2.detail.OPAQUE_KIND_CV_FLOAT, cv2.detail.OPAQUE_KIND_CV_INT, cv2.detail.OPAQUE_KIND_CV_INT64, cv2.detail.OPAQUE_KIND_CV_MAT, cv2.detail.OPAQUE_KIND_CV_POINT, cv2.detail.OPAQUE_KIND_CV_POINT2F, cv2.detail.OPAQUE_KIND_CV_POINT3F, cv2.detail.OPAQUE_KIND_CV_RECT, cv2.detail.OPAQUE_KIND_CV_SCALAR, cv2.detail.OPAQUE_KIND_CV_SIZE, cv2.detail.OPAQUE_KIND_CV_STRING, cv2.detail.OPAQUE_KIND_CV_UINT64, cv2.detail.OPAQUE_KIND_CV_UNKNOWN, cv2.detail.OpaqueKind_CV_BOOL, cv2.detail.OpaqueKind_CV_DOUBLE, cv2.detail.OpaqueKind_CV_DRAW_PRIM, cv2.detail.OpaqueKind_CV_FLOAT, cv2.detail.OpaqueKind_CV_INT, cv2.detail.OpaqueKind_CV_INT64, cv2.detail.OpaqueKind_CV_MAT, cv2.detail.OpaqueKind_CV_POINT, cv2.detail.OpaqueKind_CV_POINT2F, cv2.detail.OpaqueKind_CV_POINT3F, cv2.detail.OpaqueKind_CV_RECT, cv2.detail.OpaqueKind_CV_SCALAR, cv2.detail.OpaqueKind_CV_SIZE, cv2.detail.OpaqueKind_CV_STRING, cv2.detail.OpaqueKind_CV_UINT64, cv2.detail.OpaqueKind_CV_UNKNOWN, cv2.detail.strip, cv2.empty_array_desc, cv2.empty_gopaque_desc, cv2.empty_scalar_desc, cv2.gapi, cv2.gapi_GNetPackage, cv2.gapi_GNetParam, cv2.gapi_ie_PyParams, cv2.gapi_onnx_PyParams, cv2.gapi_onnx_ep_CUDA, cv2.gapi_onnx_ep_CoreML, cv2.gapi_onnx_ep_DirectML, cv2.gapi_onnx_ep_OpenVINO, cv2.gapi_onnx_ep_TensorRT, cv2.gapi_ot_ObjectTrackerParams, cv2.gapi_ov_PyParams, cv2.gapi_streaming_queue_capacity, cv2.gapi_wip_GOutputs, cv2.gapi_wip_IStreamSource, cv2.gapi_wip_draw_Circle, cv2.gapi_wip_draw_Image, cv2.gapi_wip_draw_Line, cv2.gapi_wip_draw_Mosaic, cv2.gapi_wip_draw_Poly, cv2.gapi_wip_draw_Rect, cv2.gapi_wip_draw_Text, cv2.gapi_wip_gst_GStreamerPipeline, cv2.gin, cv2.groupRectangles, cv2.ml, cv2.ml_ANN_MLP, cv2.ml_Boost, cv2.ml_DTrees, cv2.ml_EM, cv2.ml_KNearest, cv2.ml_LogisticRegression, cv2.ml_NormalBayesClassifier, cv2.ml_ParamGrid, cv2.ml_RTrees, cv2.ml_SVM, cv2.ml_SVMSGD, cv2.ml_StatModel, cv2.ml_TrainData, cv2.typing.ExtractArgsCallback, cv2.typing.ExtractMetaCallback, cv2.typing.GMetaArg, cv2.typing.GOptRunArg, cv2.typing.GProtoArg, cv2.typing.GProtoInputArgs, cv2.typing.GProtoOutputArgs, cv2.typing.GRunArg, cv2.typing.GTypeInfo, cv2.typing.Prim
4.13.0.90 (2026-01-18): 2 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.getLogLevel, cv2.setLogLevel
4.10.0.82 (2024-06-03): 1 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.typing.NumPyArrayGeneric
4.8.0.74 (2023-06-30): 6 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.barcode.EAN_13, cv2.barcode.EAN_8, cv2.barcode.NONE, cv2.barcode.UPC_A, cv2.barcode.UPC_E, cv2.barcode.UPC_EAN_EXTENSION
4.7.0.68 (2022-12-30): 45 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.aruco.Board_create, cv2.aruco.CCW_CENTER, cv2.aruco.CCW_center, cv2.aruco.CW_TOP_LEFT_CORNER, cv2.aruco.CW_top_left_corner, cv2.aruco.CharucoBoard_create, cv2.aruco.DetectorParameters_create, cv2.aruco.Dictionary_create, cv2.aruco.Dictionary_create_from, cv2.aruco.Dictionary_get, cv2.aruco.EstimateParameters_create, cv2.aruco.GridBoard_create, cv2.aruco.custom_dictionary, cv2.aruco.custom_dictionary_from, cv2.aruco.drawMarker
Class members (the class is still there): cv2.TrackerKCF_Params.lambda, cv2.aruco_Board.create, cv2.aruco_Board.dictionary, cv2.aruco_Board.ids, cv2.aruco_Board.objPoints, cv2.aruco_Board.rightBottomBorder, cv2.aruco_Board.setIds, cv2.aruco_CharucoBoard.chessboardCorners, cv2.aruco_CharucoBoard.create, cv2.aruco_CharucoBoard.dictionary, cv2.aruco_CharucoBoard.draw, cv2.aruco_CharucoBoard.ids, cv2.aruco_CharucoBoard.nearestMarkerCorners, cv2.aruco_CharucoBoard.nearestMarkerIdx, cv2.aruco_CharucoBoard.objPoints, cv2.aruco_CharucoBoard.rightBottomBorder, cv2.aruco_CharucoBoard.setIds, cv2.aruco_DetectorParameters.create, cv2.aruco_Dictionary.create, cv2.aruco_Dictionary.create_from, cv2.aruco_Dictionary.drawMarker, cv2.aruco_Dictionary.get, cv2.aruco_EstimateParameters.create, cv2.aruco_GridBoard.create, cv2.aruco_GridBoard.dictionary, cv2.aruco_GridBoard.draw, cv2.aruco_GridBoard.ids, cv2.aruco_GridBoard.objPoints, cv2.aruco_GridBoard.rightBottomBorder, cv2.aruco_GridBoard.setIds
4.6.0.66 (2022-06-08): 5 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.aruco.DetectorParameters_readDetectorParameters, cv2.aruco.Dictionary_readDictionary, cv2.aruco.drawAxis, cv2.cv2, cv2.gapi_GKernelPackage
4.5.4.58 (2021-10-21): 4 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.ci_and_not_headless, cv2.ci_build, cv2.haarcascades, cv2.headless
4.5.3.56 (2021-07-11): 11 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.GMetaArg, cv2.GProtoArg, cv2.GProtoInputArgs, cv2.GProtoOutputArgs, cv2.GRunArg, cv2.compile_args, cv2.descr_of, cv2.detail_ExtractArgsCallback, cv2.detail_ExtractMetaCallback, cv2.gapi.wip.kernels, cv2.gapi.wip.op
4.5.2.52 (2021-05-07): 1 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.GArrayP2f
4.5.1.48 (2021-01-02): 195 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.CV_FEATURE_PARAMS_HAAR, cv2.CV_FEATURE_PARAMS_HOG, cv2.CV_FEATURE_PARAMS_LBP, cv2.CvFeatureParams_HAAR, cv2.CvFeatureParams_HOG, cv2.CvFeatureParams_LBP, cv2.MultiTracker, cv2.MultiTracker_create, cv2.TRACKER_SAMPLER_CSC_MODE_DETECT, cv2.TRACKER_SAMPLER_CSC_MODE_INIT_NEG, cv2.TRACKER_SAMPLER_CSC_MODE_INIT_POS, cv2.TRACKER_SAMPLER_CSC_MODE_TRACK_NEG, cv2.TRACKER_SAMPLER_CSC_MODE_TRACK_POS, cv2.TRACKER_SAMPLER_CS_MODE_CLASSIFY, cv2.TRACKER_SAMPLER_CS_MODE_NEGATIVE, cv2.TRACKER_SAMPLER_CS_MODE_POSITIVE, cv2.TrackerBoosting, cv2.TrackerBoosting_create, cv2.TrackerMOSSE, cv2.TrackerMOSSE_create, cv2.TrackerMedianFlow, cv2.TrackerMedianFlow_create, cv2.TrackerSamplerCSC_MODE_DETECT, cv2.TrackerSamplerCSC_MODE_INIT_NEG, cv2.TrackerSamplerCSC_MODE_INIT_POS, cv2.TrackerSamplerCSC_MODE_TRACK_NEG, cv2.TrackerSamplerCSC_MODE_TRACK_POS, cv2.TrackerSamplerCS_MODE_CLASSIFY, cv2.TrackerSamplerCS_MODE_NEGATIVE, cv2.TrackerSamplerCS_MODE_POSITIVE, cv2.TrackerTLD, cv2.TrackerTLD_create, cv2.dynafu.Params_coarseParams, cv2.dynafu.Params_defaultParams, cv2.dynafu_Params
Class members (the class is still there): cv2.Tracker.clear, cv2.Tracker.empty, cv2.Tracker.getDefaultName, cv2.Tracker.read, cv2.Tracker.save, cv2.Tracker.write, cv2.TrackerCSRT.clear, cv2.TrackerCSRT.empty, cv2.TrackerCSRT.getDefaultName, cv2.TrackerCSRT.read, cv2.TrackerCSRT.save, cv2.TrackerCSRT.write, cv2.TrackerGOTURN.clear, cv2.TrackerGOTURN.empty, cv2.TrackerGOTURN.getDefaultName, cv2.TrackerGOTURN.read, cv2.TrackerGOTURN.save, cv2.TrackerGOTURN.write, cv2.TrackerKCF.clear, cv2.TrackerKCF.empty, cv2.TrackerKCF.getDefaultName, cv2.TrackerKCF.read, cv2.TrackerKCF.save, cv2.TrackerKCF.write, cv2.TrackerMIL.clear, cv2.TrackerMIL.empty, cv2.TrackerMIL.getDefaultName, cv2.TrackerMIL.read, cv2.TrackerMIL.save, cv2.TrackerMIL.write, cv2.dnn_ClassificationModel.connect, cv2.dnn_ClassificationModel.dump, cv2.dnn_ClassificationModel.dumpToFile, cv2.dnn_ClassificationModel.empty, cv2.dnn_ClassificationModel.enableFusion, cv2.dnn_ClassificationModel.forward, cv2.dnn_ClassificationModel.forwardAndRetrieve, cv2.dnn_ClassificationModel.forwardAsync, cv2.dnn_ClassificationModel.getFLOPS, cv2.dnn_ClassificationModel.getLayer, cv2.dnn_ClassificationModel.getLayerId, cv2.dnn_ClassificationModel.getLayerNames, cv2.dnn_ClassificationModel.getLayerTypes, cv2.dnn_ClassificationModel.getLayersCount, cv2.dnn_ClassificationModel.getLayersShapes, cv2.dnn_ClassificationModel.getMemoryConsumption, cv2.dnn_ClassificationModel.getParam, cv2.dnn_ClassificationModel.getPerfProfile, cv2.dnn_ClassificationModel.getUnconnectedOutLayers, cv2.dnn_ClassificationModel.getUnconnectedOutLayersNames, cv2.dnn_ClassificationModel.readFromModelOptimizer, cv2.dnn_ClassificationModel.setHalideScheduler, cv2.dnn_ClassificationModel.setInput, cv2.dnn_ClassificationModel.setInputShape, cv2.dnn_ClassificationModel.setInputsNames, cv2.dnn_ClassificationModel.setParam, cv2.dnn_DetectionModel.connect, cv2.dnn_DetectionModel.dump, cv2.dnn_DetectionModel.dumpToFile, cv2.dnn_DetectionModel.empty, cv2.dnn_DetectionModel.enableFusion, cv2.dnn_DetectionModel.forward, cv2.dnn_DetectionModel.forwardAndRetrieve, cv2.dnn_DetectionModel.forwardAsync, cv2.dnn_DetectionModel.getFLOPS, cv2.dnn_DetectionModel.getLayer, cv2.dnn_DetectionModel.getLayerId, cv2.dnn_DetectionModel.getLayerNames, cv2.dnn_DetectionModel.getLayerTypes, cv2.dnn_DetectionModel.getLayersCount, cv2.dnn_DetectionModel.getLayersShapes, cv2.dnn_DetectionModel.getMemoryConsumption, cv2.dnn_DetectionModel.getParam, cv2.dnn_DetectionModel.getPerfProfile, cv2.dnn_DetectionModel.getUnconnectedOutLayers, cv2.dnn_DetectionModel.getUnconnectedOutLayersNames, cv2.dnn_DetectionModel.readFromModelOptimizer, cv2.dnn_DetectionModel.setHalideScheduler, cv2.dnn_DetectionModel.setInput, cv2.dnn_DetectionModel.setInputShape, cv2.dnn_DetectionModel.setInputsNames, cv2.dnn_DetectionModel.setParam, cv2.dnn_KeypointsModel.connect, cv2.dnn_KeypointsModel.dump, cv2.dnn_KeypointsModel.dumpToFile, cv2.dnn_KeypointsModel.empty, cv2.dnn_KeypointsModel.enableFusion, cv2.dnn_KeypointsModel.forward, cv2.dnn_KeypointsModel.forwardAndRetrieve, cv2.dnn_KeypointsModel.forwardAsync, cv2.dnn_KeypointsModel.getFLOPS, cv2.dnn_KeypointsModel.getLayer, cv2.dnn_KeypointsModel.getLayerId, cv2.dnn_KeypointsModel.getLayerNames, cv2.dnn_KeypointsModel.getLayerTypes, cv2.dnn_KeypointsModel.getLayersCount, cv2.dnn_KeypointsModel.getLayersShapes, cv2.dnn_KeypointsModel.getMemoryConsumption, cv2.dnn_KeypointsModel.getParam, cv2.dnn_KeypointsModel.getPerfProfile, cv2.dnn_KeypointsModel.getUnconnectedOutLayers, cv2.dnn_KeypointsModel.getUnconnectedOutLayersNames, cv2.dnn_KeypointsModel.readFromModelOptimizer, cv2.dnn_KeypointsModel.setHalideScheduler, cv2.dnn_KeypointsModel.setInput, cv2.dnn_KeypointsModel.setInputShape, cv2.dnn_KeypointsModel.setInputsNames, cv2.dnn_KeypointsModel.setParam, cv2.dnn_Model.connect, cv2.dnn_Model.dump, cv2.dnn_Model.dumpToFile, cv2.dnn_Model.empty, cv2.dnn_Model.enableFusion, cv2.dnn_Model.forward, cv2.dnn_Model.forwardAndRetrieve, cv2.dnn_Model.forwardAsync, cv2.dnn_Model.getFLOPS, cv2.dnn_Model.getLayer, cv2.dnn_Model.getLayerId, cv2.dnn_Model.getLayerNames, cv2.dnn_Model.getLayerTypes, cv2.dnn_Model.getLayersCount, cv2.dnn_Model.getLayersShapes, cv2.dnn_Model.getMemoryConsumption, cv2.dnn_Model.getParam, cv2.dnn_Model.getPerfProfile, cv2.dnn_Model.getUnconnectedOutLayers, cv2.dnn_Model.getUnconnectedOutLayersNames, cv2.dnn_Model.readFromModelOptimizer, cv2.dnn_Model.setHalideScheduler, cv2.dnn_Model.setInput, cv2.dnn_Model.setInputShape, cv2.dnn_Model.setInputsNames, cv2.dnn_Model.setParam, cv2.dnn_SegmentationModel.connect, cv2.dnn_SegmentationModel.dump, cv2.dnn_SegmentationModel.dumpToFile, cv2.dnn_SegmentationModel.empty, cv2.dnn_SegmentationModel.enableFusion, cv2.dnn_SegmentationModel.forward, cv2.dnn_SegmentationModel.forwardAndRetrieve, cv2.dnn_SegmentationModel.forwardAsync, cv2.dnn_SegmentationModel.getFLOPS, cv2.dnn_SegmentationModel.getLayer, cv2.dnn_SegmentationModel.getLayerId, cv2.dnn_SegmentationModel.getLayerNames, cv2.dnn_SegmentationModel.getLayerTypes, cv2.dnn_SegmentationModel.getLayersCount, cv2.dnn_SegmentationModel.getLayersShapes, cv2.dnn_SegmentationModel.getMemoryConsumption, cv2.dnn_SegmentationModel.getParam, cv2.dnn_SegmentationModel.getPerfProfile, cv2.dnn_SegmentationModel.getUnconnectedOutLayers, cv2.dnn_SegmentationModel.getUnconnectedOutLayersNames, cv2.dnn_SegmentationModel.readFromModelOptimizer, cv2.dnn_SegmentationModel.setHalideScheduler, cv2.dnn_SegmentationModel.setInput, cv2.dnn_SegmentationModel.setInputShape, cv2.dnn_SegmentationModel.setInputsNames, cv2.dnn_SegmentationModel.setParam
4.4.0.42 (2020-08-17): 2 gone from opencv-contrib-python, 0 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.rapid.filterCorrespondencies, cv2.xfeatures2d_SIFT
4.1.2.30 (the first 4.x release read; these are in 3.4.18.65) (2019-11-22): 43 gone from opencv-contrib-python, 20 more gone from opencv-python only
Gone from opencv-contrib-python (and from opencv-python, where it had them):
cv2.CAP_MODE_BGR, cv2.CAP_MODE_GRAY, cv2.CAP_MODE_RGB, cv2.CAP_MODE_YUYV, cv2.CirclesGridFinderParameters2, cv2.DualTVL1OpticalFlow, cv2.DualTVL1OpticalFlow_create, cv2.FILE_NODE_REF, cv2.FILE_NODE_USER, cv2.FileNode_REF, cv2.FileNode_USER, cv2.HAMMING_NORM_TYPE, cv2.Hamming_normType, cv2.ORB_K_BYTES, cv2.ORB_kBytes, cv2.STITCHER_ORIG_RESOL, cv2.Stitcher_ORIG_RESOL, cv2.createOptFlow_DualTVL1, cv2.createStitcher, cv2.createStitcherScans, cv2.estimateRigidTransform, cv2.findCirclesGrid2, cv2.initWideAngleProjMap, cv2.ipp.setUseIPP_NE, cv2.ipp.useIPP_NE, cv2.ml_ANN_MLP_ANNEAL, cv2.optflow.DISOPTICAL_FLOW_PRESET_FAST, cv2.optflow.DISOPTICAL_FLOW_PRESET_MEDIUM, cv2.optflow.DISOPTICAL_FLOW_PRESET_ULTRAFAST, cv2.optflow.DISOpticalFlow, cv2.optflow.DISOpticalFlow_PRESET_FAST, cv2.optflow.DISOpticalFlow_PRESET_MEDIUM, cv2.optflow.DISOpticalFlow_PRESET_ULTRAFAST, cv2.optflow.VariationalRefinement, cv2.optflow.createOptFlow_DIS, cv2.optflow.createVariationalFlowRefinement, cv2.optflow.readOpticalFlow, cv2.optflow.writeOpticalFlow, cv2.optflow_DISOpticalFlow, cv2.optflow_VariationalRefinement, cv2.xfeatures2d.FREAK_NB_ORIENPAIRS, cv2.xfeatures2d.FREAK_NB_PAIRS, cv2.xfeatures2d.FREAK_NB_SCALES
Gone from opencv-python, still in opencv-contrib-python 5.1.0.95:
cv2.AffineTransformer, cv2.ChiHistogramCostExtractor, cv2.EMDHistogramCostExtractor, cv2.EMDL1HistogramCostExtractor, cv2.HausdorffDistanceExtractor, cv2.HistogramCostExtractor, cv2.NormHistogramCostExtractor, cv2.ShapeContextDistanceExtractor, cv2.ShapeDistanceExtractor, cv2.ShapeTransformer, cv2.ThinPlateSplineShapeTransformer, cv2.createAffineTransformer, cv2.createChiHistogramCostExtractor, cv2.createEMDHistogramCostExtractor, cv2.createEMDL1HistogramCostExtractor, cv2.createHausdorffDistanceExtractor, cv2.createNormHistogramCostExtractor, cv2.createShapeContextDistanceExtractor, cv2.createThinPlateSplineShapeTransformer, cv2.videostab
Which libraries still call the names OpenCV 5 dropped?
Of 81 computer-vision and ML packages on PyPI (picked by hand), read in their newest release on 2026-11-26, 65 use cv2 in library code, and 4 of those call a name that opencv-python 5.1.0.95 does not have. Tests, docs and examples were not read. The code was read, not run, unless the row says so: a call may sit on a path you never reach.
| Package | Declares | Calls | In OpenCV 5.1.0.95 |
|---|---|---|---|
| deepface 0.0.105 2026-11-12 | opencv-contrib-python-headless>=4.5.5.64 | cv2.CascadeClassifierdeepface/models/face_detection/opencv/OpenCv.py:176 | opencv-contrib-python 5.1.0.95 has it; opencv-python does not |
cv2.dnn.readNetFromCaffedeepface/models/face_detection/opencv/Ssd.py:57, inside try/except | neither package has it in 5.1.0.95 | ||
| fer 25.10.3 2025-10-21 | opencv-contrib-python | cv2.CASCADE_SCALE_IMAGEsrc/fer/fer.py:277 | opencv-contrib-python 5.1.0.95 has it; opencv-python does not |
cv2.CascadeClassifiersrc/fer/fer.py:138 | opencv-contrib-python 5.1.0.95 has it; opencv-python does not | ||
| cvlib 0.2.7 2022-02-06 | no OpenCV requirement declared | cv2.dnn.readNetFromCaffecvlib/face_detection.py:34, 3 files | neither package has it in 5.1.0.95 |
| imutils 0.5.4 2021-01-15 | no OpenCV requirement declared | cv2.BRISK_createimutils/feature/factories.py:30 | neither package has it in 5.1.0.95 Ran: with 5.1.0.95 of either package, import imutils works and from imutils.feature import factories raises this AttributeError. |
7 of the 81 declare a requirement that keeps OpenCV 5 out (boxmot: opencv-python==4.11.0.86, fiftyone: opencv-python-headless<5, inference: opencv-python<4.13.0, lerobot: opencv-python-headless<4.14.0, norfair: opencv-python<5.0.0 (its video extra), simple-lama-inpainting: <5.0.0.0, vision-agent: opencv-python==4.*). img2table and imutils also call names that are only in opencv-contrib-python (cv2.xfeatures2d, cv2.ximgproc). Not counted: a call such as cv2.dnn.readNet("model.caffemodel", ...), whose name exists in 5.x and fails only when it runs; objects reached through another variable. Packages read: albumentations, anomalib, basicsr, boxmot, camelot-py, cellpose, controlnet-aux, cvlib, cvzone, deep-sort-realtime, deepface, depthai, diffusers, dlib, docling, easyocr, face-alignment, face-recognition, facexlib, fer, ffmpegcv, fiftyone, gfpgan, grad-cam, gradio, gymnasium, imageai, img2table, imgaug, imutils, inference, insightface, IOPaint, keras-ocr, kornia, labelme, layoutparser, lerobot, lightly, mediapipe, mmcv, mmdet, mmengine, motpy, moviepy, mtcnn, norfair, nudenet, opencv-transforms, openmim, paddleocr, pix2tex, pixellib, pupil-apriltags, PyScreeze, python-doctr, pytorch-lightning, qreader, rapidocr, rapidocr-onnxruntime, realesrgan, rembg, retina-face, roboflow, sahi, scenedetect, scikit-video, simple-lama-inpainting, stable-baselines3, streamlit-webrtc, supervision, surya-ocr, tensorflow-datasets, torchreid, transformers, ultralytics, unstructured-inference, vidgear, vision-agent, yolov5, yolox. Details: opencv_downstream.json.
How was this measured?
Every release of opencv-python-headless (37) and opencv-contrib-python-headless (44) on PyPI from 3.4.8.29 to 5.1.0.95 that is not yanked and has a wheel for Python 3.8 (cp38 or abi3) was installed in its own environment, and the names of cv2, of every submodule reachable from it, and of every class it defines were listed with dir(). The binding is a compiled extension module, so dir() lists every name it has; OpenCV raises no Python deprecation warnings, so there is no "warns" state. Python 3.8.20 and numpy 1.24.4 in every environment. 4.0.0 to 4.1.1 have wheels only up to Python 3.7 and were not installed, so a name that the 3.4 line has and 4.1.2.30 does not is reported as "not in 4.1.2.30", not as removed in a particular 4.0 or 4.1 release.
The headless packages are the same build without a GUI backend. Compared at 5.1.0.95 (both packages) and 4.6.0.66 (contrib), opencv-python and opencv-contrib-python have the same names plus cv2.qt. "OpenCV's own text" is the @deprecated line of the function's docstring in the last release that has it. import cv2.<name> was tried for each file in the package folder, each in its own process. For the library table, the newest sdist (or wheel) of each package was unpacked and its .py files parsed: a use is an attribute chain that starts at a name bound to cv2, or a from cv2 import.
Questions
How do I fix "module 'cv2' has no attribute 'CascadeClassifier'"?
opencv-python 5.0.0.93 (2026-07-02) is the first release without cv2.CascadeClassifier; 4.14.0.94 is the last with it. opencv-contrib-python 5 still has it, and in 5.1.0.95 only the contrib package ships haarcascade_frontalface_default.xml in cv2.data. Either pip uninstall opencv-python and pip install opencv-contrib-python, or pip install "opencv-python<5". The same holds for cv2.HOGDescriptor, cv2.ml (SVM, KNearest) and cv2.gapi.
How do I fix "module 'cv2.dnn' has no attribute 'readNetFromCaffe'" (or readNetFromDarknet, readNetFromTensorflow)?
OpenCV 5.0.0.93 removed readNetFromCaffe, readNetFromDarknet and readNetFromTorch; 5.1.0.95 (2026-11-17) removed readNetFromTensorflow. In 5.1.0, cv2.dnn.readNet on a .caffemodel raises "Caffe importer has been removed" and asks for an ONNX-converted model or an older OpenCV. readNetFromONNX, readNetFromTFLite and readNet are still there. To keep the old readers: pip install "opencv-python<5".
How do I fix "module 'cv2' has no attribute 'xfeatures2d'" (or 'face', 'ximgproc', 'legacy', 'bgsegm')?
These modules have only ever been in opencv-contrib-python, in every release read (3.4.8.29 to 5.1.0.95). Uninstall opencv-python (and opencv-python-headless) and install opencv-contrib-python: one OpenCV package per environment. SIFT needs no contrib: cv2.SIFT_create is in opencv-python from 4.4.0.46. cv2.xfeatures2d.SURF_create exists in the contrib wheels but raises "This algorithm is patented and is excluded in this configuration" (tried in 4.14.0 and 5.1.0).
How do I fix "module 'cv2.aruco' has no attribute 'Dictionary_get'" (or 'DetectorParameters_create')?
opencv-contrib-python 4.7.0.68 (2022-12-30) removed them; 4.6.0.66 is the last with them. Use cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_50), cv2.aruco.DetectorParameters(), and cv2.aruco.ArucoDetector(dictionary, parameters).detectMarkers(image). drawMarker became generateImageMarker, CharucoBoard_create became CharucoBoard((squaresX, squaresY), squareLength, markerLength, dictionary). opencv-python has cv2.aruco only from 4.7.0.72. OpenCV 5.0 then removed the cv2.aruco.detectMarkers function and estimatePoseSingleMarkers (OpenCV's text: "Use cv::solvePnP").
How do I fix "module 'cv2' has no attribute 'TrackerMOSSE_create'" (or 'MultiTracker_create')?
opencv-contrib-python 4.5.1.48 (2021-01-02) moved the MOSSE, Boosting, MedianFlow and TLD trackers and MultiTracker to cv2.legacy: cv2.legacy.TrackerMOSSE_create(), cv2.legacy.MultiTracker_create(). They were never in opencv-python. TrackerKCF_create and TrackerCSRT_create are at the top level of the contrib package in every release; TrackerMIL_create is in opencv-python from 4.5.1.48.
What does "ImportError: Bindings generation error. Submodule name should always start with a parent module name. Parent name: cv2.cv2" mean?
import cv2.cv2 (an old trick for editor completion) works up to 4.5.5.64 and raises this error in every release from 4.6.0.66. In the 3.4 line it works up to 3.4.17.63; 3.4.18.65 raises "No module named 'cv2.cv2'; 'cv2' is not a package". Write import cv2.
How do I fix "module 'cv2.gapi.wip.draw' has no attribute 'Text'" or "module 'cv2.dnn' has no attribute 'DictValue'"?
Both names are read by cv2/typing/__init__.py, which the packages ship from 4.8.0.76. Every clean install here imported without error. The first error appeared in each of four tries where a newer opencv-python-headless (4.8.0.76, 4.8.1.78, 4.9.0.80) and then an older opencv-contrib-python-headless (4.5.4.58 to 4.5.5.64) were installed into one environment: the newer package's cv2/typing folder stays behind and the older one loads it. The second error did not appear in those tries; it comes from the same file. pip uninstall all four packages (opencv-python, opencv-contrib-python and the two -headless ones), then install exactly one.
Sources
- The opencv-python-headless and opencv-contrib-python-headless wheels on PyPI, installed and run; the release dates are PyPI's.
- The docstrings and error messages of those builds (OpenCV's own text).
The same data as JSON: opencv_names.json, licensed CC BY 4.0.
Related: "module 'numpy' has no attribute 'float_'" · "module 'PIL.Image' has no attribute 'ANTIALIAS'" · "module 'matplotlib.cm' has no attribute 'get_cmap'".