13

I have a large dataset (over 100k samples) of vehicles with the ground truth of their lengths.

Is it possible to train a deep network to measure/estimate vehicle length?

I haven't seen any papers related to estimating object size using a deep neural network.

nbro
  • 39,006
  • 12
  • 98
  • 176
Naji
  • 139
  • 1
  • 1
  • 3
  • 1
    Is your data set images or text? hisairnessag3 is on the right track with porting the pixels/metric approach from OpenCV to an object detection DNN – Adnan S Oct 20 '17 at 19:45

3 Answers3

4

Yes! This most certainly can be done. Since you have a labeled dataset, that makes it all the more simple!

I would take a look at this project and that should get you where you need to go.

The implementation details should be pretty straightforward. Let me know if I can help further.

hisairnessag3
  • 1,235
  • 5
  • 15
  • 1
    It is not necessary to explain why someone is down voting. Many programmers do not have enough time to look at the comments, they look at the votes to see if the answer worth it or not. If you read the question again, you will find that the question is specifically about using DNN and not anything else. the project you shared is about using Opencv ... if you read the comments under the post you shared, you will find that people are asking about DNN, but the post itself does not use DNN. By the way I am not the person who down voted your answer – BH85 Oct 19 '17 at 23:03
  • 2
    It isn't necessary but is helpful. If you search at any depth you will find no projects or papers on this particular use case for DNNs. With that being said, I referenced the closest possible project in the hopes of getting OP started. Additionally, I answered the question. The question was can this be done. – hisairnessag3 Oct 19 '17 at 23:08
  • Thanks for your answer! I think it would be improved by a little explanation of how/why it's possible. At least an outline of the architecture would be very helpful. – Ben N Oct 20 '17 at 22:16
2

I think this paper can help you out: 3D Bounding Box Estimation Using Deep Learning and Geometry

He used 1 VGG-19 (pretrained on ImageNet) to learn the size of cars

DukeZhou
  • 6,237
  • 5
  • 25
  • 53
cryax dsa
  • 21
  • 1
  • Like you, I assumed this is about inferring a 3D bounding box where the data is represented in a 2D image. The project mentioned by hisairnessag3 appears to only address the 2D bounding box with no learned inferential behavior about the 3D nature that the image might contain. – Jim Jan 18 '19 at 22:17
  • This paper estimates the size and the orientation of the car using a 2D cropped image (only contain the desired object). – cryax dsa Jan 22 '19 at 03:24
0

Yes it's possible, but first you'll have to recognize some object in the image, either 1) the vehicle itself, and then report that vehicle's known size, or 2) a known object that's the same distance from the camera as the car (a curb, a stop sign, the driver's head, a shetland pony... whatever), and then use that object to calibrate the size of the car that's very close to it.

Any car in an image will be an unknown distance from the camera, making the car object appear larger or smaller from photo to photo. If you don't recognize the car or at least a referent object that has a known size, the physical size of the car will be uncalibrated -- you'll have no basis for your size estimate.

If the car is unknown, then even if you do have visual clues (there is a referent object present or the distance from camera to car is known), the unknown extent of wide angle-ness of the camera's lens may distort an unknown car's shape (height vs width), further complicating your ability to estimate its apparent dimensions.

Randy
  • 679
  • 4
  • 6
  • Can the license plate of the vehicle be that known object used to calibrate the size of the car? License plates are typically the same size. – Naji Oct 23 '17 at 19:05
  • 1
    You'd have to be careful about the assumptions you make that license plates are the same size. For instance, an Australian plate and US plate are different sizes. If this isn't a problem for your application (it'll only ever run in one country), you could assume a reference size for the plate. You would have to be careful still though, because the plate may not be oriented normally to you. If the car is at 45 degrees, the width of the plate will take up fewer pixels than at 0, even at the same distance. – pshlady Nov 20 '17 at 18:00