Blogs - Programming

RSS Stack Abuse

  • OpenCV Thresholding in Python with cv2.threshold() 2022-09-16
    In this practical tutorial - learn how to perform basic background foreground segmentation with Python, OpenCV and thresholding, using the cv2.threshold() method. We'll cover binarization methods, including Otsu's and the Triangle methods for finding optimal global thresholds.
    David Landup
  • Learning Rate Warmup with Cosine Decay in Keras/TensorFlow 2022-09-15
    The learning rate is an important hyperparameter in deep learning networks - and it directly dictates the degree to which updates to weights are performed, which are estimated to minimize some given loss function. In SGD: $$ weight_{t+1} = weight_t - lr * \frac{derror}{dweight_t} $$ With a learning
    David Landup
  • How to Set Focus On Element After Rendering With React 2022-09-14
    In this guide, learn how to set focus on an element after JavaScript's React component renders it, using functional and class components.
    Joel Olawanle
  • GET HTTP Request in React 2022-09-13
    In this tutorial, you'll learn how to perform HTTP GET requests in React using both Fetch API and Axios.
    Joel Olawanle
  • Understanding TensorFlow's @tf.function Decorator 2022-09-12
    In this guide, learn how, why and when you should use the @tf.function decorator while writing TensorFlow code with Python, including best practices.
    Felipe Antunes
  • RandAugment for Image Classification with Keras/TensorFlow 2022-09-09
    In this short guide, learn how to apply RandAugment with Keras, TensorFlow and KerasCV to create more accurate and robust image classifier CNNs, prevent overfitting and boost generalization.
    David Landup
  • How to Sort a Dictionary by Value in Python 2022-09-08
    In this article, we'll explore how to sort a dictionary in Python by its value. These solutions use for loops and the sorted() function, as well as lambdas and the operator module.
    Naazneen Jatu
  • Reading Files with Python 2022-09-07
    In this short guide - learn how to read files in Python, using the seek(), open(), close(), read(), readlines(), etc. methods. You can read an entire file, a specific line (without searching through the entire file), read it line by line or a as a chunk of text between line indices.
    Frank Hofmann
  • Reading and Writing Lists to a File in Python 2022-09-06
    In this article, we'll take a look at how to write a list to file, and how to read that list back into memory. We'll be using read()7write() and readlines()/writelines() functions, pickle module, as well as the JSON data format.
    Frank Hofmann
  • Definitive Guide to Logistic Regression in Python 2022-09-03
    Logistic regression is sometimes confused with linear regression - due to sharing the term regression, but it is far different from it. While linear regression predicts continuous values, making it a regression algorithm, logistic regression predicts discrete values, making it a classification algorithm. In this guide, we'll dive deeper into Python implementation of the logistic […]
    Cássia Sampaio
  • Pose Estimation/Keypoint Detection with YOLOv7 in Python 2022-09-02
    In this guide, learn how to perform near real-time pose estimation inference (keypoint detection) on images with a pre-trained model, using YOLOv7, implemented with Python and PyTorch.
    David Landup
  • Real-Time Object Detection Inference in Python with YOLOv7 2022-09-01
    In this guide, learn how to perform real-time object detection inference on images and videos with a pre-trained model, using YOLOv7, implemented with Python and PyTorch.
    David Landup
  • How to Force Update a React Component 2022-08-30
    Introduction In this article we'll show you how to force update a component in React.js. More specifically, we'll be giving a brief introduction to React re-renders, we'll show how to force updates in class-based components, and how to force updates in functional components. React Re-Renders React itself automatically handles
    Guest Contributor
  • Object Detection Inference in Python with YOLOv5 and PyTorch 2022-08-25
    In this short Python guide, learn how to perform object detection with a pre-trained MS COCO object detector - using YOLOv5 implemented in PyTorch.
    David Landup
  • Don't Use Flatten() - Global Pooling for CNNs with TensorFlow and Keras 2022-08-24
    Flatten() vs GlobalAveragePooling()? In this guide, you'll learn why you shouldn't use flattening for CNN development, and why you should prefer global pooling (average or max), with practical examples in Python, TensorFlow and Keras.
    David Landup