OpenCV(3.4.1) Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file. ) in CvCascadeImageReader::PosReader::get, file
Solution: reduce the number of positive samples
opencv_traincascade.exe -data data_2 -vec positives.vec -bg bg.txt -numPos 350 -numNeg 1963 -mem 8192 -numStages 20 -w 20 -h 20
Here, you can reduce the numpos value
OpenCV(3.4.1) Error: Insufficient memory (Failed to allocate 782736980 bytes) in cv::OutOfMemoryError, file C:\application\opencv\opencv\sources\modules\core\src\alloc.cpp, line 55
Solution: increase memory
Here, increase the value of -mem and decrease the value of numPos
Summary: these two errors mainly lie in that the value of the number of positive samples for each level of training is too large. Numpos must be less than the total number of positive samples. Modifying MEM value only improves the running speed
Read More:
- [Solved] Error during composer operation in docker: insufficient memory
- [Solved] Tensorflow error or keras error and tf.keras error: oom video memory is insufficient
- OpenCV(-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type [How to Solve]
- [Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…
- Node Memory Overflow: FATAL ERROR: Reached heap limit Allocation failed – JavaScript heap out of memory
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- [Solved] Opencv Calls PB Model Error: cv2.error: OpenCV(4.2.0)…
- Opencv Can not Find opencv2/gpu/gpu.hpp [How to Solve]
- [Solved] OpenCV error: #error “This header with legacy C API declarations has been removed from OpenCV.
- Tensorflow error: attributeerror: module ‘tensorflow_ API. V1. Train ‘has no attribute’ summarywriter ‘
- TensorFlow error: AttributeError: module ‘tensorflow_core._api.v2.train’ has no attribute ‘Optimizer‘
- ITDs problem – LDAP: error code 50 – insufficient access rights
- [Solved] Docker Error: bad interpreter: Permission denied
- [Solved] ORB_SLAM3 Compile Error: opencv4.0 not found four
- PHP Parse error: syntax error, unexpected ‘class‘ (T_CLASS), expecting identifier (T_STRING)
- [Solved] Nacos Cluster startup error: error=‘Cannot allocate memory‘ (errno=12)
- [Solved] RuntimeError: CUDA error: out of memory
- [Solved] A needed class was not found. This could be due to an error in your runpath. Missing class: scala/co
- [Solved] Opencv error: assertion__acrt_first_block == header
- PyCharm Error: RuntimeError: CUDA out of memory [How to Solve]