object-detection

How to find bounding boxes coordinates in Tensorflow Object Detection API

假如想象 提交于 2020-06-17 00:51:06
问题 I'm using Tensorflow object detection API code. I trained my model and got great detection percentages. I have been trying to get the bounding boxes coordinates but it keeps on printing out a list of 100 bizarre arrays. after a wide search online I found out what the numbers in the arrays meant (The bounding box coordinates are floats in [0.0, 1.0] relative to the width and height of the underlying image.) But still, my arrays are very different than the ones shown in examples online. Another

Cannot convert between a TensorFlowLite buffer with 307200 bytes and a Java Buffer with 270000 bytes

旧城冷巷雨未停 提交于 2020-06-16 19:19:07
问题 I am trying to run a pre-trained Object Detection TensorFlowLite model from Tensorflow detection model zoo. I used the ssd_mobilenet_v3_small_coco model from this site under the Mobile Models heading. According to the instructions under Running our model on Android , I commented out the model download script to avoid the assets being overwritten: // apply from:'download_model.gradle' in build.gradle file and replaced the detect.tflite and labelmap.txt file in assets directory. Build was

How to send OpenCV output to browser with python?

房东的猫 提交于 2020-05-26 08:06:50
问题 I have a simple python script with open cv, which takes in a video and does object detection on it using YOLO. My question is, how can I display the output to my website as a live stream. Here is the python code, saving to output.avi. import cv2 from darkflow.net.build import TFNet import numpy as np import time import pafy options = { 'model': 'cfg/tiny-yolo.cfg', 'load': 'bin/yolov2-tiny.weights', 'threshold': 0.2, 'gpu': 0.75 } tfnet = TFNet(options) colors = [tuple(255 * np.random.rand(3)

How to send OpenCV output to browser with python?

这一生的挚爱 提交于 2020-05-26 08:03:36
问题 I have a simple python script with open cv, which takes in a video and does object detection on it using YOLO. My question is, how can I display the output to my website as a live stream. Here is the python code, saving to output.avi. import cv2 from darkflow.net.build import TFNet import numpy as np import time import pafy options = { 'model': 'cfg/tiny-yolo.cfg', 'load': 'bin/yolov2-tiny.weights', 'threshold': 0.2, 'gpu': 0.75 } tfnet = TFNet(options) colors = [tuple(255 * np.random.rand(3)

How to combine a fully convolutional neural network with a SSD Mobilenet model?

旧城冷巷雨未停 提交于 2020-05-17 06:25:08
问题 I want to perform instance segmentation using SSD model. For this, I have used an FCN model to perform instance segmentation and now can I combine this with SSD model to get something like Mask SSD ? It should look something like this or something like this 来源: https://stackoverflow.com/questions/61734815/how-to-combine-a-fully-convolutional-neural-network-with-a-ssd-mobilenet-model

Image Processing: What are occlusions?

岁酱吖の 提交于 2020-05-09 17:37:05
问题 I'm developing an image processing project and I come across the word occlusion in many scientific papers, what do occlusions mean in the context of image processing? The dictionary is only giving a general definition. Can anyone describe them using an image as a context? 回答1: Occlusion means that there is something you want to see, but can't due to some property of your sensor setup, or some event. Exactly how it manifests itself or how you deal with the problem will vary due to the problem

How to detect object position in image in Tensorflow

和自甴很熟 提交于 2020-04-30 09:28:01
问题 I'm a newbie in Tensorflow, and looking to the sample object detection codes. One of these is that I just don't know how can I get the exact coordinates(position) of detected array in image for this sample codes. Thanks 回答1: # Run the model out = sess.run([sess.graph.get_tensor_by_name('num_detections:0'), sess.graph.get_tensor_by_name('detection_scores:0'), sess.graph.get_tensor_by_name('detection_boxes:0'), sess.graph.get_tensor_by_name('detection_classes:0')], feed_dict={'image_tensor:0':

How to detect object position in image in Tensorflow

旧街凉风 提交于 2020-04-30 09:26:07
问题 I'm a newbie in Tensorflow, and looking to the sample object detection codes. One of these is that I just don't know how can I get the exact coordinates(position) of detected array in image for this sample codes. Thanks 回答1: # Run the model out = sess.run([sess.graph.get_tensor_by_name('num_detections:0'), sess.graph.get_tensor_by_name('detection_scores:0'), sess.graph.get_tensor_by_name('detection_boxes:0'), sess.graph.get_tensor_by_name('detection_classes:0')], feed_dict={'image_tensor:0':

Facing the below error when trying to run Tensorflow Object Detection api

社会主义新天地 提交于 2020-04-12 07:25:52
问题 Facing the below error when trying to run Tensorflow Object Detection api TypeError Traceback (most recent call last) <ipython-input-10-333ebdc7ae83> in <module> 1 model_name = 'ssd_mobilenet_v1_coco_2017_11_17' ----> 2 detection_model = load_model(model_name) <ipython-input-4-f8a3c92a04a4> in load_model(model_name) 9 model_dir = pathlib.Path(model_dir)/"saved_model" 10 ---> 11 model = tf.saved_model.load(str(model_dir)) 12 model = model.signatures['serving_default'] 13 ~\Anaconda3\lib\site

Python - Detect a QR code from an image and crop using OpenCV

二次信任 提交于 2020-04-05 05:15:33
问题 I'm working on a project using Python(3.7) and OpenCV in which I have an Image(captured using the camera) of a document with a QR code placed on it. This QR code has 6 variables respectively as: Size of QR code image Top Right Bottom Left Unit Latest Update: Here are the steps I need to perform in the same order: Detect the qr code & decode it to read size values So, if the size of QR-code(image) is not equal to the size which is mentioned inside it then scale the image to equal both size