Tag: Javascript
-
How to call a REST API with REACT and Typescript using Axios Library
In this example, I will show you how to call a REST API using the popular Axios library with React and TypeScript. First, you need to install Axios: Or if you are using Yarn: Now, let’s create a simple React component that fetches data from a REST API and displays it. For this example, we […]
-
How to resize and crop an image using Typescript
In this article, I will share a simple snippet in Typescript, that you can easily convert to Javascript, to resize and crop images without relying on any third-party libraries. This code snippet first prompts you to select a local image using an HTMLInputElement. Once an image is selected, using the FileReader API, it loads the […]
-
How to crop and resize an image using Tensorflow.js tf.image.cropAndResize
This is a quick post to show how you can use tf.image.cropAndResize to crop and resize an image to a square using the function tf.image.cropAndResize. This function was created for a specific purpose to cutout the bounding boxes given by a face detection algorithm. But you can use it for other purposes too! Your image […]
-
A tutorial on how to convert a Tensorflow model to Tensorflow.js
In this article, I will take you through the steps that are needed to convert any model in Tensorflow Hub to Tensorflow.JS format, and how you can quickly make a simple interactive page that you can host on any web server on the internet. I am only scratching the surface of what is possible. More […]