Suppose two cameras view the same scene. The cameras are calibrated, meaning that we know their intrinsics (\(K_L, K_R\)) and extrinsics (\([R|t]_L, [R|t]_R\)).
Download ML3_playground.ipynb, which contains a simplified version of the ML3 notebook. In the section called “Create and train the model”, you’ll find hyperparameter settings. Tune these try to get a good model fit with accuracy that’s as high as possible on the test set - this means you’ll need to make sure your model does not overfit.
You can go beyond tuning just those hyperparameters if you like; feel free to look into other ideas for improving model performance. I encourage you to use AI (with the class system prompt) to help you get the particulars of the pytorch code right, and to help you understand the things you try out.
You will likely want to do this exercise on a machine with a GPU, or on Google Colab using a GPU-enabled runtime. Please see the syllabus and the Project 4 setup instructions for some more details on getting this to work, and talk to me if you are having any issues.
cross is in geometry.py in the lecture
repo.In the next few problems, we will unsuccessfully attempt to break math by finding the intersection point of parallel lines.
Given the homogeneous coordinates of a line \(\ell = [a, b, c]^T\), derive an expression for the slope of the line. You may assume the slope is not undefined.
Give a criterion for determining whether two homoegeneous lines \(\ell_1 = [a_1, b_1, c_1]^T\) and \(\ell_2 = [a_2, b_2, c_2]^T\) are parallel. Again, assume their slopes as derived in part (a) are not undefined.
It turns out that in projective space, the intersection point of two parallel lines is well-defined. Using what we learned about point-line duality, calculate the intersection of \(\ell_1\) and \(\ell_2\) above.
Using the intersection point’s coordinates and the parallel criterion from part (2), show that the intersection of two parallel lines has \(0\) as its \(w\) coordinate.
Give a geometric interpretation of points at infinity using the more easily-visualized interpretation of homogeneous points as vectors in \(\mathbb{R}^3\).