You hate PyTorch. No, scratch that. You love PyTorch, however, you hate that it does not have any structure to it. You hate having to write the same training loop over and over again, putting stuff on GPU on your own and manually implementing best practices like mixed precision training.
After all the hassle, even if you manage to get everything working for one project, you can’t easily replicate it for the next one.
You wish PyTorch had some abstractions to help with these problems, not a lot, just a thin layer. …
This is not a full tutorial article like the ones I usually write. Maybe it should just be a top-rated answer on Stackoverflow.
Anyway, I was creating a Python package using nbdev and I needed to use an
api_key and a
secret_key to access some data. Locally, I just embedded them in a Python file
config.py , added the config file to my
.gitignore so I don’t accidentally push it to GitHub and started using my credentials.
The image below comes from the documentation page of a library called fastcore.
As machine learning matures, we come across newer problems, and then we come up with sophisticated solutions for these problems. For example, in the beginning, it was hard to train a neural network itself. Then came GPUs and frameworks that made this task really easy. After that came Tensorboard for easy metric tracking, Streamlit for creating demo apps, and Docker for easy deploying. The field has come a long way. But there are still many components that need work.
One such component is experiment tracking. We still use physical notebooks or excel sheets to track experiments and then manually plot…
We use all kinds of techniques from creating a very reliable validation set to using k-fold cross-validation or coming up with all sorts of fancy metrics to determine how good our model performs. However, nothing beats looking at the raw output. When you look at sample output, you figure out things that none of the other methods can tell you.
For example, if you are performing object detection on crops, you might see that when the crop is aligned in a certain way because of the wind, our bounding boxes don’t encapsulate the crop properly.
However, looking at sample outputs…
Object detection is a task in computer vision where instead of classifying an image, we try to classify the objects present in the image. It has various applications like detecting empty parking space, tracking objects in CCTV footage, and monitoring crops, which is the one we’ll be looking at.
There are many ways to perform object detection; Fasterrcnn is just one of them. Many of the other techniques, like YOLO and SSD, work equally well. …
This article is co-authored by Prajakta Phadke
The use of deep learning for medical applications has increased a lot in the last decade. Whether it’s to identify diabetes using retinopathy, predict
pnuemonia from Chest X-rays or count cells and measure organs using image segmentation, deep learning is being used everywhere. Datasets are being made freely available for practitioners to build models with.
In this article, you will learn about a bunch of experiments we conducted while working with brain MRIs. These experiments are available on Github as a sequence of notebooks.
I have seen that a lot of beginner programmers don’t use functions while programming. And when I force them to write one, they just copy-paste a bunch of code into a function and call it done.
The function will have no arguments, no flexibility for various data structures and no reusability. Variables will be declared inside the function. Numbers will be used in various places instead of variables. And there will be no type-checking, no tests to see if it can break. The list just goes on. The function will work for their particular assignment and that’s it.
Learn how you can change the behavior of objects
We are used to passing and returning various data types in and out of a function. It’s time to start passing and returning functions from functions. Let’s take an example.
Python lists are good. But they’re not great. There is so much functionality that can be easily added to them but is still missing. Indexing with booleans, easily creating dictionaries from them, appending more than one element at a time, so on and so forth. Well, not anymore.
Fastai has come up with their own data structure called
L . It can do everything that a Python list can do and much more.
The purpose of this article is to show you how easy it is to write such useful functionalities on your own. Especially if you are a beginner…