The task is to detect big circles and small black circles if big circles have small black circles like below picture (a left picture is an original picture and a right one is the detectec one).
I am trying to detect these circles using object detection based on deep learning.
To do this, my idea is to detect two circle at the same time using one object detection.
one methodology : by using just one object detector, big circles and small circles are detected.
Other one : first big circles are detected by using one object detector and then small circles are detected by using other detector. In other words, this is to use two object detection.
I am wondering about what is kinds of latter object detection methodology, which is to detect step by step?
Intuitively, I could call hierarchical object detection.
Please let me know what is this kinds of methodology. Thank you.
Related
I am currently looking for the best way to complete a project of mine. This entails a network trained to detect a particular boundary in an image. I have attached an example image below that shows such a boundary (the tree ring). In this case, of course, an edge detector would find many other edges in the image in addition to the one I want. The end goal is to detect the boundary and essentially draw an approximate line at the ring.
I am some experience with PyTorch and have implemented some simple object detection networks, but in my search for a project similar to this, all I have found is doing edge detection through deep learning, but this will detect all edges. I have thought of maybe doing the detection in steps, starting with edge detection and training a CNN on the straight edges, but that does not seem like it will be accurate.
I also thought of trying to train a CNN on images that are centered on a point on the boundary. Thus, every good result from the CNN should be essentially a point on a line, I can then just run some simple linear regression on it to draw. However, I am not sure if any of these ideas will work out. Of course, I can try them out but was hoping for some insight from the experienced.
Example image of tree core. Focus on dark blue marks, they mark the ring. Ignore the lines connecting the marks, and the light blue/white marks.
I need to track cars on the road from top-view video.
My application contain two main parts:
Detecting cars on the frame (Tensorflow trained network)
Tracking detected cars (opencv trackers)
I have troubles with opencv trackers. Initially i tried to different trackers, but only MOSSE is fast enough. This tracker works almost perfect for case with straight road, but i faced problems with rotating cars. This situation appears on crossroads.
As i understood, bounding box of rotated object is bigger that bbox of horizontal or vertical object. As result bbox contains big part of static background and the tracker lose target object.
Are there any alternative trackers which can track contours (not bounding boxes)?
Can i adjust quality of existing opencv trackers results by any settings or by adjusting picture?
Schema:
Real image:
If your camera is stationary the following scenario is feasible:
use ‌background subtraction methods to separate background image from foreground blobs.
Improve the foreground results using morphological operations.
Detect car blobs and remove other blobs.
Track foreground blobs in video i.e. binary track (simply use this or even apply KF).
A very basic but effective approach in this scenario might be to track the center coordinates of the bounding box, if the center coordinates only change along one axis (with a small tolerance for either axis), its a linear motion (not a rotation). If both x and y change, the car is moving in the roundabout.
This only has the weakness that it will detect diagonal motion, but since you are looking at a centered roundabout, that shouldn't be an issue.
It will also be very efficient memory-wise.
You should use PCA method, which can calculate the orientation of an detected object and which way it is facing. You can change the threshold of detection to select objects more like the cars (based upon shape and colour - a HSV conversion which in your case is red) in your picture.
Link to an introduction to Principal Component Analysis (PCA)
Method 1 :
- Detect bounding boxes and subtract the background to get blobs rotated rectangles.
Method 2 :
- implement your own version of detector with rotated boxes.
Method 3 :
- Use segmentation instead ... Unet for example.
There are no other trackers than the ones found in the library.
Your best bet is to filter the image and use findcontours.
Optical flow and background subtraction will help with this. You can combine optical flow with your car detector to rule out false positives.
https://docs.opencv.org/3.4/d4/dee/tutorial_optical_flow.html
https://docs.opencv.org/3.4/d1/dc5/tutorial_background_subtraction.html
Context:
I have the RGB-D video from a Kinect, which is aimed straight down at a table. There is a library of around 12 objects I need to identify, alone or several at a time. I have been working with SURF extraction and detection from the RGB image, preprocessing by downscaling to 320x240, grayscale, stretching the contrast and balancing the histogram before applying SURF. I built a lasso tool to choose among detected keypoints in a still of the video image. Then those keypoints are used to build object descriptors which are used to identify objects in the live video feed.
Problem:
SURF examples show successful identification of objects with a decent amount of text-like feature detail eg. logos and patterns. The objects I need to identify are relatively plain but have distinctive geometry. The SURF features found in my stills are sometimes consistent but mostly unimportant surface features. For instance, say I have a wooden cube. SURF detects a few bits of grain on one face, then fails on other faces. I need to detect (something like) that there are four corners at equal distances and right angles. None of my objects has much of a pattern but all have distinctive symmetric geometry and color. Think cellphone, lollipop, knife, bowling pin. My thought was that I could build object descriptors for each significantly different-looking orientation of the object, eg. two descriptors for a bowling pin: one standing up and one laying down. For a cellphone, one laying on the front and one on the back. My recognizer needs rotational invariance and some degree of scale invariance in case objects are stacked. Ability to deal with some occlusion is preferable (SURF behaves well enough) but not the most important characteristic. Skew invariance would be preferable and SURF does well with paper printouts of my objects held by hand at a skew.
Questions:
Am I using the wrong SURF parameters to find features at the wrong scale? Is there a better algorithm for this kind of object identification? Is there something as readily usable as SURF that uses the depth data from the Kinect along with or instead of the RGB data?
I was doing something similar for a project, and ended up using a super simple method for object recognition, which was using OpenCV blob detection, and recognizing objects based on their areas. Obviously, there needs to be enough variance for this method to work.
You can see my results here: http://portfolio.jackkalish.com/Secondhand-Stories
I know there are other methods out there, one possible solution for you could be approxPolyDP, which is described here:
How to detect simple geometric shapes using OpenCV
Would love to hear about your progress on this!
I had been using LK algorithm in detecting corners and interested point for tracking.
However, I am stucked at this point where I need to have something like a rectangle box to follow the tracked object. All I have now was just a lot of points showing my moving objects.
Is there any methods or suggestions for that? Also, any idea on adding counter into the window so that my object moving in and out the screen can be counted as well?
Thank you
There are lots of options! Within OpenCV, I'd suggest using CamShift as a starting point, since it is a relatively easy to use. CamShift uses mean shift to iteratively search for an object in consecutive frames.
Note that you need to seed the tracker with some kind of input. You could have the user draw a rectangle around the object, or use a detector to get the initial input. If you want to track faces, for example, OpenCV has a cascade classifier and training data for a face detector included.
i want detect the important ROI Element in a picture. (i want to get the position)
I've tested a reverted SeamCarving-Method. I hoped, that the most importand Area in a picture have the most energylevel. I've generated one vertical and one horizontal Seam and took the intersection. But this method don't seem to be perfect.
Some examples:
good detection:
good detection http://img713.imageshack.us/img713/2928/seamcastle.jpg
good detection http://img39.imageshack.us/img39/9584/seamente.jpg
good detection http://img193.imageshack.us/img193/2693/seamwuffi.jpg
near aceptable;
good detection http://img440.imageshack.us/img440/7459/seamflower.jpg
worse detection:
good detection http://img836.imageshack.us/img836/5766/seamsun.jpg (maybe the point is a good result. It's the point with the max. energylevel in this picture)
good detection http://img507.imageshack.us/img507/2750/seambluesky1.jpg
Have anyone a idea to detect roi's more better?
greeting,
desire
I think the key terms you are looking for is: Saliency Detection, Salient Object Detection, etc
Perhaps these papers will point you in the right direction:
A Model of Saliency-Based Visual Attention for Rapid Scene Analysis (PDF)
Simulating Human Saccadic Scanpaths on Natural Images (PDF)
Salient Object Detection by Composition (PDF)
Saliency Filters: Contrast Based Filtering for Salient Region Detection (Web)