Ask Your Question

krishnapra's profile - activity

2020-03-23 08:34:04 -0600 received badge  Popular Question (source)
2018-04-18 07:42:48 -0600 commented answer Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

@hoangtinh you are able to solve this issue ?

2018-03-15 04:02:56 -0600 received badge  Student (source)
2018-03-03 03:25:52 -0600 marked best answer How to find edge pixel coordinates at corners of the bounding box

I am using dnn module of opencv for object detection in tensorflow. I want to know how to find pixel coordinates (x,y) at corners of bounding box of detected object as highlighted in blue on image below.

image description

I use below snippet for drawing bounding boxes, which is from opencv dnn samples

    cols = frame.shape[1]
    rows = frame.shape[0]

    for i in range(detections.shape[2]):
        confidence = detections[0, 0, i, 2]
        if confidence > args.thr:
            class_id = int(detections[0, 0, i, 1])

            xLeftBottom = int(detections[0, 0, i, 3] * cols)
            yLeftBottom = int(detections[0, 0, i, 4] * rows)
            xRightTop   = int(detections[0, 0, i, 5] * cols)
            yRightTop   = int(detections[0, 0, i, 6] * rows)

            cv.rectangle(frame, (xLeftBottom, yLeftBottom), (xRightTop, yRightTop),
                          (0, 255, 0))
            if class_id in classNames:
                label = classNames[class_id] + ": " + str(confidence)
                labelSize, baseLine = cv.getTextSize(label, cv.FONT_HERSHEY_SIMPLEX, 0.5, 1)

                yLeftBottom = max(yLeftBottom, labelSize[1])
                cv.rectangle(frame, (xLeftBottom, yLeftBottom - labelSize[1]),
                                     (xLeftBottom + labelSize[0], yLeftBottom + baseLine),
                                     (255, 255, 255), cv.FILLED)
                cv.putText(frame, label, (xLeftBottom, yLeftBottom),
                            cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 0))

    cv.imshow("detections", frame)
    if cv.waitKey(1) >= 0:
        break
2018-03-03 03:25:52 -0600 received badge  Scholar (source)
2018-03-01 21:36:58 -0600 commented answer How to find edge pixel coordinates at corners of the bounding box

@Tetragramm Yes i was printing xLeftBottom, yLeftBottom, xRightTop, yRightTop but not able to interpret properly. Now go

2018-03-01 21:36:35 -0600 commented answer How to find edge pixel coordinates at corners of the bounding box

Yes i was printing xLeftBottom, yLeftBottom, xRightTop, yRightTop but not able to interpret properly. Now got clear info

2018-03-01 20:10:29 -0600 edited question How to find edge pixel coordinates at corners of the bounding box

How to find edge pixel coordinates at corners of the bounding box I am using dnn module of opencv for object detection i

2018-03-01 20:09:00 -0600 asked a question How to find edge pixel coordinates at corners of the bounding box

How to find edge pixel coordinates at corners of the bounding box I am using dnn module of opencv for object detection i

2018-02-28 01:03:39 -0600 received badge  Enthusiast
2018-02-26 07:25:12 -0600 commented question Error running inference on Single Shot Scale-invariant Face Detector pre trained model

@fabito @dkurt i have same error, may i know how assertion can be removed in this issue?

2018-02-26 07:24:11 -0600 commented question Error running inference on Single Shot Scale-invariant Face Detector pre trained model

@fabito @dkurt i have same error, may i know how assertion can be removed ?

2018-02-25 14:55:49 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Getting error when trying to convert to RGB. "TypeError: only size-1 arrays can be converted to python scalars"

2018-02-25 14:10:38 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

I have tried with both caffe and tensorflow models, they work fine on webcamera, this issue i face only while trying to

2018-02-25 14:09:32 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

I have tried with both caffe and tensorflow models, they work fine on webcamera, this issue i face only while trying to

2018-02-25 14:02:25 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

@berak I have added this snippet to my code cols=frame.shape[1] rows=frame.shape[0] print(cols) print(rows) print(frame.

2018-02-25 14:02:11 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

I have added this snippet to my code cols=frame.shape[1] rows=frame.shape[0] print(cols) print(rows) print(frame.shape)

2018-02-25 13:41:33 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

@berak ZED stereo camera has libraries, here zed.retrieve_image(image, sl.PyVIEW.PyVIEW_LEFT) i am retreiving left view

2018-02-25 13:41:08 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

@berak ZED stereo camera has libraries, here zed.retrieve_image(image, sl.PyVIEW.PyVIEW_LEFT) i am retreiving left view

2018-02-25 13:19:15 -0600 edited question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera I get below error w

2018-02-25 13:18:39 -0600 edited question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera I get below error w

2018-02-25 13:17:13 -0600 edited question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera I get below error w

2018-02-25 13:12:08 -0600 commented question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

@berak i have added code

2018-02-25 13:11:55 -0600 edited question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera I get below error w

2018-02-25 12:00:21 -0600 edited question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera I get below error w

2018-02-25 11:57:58 -0600 asked a question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera I get below error w

2018-02-25 11:57:56 -0600 asked a question Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera

Assertion failure at object detection while using tensorflow/caffe model in OpenCV with Stereocamera I get below error w

2018-02-25 10:57:00 -0600 commented question Objects detected as multiple dots while using custom tensorflow model in OpenCV dnn

@dkurt I couldn't get desired result when used text graph generated from tf_text_graph_ssd.py. Result was having no boun

2018-02-24 10:19:40 -0600 edited question Objects detected as multiple dots while using custom tensorflow model in OpenCV dnn

Tensorflow Custom Model in OpenCV issues while trying to implementing the solution for mutiplebox anchors I am using Ubu

2018-02-24 10:17:45 -0600 edited question Objects detected as multiple dots while using custom tensorflow model in OpenCV dnn

Tensorflow Custom Model in OpenCV issues while trying to implementing the solution for mutiplebox anchors I am using Ubu

2018-02-24 10:12:26 -0600 received badge  Editor (source)
2018-02-24 10:12:26 -0600 edited question Objects detected as multiple dots while using custom tensorflow model in OpenCV dnn

Tensorflow Custom Model in OpenCV issues while trying to implementing the solution for mutiplebox anchors I am using Ubu

2018-02-24 01:30:15 -0600 asked a question Objects detected as multiple dots while using custom tensorflow model in OpenCV dnn

Tensorflow Custom Model in OpenCV issues while trying to implementing the solution for mutiplebox anchors I use Opencv 3