Recent Forum Posts
From categories:
page »


Please note that Q2, question #2 in example exam from 2011 (the first exam in the zip file) relates to an algorithm we didn't study in class — we studied alpha expansion, while #2 in Q2 relates to an algorithm called alpha-beta swap.

The course staff

Exam - Practice Materials by benfeibenfei, 15 Feb 2019 21:40
New Dataset
benfeibenfei 03 Feb 2019 12:50
in discussion Discussions / HW5 » New Dataset


It seems that DIP may suffer from what’s called “dataset optimization”, which can explain the sub-optimal results on our provided dataset. To mitigate this issue, a new dataset (“dataset-v2”), which conforms with the results reported in the DIP paper (i.e. PSNR of +29dB), is provided to you.

To download it, please add the following cell to your notebook (say after the “Download dataset” cell):

#@title Download dataset-v2
#@markdown Please run this cell to download dataset-v2 (which conforms with PSNR of +29dB).

# download images
!wget -q
!tar -zxf ex5-data-v2.tar.gz && rm -f ex5-data-v2.tar.gz

To load it, please use the following code:

# dataset = load_dataset()            # loads old dataset
# dataset = load_dataset('dataset')   # loads old dataset

dataset = load_dataset('dataset-v2')  # loads new dataset

For your convenience, the images in “dataset-v2” were resized to the same size as the original images (i.e. 256x256), so other than the two changes mentioned above – the switch should be transparent to you.
Please let us know should any problems arise.

The course staff

New Dataset by benfeibenfei, 03 Feb 2019 12:50
Important notice
benfeibenfei 31 Jan 2019 19:50
in discussion Discussions / HW5 » Important notice

Many of you told us that couldn’t get near the +29dB boost (PSNR) reported in the DIP paper. We are now aware of this issue, and currently looking into it.

For the meantime, you can set your goal to +26dB boost in PSNR (for U-Net with skip-connections). Furthermore, it seems that it works better on uniform noise, so you may replace the previously provided noise function with the following one (scale=0.1 is a reasonable noise scale):

def add_noise(images, scale=0.1, bounds=(0, 1)):
  minval, maxval = bounds
  noise = np.random.uniform(-scale, scale, size=images.shape)
  return np.clip(images + noise, minval, maxval)

We apologize for not detecting this problem earlier. Please don’t spend too much time on it.

The course staff

Important notice by benfeibenfei, 31 Jan 2019 19:50
Re: aligned video
benfeibenfei 17 Jan 2019 12:30
in discussion Discussions / HW4 » aligned video

As in align_image(), out-of-bounds pixels (w.r.t frame's bounds) should be NaN.

Re: aligned video by benfeibenfei, 17 Jan 2019 12:30
Assignment 4: Q&A
benfeibenfei 17 Jan 2019 10:14
in discussion Discussions / HW4 » Assignment 4: Q&A

Q: what should error_map return?
A: A tuple of (diff, diff_bounds).

Q: how should we use bounds in the calculation of the PSNR?
A: Follow wikipedia, and note that MAX_I in wikipedia is actually maxval - minval.

Q: How should we handle NaN values in the calculation of RMSE?
A: Read about np.nanmean.

Q: What does imshow_hbox expect to get as kwargs?
A: kwargs should be either a dictionary, if the same kwargs should be used for all the images, or a list of dictionary (a dictionary per image), with the per-image kwargs.

Q: What should be put in "non-existing" pixels in align_video?
A: As in align_image, "non-existing" pixels should be NaN.

Assignment 4: Q&A by benfeibenfei, 17 Jan 2019 10:14
Re: remove_dynamics
benfeibenfei 17 Jan 2019 10:00
in discussion Discussions / HW4 » remove_dynamics
  1. you should align all the frames to frame number ref_idx, take the median, and plug it back in the corresponding paces in all the frames.
  2. video which is similar to the input, just without the professor.
Re: remove_dynamics by benfeibenfei, 17 Jan 2019 10:00
Re: 2 questions
benfeibenfei 17 Jan 2019 09:56
in discussion Discussions / HW4 » error_map: zero_nans
  1. the value MAX_I in wikipedia is actually maxval - minval.
  2. if zero_nans=True, you should indeed replace NaNs with zeros, as the name suggests (it's not a function of the bounds). Note that zero is always a valid value in the output image (diff).
Re: 2 questions by benfeibenfei, 17 Jan 2019 09:56

bounds in the argument is the valid bounds of the given images (image and reference).
bounds in the output is the valid bounds of output image (diff).

Re: error_map function by benfeibenfei, 17 Jan 2019 09:53

In example attached in the notebook, name is used in the title of the "shift vs. iteration" plot. However, it's not very important (no points would be reduced for that).

Re: question in assignment 4 by benfeibenfei, 17 Jan 2019 09:50
aligned video
Roee ZamirRoee Zamir 16 Jan 2019 21:21
in discussion Discussions / HW4 » aligned video


the aligned video should include nan pixels or we should fill them?


aligned video by Roee ZamirRoee Zamir, 16 Jan 2019 21:21

can we get more info about remove_dynamics function a spsialy especially can you clarify

1) what is the argument ref_idx is for?

2) do you want to get back an a video that is align in each frame or you want to get the same video as in the input just without the professor?

remove_dynamics by Michael RoitmanMichael Roitman, 15 Jan 2019 13:40
2 questions
Roee ZamirRoee Zamir 15 Jan 2019 13:18
in discussion Discussions / HW4 » error_map: zero_nans


how should the lower bound affect the psnr?
it doesn't appear in the formula in wiki and i couldn't find anywhere else…
should max from wiki be the difference between the upper bound and the lower bound?

in error_map,
if zero_nans is True, the nan cells should be assigned with the value zero? or the lowest possible value in the diff?
looks from your example it's the second option, but the im not sure because of the name.
and when we calculate the rmse should we ignore pixel which receive nan in one of the pictures?


2 questions by Roee ZamirRoee Zamir, 15 Jan 2019 13:18

can you explain what is the diffrence between "bound" in the arguments and the "bound" in return

error_map function by Michael RoitmanMichael Roitman, 14 Jan 2019 14:04

for the function test_align_image can you give an image example how would you like for the name to be appeared

Re: question 1
benfeibenfei 14 Jan 2019 11:49
in discussion Discussions / HW4 » question 1

Hi Michael,

  1. NaN values should be handled with care, but it's your choice how to do it (and that's part of the exercise).
  2. You should wrap image to match reference.
  3. I didn't understand the question. Can you please be more specific?
  4. I didn't understand the question. Can you please be more specific?


Re: question 1 by benfeibenfei, 14 Jan 2019 11:49

1) when i calculate the sum of the diravation do i need to take np.nonsum beacuse the wrap function ?

2) for each iteration which image do i need to wrap(the image or the reference)?

3) each iteration do i need to sum the shift or subtract in the current pyramid layer

4) "It" value eual to ref- im or im - ref?

Assignment 4 was published, and it should be submitted by Jan 20, 2019 at midnight. This is a programming assignment, and it should be submitted in pairs

Questions about the exercise should be asked in the HW4 Forum.

Note: you should install a patch (with new python packages), as instructed in the README file.

The course staff

Ok, I figured that if the baseline is parallel to a line in the scene then there's an epiplane that fully coincides with that line. So in this case the two people taking the photo were probably standing along the same sidewalk that's parallel to the building.

The epipolar lines in the 32nd slide of the first geometry lecture seem to be precisely parallel to the lines of the building in the image. Is it a coincidence? Epipolar lines are normally determined by the relative locations of the cameras and not by the object in the scene (even if the features of the object in the scene were used in recovering the epipolar constraints)


page »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License