Starting from:

$25

ECE495- Final Exam Solved

Instructions
The exam can be completed within 150 minutes (e.g., within the planned time slot); however, given that students may reside in different time zones, and to accommodate any potential technical issues (e.g., internet connectivity), you have a 24h window to complete the exam.
You are allowed to consult materials, such as course notes, but you are not allowed to collaborate on the answers.
To answer the questions, create a separate document to be submitted to the dropbox on LEARN. The document must be submitted in PDF format. Make sure that each answer is labeled with the correction question number (or you may lose marks). Although you are allowed to insert photos of handwriting and hand drawings as part of your answers, typeset answers are preferred for readability.
Be concise in your answers.
Q1. ADS Fundamentals [
1a. Consider a robotic taxi that can operate only on selected roads. What is the level of automation of the ADS that operates such a taxi? [1 mark]

Q2. Computer Vision Fundamentals 
 

2a. Compute 1-D cross-correlation by applying the following filter [1 2 4] to the following signal [0 -1 2 0] (assume zero padding; pad enough to capture all non-zero result entries). [2 marks]

 

2b. What would be the result of applying this filter to an image? [1 mark]

 

0
0
1
0
0
0
0
0
0
 

2c. The figure below shows the red channel of an RGB image. The image shows that the sun has a much higher red component than the stop sign. Thus, thresholding the red plane to select the stop sign will not work in this example. How would you address the problem? [1 mark]

2d. What step in the Canny filter is responsible for achieving thin edges? [1 mark]

2e. The image on the right is the result of applying a gradient filter to the image 𝑓, shown

on the left. Which of the two gradient filters was applied, !" or !" , and why do you think                                                                                                                            !#              !$

so? [1 mark]

2f. Consider an input image that contains only a single pixel set to 1 and all other pixels set to 0. What image would the content of the Hough transform buffer using the normaldistance line parameterization show? [1 mark]

Q3. Machine Learning Fundamentals 
3a. The probabilistic model used by logistic regression (assume a simple setting with a single input and output) is as follows:

𝑃(𝑦|𝑥; 𝑤%, 𝑤&) = 𝐵𝑒𝑟$[𝑆(𝑤&𝑥 + 𝑤%) ]

What is the corresponding probabilistic model of linear regression (complete the equation below)?

𝑃(𝑦|𝑥; 𝑤&, 𝑤%, 𝜎) =   …

[1 mark

3b. What is the regression loss (as used in class) for a data point with label 0.3 and predicted output 0.5? [1 mark]

 

 

 

3c. What is the cross-entropy loss for a data point with label (0, 0, 1) and softmax output (0.1, 0.3, 0.6)? [1 mark]

3d. Given the following set of input vector X, ground truth vector Y, and weight matrices W1, W2, B1, and B2 of a two-layer fully-connected neural network, what is the inference probability of the correct class? Assume ReLU activation on the first hidden layer and softmax activation on the output layer. Show each step of the computation. Hint: Use

numerically stable softmax and assume exp(-18)=0.000 and exp(-1)=0.368  [5 marks]

 

      X           W1          B1           W2             B2                     Y

 

1
0
 

3
2
 
-1
 
-1
1
1
 
0
 
0 (Man)
-1
2
2
1
-2
3
10
0 (Bear)
0
1
3
3
3
3
2
1 (Deer)
     3e. Consider the computational graph below for the following function 

 

 𝑓(𝑥&, 𝑤&, 𝑤%) = ln(𝑤&𝑥&, + 𝑤%)

Draw the computational graph and annotate it with the forward pass (above the arrows) and backward pass (below the arrows) for 𝑥& = 2, 𝑤& = 1, and 𝑤% = −1 (propagate the gradient back to each function input: 𝑥&, 𝑤&, 𝑤%). Recall that ’()’#(#) = #& and ’’##! = 2𝑥 [5 marks]

3f. What is overfitting (i.e., how do you recognize it)? [1 mark]

 

3g. What is the general name of any mechanism used in machine learning to create a preference towards simpler models? [1 mark]

 

Q4. Semantic Segmentation 
4a. Consider a dataset with a total 7500 pixels annotated with the class cyclist. You then run a semantic segmenter on the dataset, which classifies 4500 pixels as cyclist, 500 of which are classified incorrectly. What is the class IoU? [1 mark]

4b. In the example from the previous question, assuming that there were a total of 100,000 pixels to classify, what was the pixel accuracy for the cyclist class? Why is the accuracy high compared to IoU? [2 marks]

 

4c. In a segmentation network, describe at least one technique that can be used to obtain detailed shape contours in the segmented image? [1 mark]

 

Q5. Object Detection 
 

5a. Consider the image below. Assuming a score threshold of 0.6 and an IoU threshold of

0.8, specify the number of TP, FP, and FN, explaining your reasoning. [3 marks]

 

5b. Consider the figure below, which shows the bounding boxes predicted by a network (before non-maximum suppression). With an IoU threshold of 0.5 and detection threshold of 0.25, how many bounding boxes are left after non-maximal suppression? Explain your reasoning. [3]

Q6. System Modeling [3 marks]  
 

6a. Consider the following system model with linear state update and non-linear measurement equation in state space representation:

𝒙- = 𝑨-𝒙-.& + 𝑩-𝒖- + 𝜺- 𝒚- = 𝑔(𝒙-, 𝜹-)

𝜺-~𝒩(𝟎, 𝑹-)

𝜹-~𝒩(𝟎, 𝑸-)

What is the equivalent probabilistic representation? [1 mark]

6b. A probabilistic model of a road environment defines state as consisting of 5 seconds of the past movements of every road user. The model uses the state at the current time step alone to decide the new state in the next step. Does this model satisfy the Markov property? [1 mark]

6c. Consider the graphical models below. What is the mathematical meaning of the arrows? [1 mark]

Q7. State Estimation 
7a. Assume that a day can be sunny or overcast. Given a sunny day, the probability for the next day to overcast is 0.2. Given an overcast day, the probability of being sunny next day is 0.8. Assuming an uninformative prior for the first day, what is the probability being sunny on the third day? How about on day 100? [3 marks]

7b. Consider the occupancy grid below. The laser scanner has a single beam, which hits an obstacle in cell (4,2), as shown. Each cell shows a log odds value of the cell being occupied before the measurement. Assume that the laser sensor reports a return at a range that coincides with the cell (4,2). Also assume that when the laser sensor reports a return from a cell, the probability of this cell being occupied is 0.9, and for the cells traversed by the beam before hitting the occupied cell (or before going out of range), the probability of these cells being free is 0.7.

What is the meaning of the cells having log odds of zero before the measurement?
[1 mark]

Please fill out the log odds values after the log odds update for the shown measurement. Assume that log(9) ≈ 2.2 and log(3/7) ≈ −0.8. [3 marks]
7c. Does square of a Gaussian-distributed variables yield a variable that is Gaussiandistributed? [1 mark]

7d. Assuming

𝛿&T ~𝓝(𝟎, 𝑹𝟐×𝟐) R𝛿, -

where 𝑹 can take one of two values V𝑎𝑐        𝑑𝑏[ or R𝑔𝑒      𝑓ℎT. The figure below shows samples from each distribution, where plot A is for  𝑹 = V𝑎𝑐     𝑑𝑏[ , and plot B is for 𝑹 = R𝑔𝑒          𝑓ℎT.

A:                                                        B:

What can you say about the values of a and d:

Are they positive or negative? [0.5 mark]

Are they equal or if not which one is bigger? [0.5 mark]

What are the likely values of c and b? [0.5 mark]

What can you say about the values g and f:

Are they equal or if not, which one is bigger? [0.5 mark]

Are they negative or positive? [0.5 mark]

7e. In Kalman Filtering, within the calculations for a single time step, how many different covariance matrices are involved? One, two, three, four, or five? [1 mark]

7f. Consider an autonomous that vehicle tracks other cars using a point mass kinematic model. The model is autonomous, and the state vector is 𝐱 = ^l1, l2, ψ, ψ̇ , vb3, with location coordinates l1, l2 and heading ψ (being the velocity vector angle measured counterclockwise relative to x axis) in a map frame and speed v (magnitude of the velocity vector). The motion model assumes constant speed v; it also assumes constant yaw rate ψ̇ . Also assume that l1, l2, ψ are measured, and the corresponding measurements are l′1, l′2 , i.e., 𝐲 = ^l′1, l′2, ψ′b3. The process and measurement noise, respectively, 𝛆4~𝒩(𝟎, 𝐑)    and      𝛅4~𝒩(𝟎, 𝓠), are additive Gaussian. Assuming 𝐑 = (0.1)𝐈515; 𝓠 =

(0.01)𝐈𝟑𝐱𝟑; initial state 𝐱%~𝓝(𝟎, (0.1)𝐈515); ∆t = 0.5          s; and the first observation 𝐲& = [1, 2, 0.46]3, provide the model equations and matrices and vectors needed to estimate the state for       𝐱&using the EKF:

the state equation 𝒙- = 𝒇(𝒙-.&, 𝜺-) [4 marks]
the state Jacobian 𝑭 (calculate the second row only) [3 marks]
the process noise Jacobian 𝑬 [1 mark]
the measurement equation 𝒚- = 𝒈(𝒙-, 𝜹-) [2 marks]
the output Jacobian 𝑮 [1 mark]
the measurement noise Jacobian 𝑫 [1 mark]
the initial state estimate 𝝁% and covariance 𝜮% [1 mark]
 

These data would be used in the EKF, which has the following general equations (they are given as context---you do not need them to solve this assignment):

𝛍{4 = 𝐟4(𝛍4.&, 𝐮4, 𝟎)  

𝚺{4 = 𝐅4𝚺4.&𝐅43 + 𝐄4𝐑4𝐄43    

𝐊4 = 𝚺{4𝐆43(𝐆4𝚺{4𝐆43 + 𝐃4𝓠4𝐃34 ).&          

𝛍4 = 𝛍{4 + 𝐊4(𝐲4 − 𝐠4(𝛍{4, 𝟎))        

𝚺4 = (𝐈 − 𝐊4𝐆𝐭)𝚺{4

Note: Recall  sin(x) = cos(x) and  cos(x) = − sin(x). 

7g. In the previous question, the state definition and the model assumptions lead to a nonlinear motion model. As an alternative formulation, consider the state vector to be 𝐱 =

^l1, l2, v1, v2b3, with location coordinates l1, l2 and the velocity components being v1, v2. We assume constant velocity, i.e., v1, v2 being constant. Since heading ψ can be recovered from v1, v2, and yaw rate ψ̇ can be estimated by differencing heading, we can obtain similar information as contained in 𝐱 = ^l1, l2, ψ, ψ̇ , vb3 in the previous question. Keeping the said in mind, please answer the following questions:

 

What variant of the Kalman filter would be applicable in this alternative formulation (assuming same measurement equation as in the previous question)? [1 mark]
What motion model assumption does not hold in this alternative formulation, but is present in the original one in the previous question? [1 mark]
If you used the original formulation with the state vector 𝐱 = ^l1, l2, ψ, ψ̇ , vb3 as in the previous question, what kind of future path (type of curve) is effectively being predicted by the filter (as implied by the state vector)? [1 mark]
If you used the alternative formulation with the state vector 𝐱 = ^l1, l2, v1, v2b3 as formulated in this question, a future path with what geometric shape is effectively being predicted by the filter (as implied by the state vector)? [1 mark]
Q8. Coordinate Transforms and Bicycle Kinematic Model [6 marks] 
8a. Assume that you are given the coordinates of a point in a 2D cartesian coordinate frame with axes represented by the unit vectors e1,e2. Specify the rotation matrix that would allow you to transform the coordinates of this point into a new frame defined by unit vectors b1,b2, as shown in the figure. Assume the angle between vectors e1 and b1 is 45 degrees. [1 mark]

8b. Consider the coordinate frame showing two vehicle footprints below (green reference point represents the center of the rear axle). Provide the homogenous transform from pose p& to p,. [2 marks]

8c. When approximating a vehicle footprint using circles for collision checking as shown below, we need to account for the fact that the center of each circle does not necessarily travel on the same path. Assuming that the front circle is centered over the front axle center and the center of the rear axle travels on a circular path with the curvature 𝜅:, what is the path (and its curvature) that the center of the front circle travels on? Use your knowledge of the bicycle kinematic model geometry to solve this problem. Assume wheelbase L. [3 marks]

Q9. Control [2 marks]  
9a. What undesirable characteristic of the step response of a PID controller can be eliminated using the integral part? Is it rise time, overshoot, or steady state error? [1 mark]

9b. What type of controller is pure pursuit? P, PI, PD, or PID? [1 mark]

More products