Category Computer Vision

132. Attention UNet

Attention Unet highlights only relevant activations during training. This can not only perform better when the target you want to detect is relatively tiny compared to the size of the picture, but it can also reduce unnecessary computations. The overall…

126. ArgMax Function

Argmax compares pixels in the same position across channels, and acquires the index of the highest channel. This can be useful for semantic segmentation. Semantic segmentation models outputs the same width and height as the input image and creates a…

124. Preprocessing for Deepstream

I found out why my TensorRT engine model was not working as expected. I messed up with configuring the preprocessing step for Deepstream. When you use Deepstream to run inference, there is a property called net-scale-factor and offsets which you…

122. Extracting Inference Results Using C

A semantic segmentation model outputs a tensor shaped [Batch_size,Channel(Number of Classes),Img_Height,Img_Width] (If using Pytorch), but if you convert that to a TensorRT engine for faster inference, the output is flattened to a 1d array. Therefore the shaping being, [(Batch_size)X(Channel)X(Img_Height)X(Img_Width),] Considering…

121. Unet++

Unet++ is useful when you want to improve image segmentation accuracy. This was first designed for medical use where accuracies are critical. In a nutshell, Unet++ adds convolution layers between skip connection. The original Unet skip connect without any additional…