Category "computer-vision"

Python save numpy array set_printoptions

I have an image which I've read in with cv2 and python. - I think I'm going to 'store' the image as a nparray in my db for later processing, easy retrieval etc.

How to convert cv2.rectangle bounding box to YoloV4 annotation format (relative x,y,w,h)?

I have trained a Yolo4 network and it is giving me bounding boxes as: img_array = cv2.cvtColor(cv2.imread('image.png'), cv2.COLOR_BGR2RGB) classes, scores, bbox

SLIC Superpixel number of superpixels is smaller than the requested

When using the SLIC Superpixel segmentation, sometimes the resulting number of Superpixels is smaller than the requested, is this because of enforced connectivi

Understanding contour hierarchies: How to distinguish filled circle/contour and unfilled circle/contour in OpenCV?

I am unable to differentiate between the below two contours. cv2.contourArea() is giving the same value for both. Is there any function to distinguish them in P

How to recalculate the coordinates of a point after scaling and rotation?

I have the coordinates of 6 points in an image (170.01954650878906, 216.98866271972656) (201.3812255859375, 109.42137145996094) (115.70114135742188, 210.427291

Estimating distance from camera to ground plane point

How can I calculate distance from camera to a point on a ground plane from an image? I have the intrinsic parameters of the camera and the position (height, p

How to detect corners of a square with Python OpenCV?

In the image below, I am using OpenCV harris corner detector to detect only the corners for the squares (and the smaller squares within the outer squares). Howe

Errors/Empty video after using write() from cv2.VideoWriter

I am performing template matching and everything seems to be working fine in cv2.imshow(). I want to write a video with all frames resulting from the template m

Darknet stopping after calculating mAP

I'm currently facing a weird issue. I have recently trained a couple of different yolov4 models using the following command: darknet.exe detector train datapath

Get the polygon coordinates of predicted output mask in YOLACT/YOLACT++

I am using Yolact https://github.com/dbolya/yolact ,an instance segmentation algorithm which outputs the test image with a mask on the detected object. As the i

On Premise MLOps Pipeline Stack

My motive is to build a MLOps pipeline which is 100% independnt from Cloud service like AWS, GCP and Azure. I have a project for a client in a production factor

Region Of Intrest

Break masks/ ROIs down into smaller sub-ROIs. Set random seeds. Navigate from seed to ROI in direction of highest absolute gradient.any suggestion would help me

Extract misclassified images using CNN keras

I am having difficulties extracting misclassified images, I tried to use the following line of code: inc= np.nonzero(model.predict_classes(test_data).reshape(-

how to modify resnet 50 with 4 channels as input using pre-trained weights in Pytorch?

I would like to change the resnet50 so that I can switch to 4 channel input, use the same weights for the rgb channels and initialize the last channel with a no

Number of distinct clusters in KMeans is less than n_clusters?

I have some food images stored in a single folder. All the images are unlabeled, nor are they stored into separate folder such as "pasta" or "meat". My current

Estimate 3D Line from Image projections with known Camera Pose and Calibration

I know the principle of triangulation for 3D Point estimation from images. However, how would you solve the following problem, I have images from a Line in 3D s

Ms Computer Vision API image url replace as local .jpg using Python

I am trying to write a python program on Pi to capture an image and get the description from Ms Computer Vision API. It is working with using image_url as "http

Image to ECEF Transformation Matrix from Roll,Yaw,Pitch and GPS+Altitude

I am trying to estimate initial camera pose with respect to ECEF system using EXIF metadata. I have the a DJI Drone's gimbal Roll, Pitch and Yaw readings along

Use pytesseract OCR to recognize text from an image

I need to use Pytesseract to extract text from this picture: and the code: from PIL import Image, ImageEnhance, ImageFilter import pytesseract path = 'pic.gif'

Correct Implementation of Dice Loss in Tensorflow / Keras

I've been trying to experiment with Region Based: Dice Loss but there have been a lot of variations on the internet to a varying degree that I could not find tw