object-detection

How to extract text region from an image after detecting

天大地大妈咪最大 提交于 2021-02-07 09:24:49
问题 I am trying to extract all text regions from an image using opencv python. I have successfully detected the text regions but could not extract it. I extracted the smaller sub-matrices of a text region but I cannot aggregrate them into a bigger matrix that we see as the text region in the image. import numpy as np import cv2 from imutils.object_detection import non_max_suppression import matplotlib.pyplot as plt %matplotlib inline from PIL import Image # pip install imutils image1 = cv2.imread

How to add additional classes to a pre-trained object detection model and train it to detect all of the classes (pre-trained + new)?

一世执手 提交于 2021-02-07 00:59:45
问题 I had followed this blog --> https://medium.com/@teyou21/training-your-object-detection-model-on-tensorflow-part-2-e9e12714bdf , and built a SSD Mobilenet model which is pre-trained on the COCO Dataset called "ssd_mobilenet_v2_quantized_coco". What happens here is that it perfectly detects my new classes, but I want to include the pre-trained classes as well. I tried changing the number of classes to 96 ( 90 pre-trained + 6 new ) and edited the "labelmap.pbtxt" with the name and corresponding

How to add additional classes to a pre-trained object detection model and train it to detect all of the classes (pre-trained + new)?

白昼怎懂夜的黑 提交于 2021-02-07 00:58:35
问题 I had followed this blog --> https://medium.com/@teyou21/training-your-object-detection-model-on-tensorflow-part-2-e9e12714bdf , and built a SSD Mobilenet model which is pre-trained on the COCO Dataset called "ssd_mobilenet_v2_quantized_coco". What happens here is that it perfectly detects my new classes, but I want to include the pre-trained classes as well. I tried changing the number of classes to 96 ( 90 pre-trained + 6 new ) and edited the "labelmap.pbtxt" with the name and corresponding

Best strategy to reduce false positives: Google's new Object Detection API on Satellite Imagery

孤街浪徒 提交于 2021-02-05 13:43:18
问题 I'm setting up the new Tensorflow Object Detection API to find small objects in large areas of satellite imagery. It works quite well - it finds all 10 objects I want, but I also get 50-100 false positives [things that look a little like the target object, but aren't]. I'm using the sample config from the 'pets' tutorial, to fine-tune the faster_rcnn_resnet101_coco model they offer. I've started small, with only 100 training examples of my objects (just 1 class). 50 examples in my validation

Best strategy to reduce false positives: Google's new Object Detection API on Satellite Imagery

做~自己de王妃 提交于 2021-02-05 13:42:27
问题 I'm setting up the new Tensorflow Object Detection API to find small objects in large areas of satellite imagery. It works quite well - it finds all 10 objects I want, but I also get 50-100 false positives [things that look a little like the target object, but aren't]. I'm using the sample config from the 'pets' tutorial, to fine-tune the faster_rcnn_resnet101_coco model they offer. I've started small, with only 100 training examples of my objects (just 1 class). 50 examples in my validation

how to train model with batches

喜你入骨 提交于 2021-01-29 16:19:59
问题 I trying yolo model in python. To process the data and annotation I'm taking the data in batches. batchsize = 50 #boxList= [] #boxArr = np.empty(shape = (0,26,5)) for i in range(0, len(box_list), batchsize): boxList = box_list[i:i+batchsize] imagesList = image_list[i:i+batchsize] #to convert the annotation from VOC format convertedBox = np.array([np.array(get_boxes_for_id(box_l)) for box_l in boxList]) #pre-process on image and annotaion image_data, boxes = process_input_data(imagesList,max

tensoflow-trained ssd model not working after converting to tensorflow-lite for raspi

梦想的初衷 提交于 2021-01-29 09:22:43
问题 System information Laptop: Linux Ubuntu Tensorflow 1.15.0 Raspi: Raspberry Pi 4 tflite-runtime 2.5.0 tensorflow-estimator 1.14.0 Coral Edge TPU Hello everybody, I am stuck at getting my trained model running on raspi. I trained ssd_mobilenet_v2_coco model from tensorflow 1 modelzoo with my own custom dataset on google cloud with this config file where I did few changes: model { ssd { num_classes: 3 image_resizer { fixed_shape_resizer { height: 720 width: 1280 } } feature_extractor { type:

try to implement cv2.findContours for person detection

假装没事ソ 提交于 2021-01-29 07:32:49
问题 I'm new to opencv and I'm trying to detect person through cv2.findContours with morphological transformation of the video. Here is the code snippet.. import numpy as np import imutils import cv2 as cv import time cap = cv.VideoCapture(0) while(cap.isOpened()): ret, frame = cap.read() #frame = imutils.resize(frame, width=700,height=100) gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) gray = cv.GaussianBlur(gray, (21, 21), 0) cv.accumulateWeighted(gray, avg, 0.5) mask2 = cv.absdiff(gray, cv

IndexError: child index out of range

喜欢而已 提交于 2021-01-29 04:03:10
问题 I am trying to train a model for the tensorFlow object detection api. And when I try to convert the xml to csv I get the following error. I have 6300 train data and 700 test data. Can someone please point me out why Im getting this error? Thank you //Tensorflow object detection Error Traceback (most recent call last): File "xml_to_csv.py", line 35, in <module> main() File "xml_to_csv.py", line 31, in main xml_df = xml_to_csv(image_path) File "xml_to_csv.py", line 17, in xml_to_csv int(member

Tensorflow object detection API tutorial error

安稳与你 提交于 2021-01-28 11:48:49
问题 After struggling with compatibility issues between Tensorflow 2.00 and the object detection API, I downgraded to Tensorflow 1.15 to be able to train my own model. after completing the training I modified the jupyter notebook included in the Tensorflow object detection API repo to test on my own images but I keep getting this error: Traceback (most recent call last): File "object_detection_tutorial_converted.py", line 254, in <module> show_inference(detection_model, image_path) File "object