Comments (7)
Hi, orientation of what? Camera or vehicle?
from boxcars.
@JakubSochor, of the vehicle
from boxcars.
Yes, it is possible to compute the viewpoint vector to any point on the screen using following code.
def getFocal(vp1, vp2, pp):
return math.sqrt(- np.dot(vp1[0:2]-pp[0:2], vp2[0:2]-pp[0:2]))
def getViewpoint(p, vp1, vp2, pp):
try:
focal = getFocal(vp1, vp2, pp)
except ValueError:
return None
vp1W = np.concatenate((vp1[0:2]-pp[0:2], [focal]))
vp2W = np.concatenate((vp2[0:2]-pp[0:2], [focal]))
if vp1[0] < vp2[0]:
vp2W = -vp2W
vp3W = np.cross(vp1W, vp2W)
vp1W, vp2W, vp3W = tuple(map(lambda u: u/np.linalg.norm(u), [vp1W, vp2W, vp3W]))
pW = np.concatenate((p[0:2]-pp[0:2], [focal]))
pW = pW/np.linalg.norm(pW)
viewPoint = -np.dot(np.array([vp1W, vp2W, vp3W]), pW)
return viewPoint
To compute the viewpoint to the vehicle, you can use center of the 3D bounding box. The center can be obtained as intersection of diagonals of the 3D bounding box.
from boxcars.
@JakubSochor, It is seem that function below need a point from the original image.
def getViewpoint(p, vp1, vp2, pp):
The problem is that the given images only contains part(car region) of the original, and the 3DBB's coordinate is related to this region, such we can not calculate the center of the 3DBB on the original image.
Do I make myself clear?
from boxcars.
The 3DBB coordinates are in the original image space. To convert them to the cropped image space you need to subtract the 3DBB_offset. Therefore, you can just use the 3DBB in the original image space to compute the center of the vehicle.
from boxcars.
Got it, thank you very much : )
from boxcars.
@Zehaos Hi! The orientation you get is the center point of 3Dbox corresponding to the origin of the World Coordinate System, Right? But What should I do if I want to get the real front orientation of the vehicle? Can you please guide me on how to deal with it? Thanks~
from boxcars.
Related Issues (20)
- Bounding Box Estimator HOT 1
- this command error : python3 scripts/train_eval.py --eval path-to-model.h5 HOT 3
- Help in understanding dataset.pkl HOT 3
- No such file :dataset.pkl HOT 1
- AttributeError: 'NoneType' object has no attribute 'TF_DeleteStatus' HOT 1
- Where to find the NET that estimates 3D bb ? HOT 2
- Use trained model for single image prediction HOT 3
- BCNN, CBL and PCM are all using VGGNet as baselines, but achieve worse performance
- This is just a car patch classification example HOT 4
- Training on Custom data
- Is there any full image corresponding to the patch
- Link to dataset is down HOT 13
- Confusion of contour detection
- How to create the pickle files for my own dataset?
- Link to trained model is down
- requirements.txt file
- Dataset link is down HOT 2
- Trained Model fails in evaluation and single image classification HOT 1
- list of 107 classes from model
- lots of wrong labeled images in the training boxcars116k dataset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxcars.