A walk with fastai2 - Vision - Study Group and Online Lectures Megathread

@muellerzr Thanks for your information. I missed this helpful tutorial…

By the way, you might have know this, in this colab notebook(https://walkwithfastai.com/Binary_Segmentation), dls = binary.dataloaders(path/'images_data_crop', bs=8) gives me an error because NameError: name 'p2c' is not defined.
On the above cell vals = n_codes(lbl_names) should be p2c = n_codes(lbl_names) I guess.

Could I convince you to open an issue about that so I don’t forget? :slight_smile: https://github.com/walkwithfastai/walkwithfastai.github.io/issues

Yes, I’ll open an issue for you😊

1 Like

@muellerzr I have a need to use CropPad for the batch ,is it possible to use ?
i am passing albumenations to the item tfms so cant pass CropPad ,unless there is any other method

We have finished the video lessons from the 2020 course, there is only left the 4 lessons on tabular data, remember if you want to join Tuesday we watch the lesson and Thursday we run it and try to see if we get it, so you can watch the video on your time and come with us on Thursday.

1 Like

Has anyone made any progress on the inference stage for Object detection (https://colab.research.google.com/github/muellerzr/Practical-Deep-Learning-for-Coders-2.0/blob/master/Computer%20Vision/06_Object_Detection.ipynb#scrollTo=iMxjDbNvoB2U)?

I am trying to figure this one out at the moment but with little luck atm.

You should definitely take a look at IceVision. IceVision is an object-detection framework that connects to different libraries/frameworks such as Fastai, Pytorch Lightning, and Pytorch. So you can use all of the FastAI goodness and get cracking with a big range of object detection models and algorithms.

This area is moving so quickly these days, it is really helpful to engage with some folks who are following it energetically and adding new capabilities as they emerge.

Like FastAI, IceVision is also open source and has a great community.

@lgvaz @ilovescience @muellerzr
does fastai2 by default unfreezes layers and train ,unless we explicitly put freeze to train only for last layer ?

Yes, regular Learner does not call learn.freeze(), you need to do that yourself.

I have a tabular data but with a text column that I’d like to use as well for making predictions, has anyone tried combining the two?

–> 110 fake = self.gan_model.generator(input).requires_grad_(False)

This looks like TypeError: requires_grad_() takes 1 positional argument but 2 were given #3224
, resolved by Make requires_grad_ consistent with PyTorch #3184.

If so, it is resolved with the latest version of fastai. However, fair warning… I get a different error when I run 07_Super_Resolution.ipynb with the latest fastai :slight_smile: . Still digging into that, it may be that I’ve messed something up in installs or in modifying the notebook.

EDIT: My error came from an issue working with single-channel data, which I fixed. It wasn’t a bug in the latest fastai version. @studboii I’d suggest trying to rerun your notebook with the latest fastai!

great notebooks! I was looking at the object detection notebook and I noticed something odd. The final output for the RetinaNet has anchors of sizes [[32, 32], [64, 64], [8, 8], [4, 4], [2, 2]]]. But looking at the RetinaNet paper shouldn’t the second anchor grid be of size 16,16 instead? If you change the merges to idx,hook in zip(sfs_idxs[:2], self.sfs[:2])]) it gives the desired sizes. Is my understanding correct or am I missing something with how the model merges the feature maps? (link)

If you are running " 06_Object_Detection" in June 2021 the code is broken tnx to some tensor subclassing introducing at some point by fastai. To fix the code just add a simple callback that cast the tensors back to ‘Tensor’ class

def cast_to_tensor(x): return cast(x, Tensor)
class to_tensor(Callback):
    def before_batch(self):
        self.learn.xb = tuple(map(cast_to_tensor, self.learn.xb))
        self.learn.yb = tuple(map(cast_to_tensor, self.learn.yb))

learn = Learner(dls, arch, loss_func=crit, splitter=_retinanet_split, cbs = to_tensor)
3 Likes


Why use slice() before unfreeze() instead after ?