i hope i can find someone among you who can help me to master the first steps with matplot. the following scenario is currently bothering me: I am using a custom trained YoloV5 model to apply object detection to a video. now i can detect n objects per frame, which i generate via screenshot from the video. The…
Tag: object-detection
How do I create a model from a state dict?
I am trying to load a checkpoint pth file from the faster_rcnn_resnet101 model which is not currently in the PyTorch model zoo. This causes PyTorch to throw a KeyError saying that I the layers in the state dict does not match the model architecture of faster_rcnn_fpn_resnet50 that I’ve loaded from the m…
OpenCV finding number of rectangles and writing to video
I have a code that detects cars using haar cascade car model, draws rectangles around the detected cars, and generates a video file. I am trying to update the code to show the number of detected cars in each frame. When I execute this, some frames have numbers overlaid on each other. I want only one count wri…
How to rotate a rectangle/bounding box together with an image
I’m working on a data augmentation and im trying to generate synthetic version of every image in my dataset. So i need to rotate images and together with bounding boxes as well in the images. im only going to rotate images by 90, 180, 270 degrees. I’m using pascal-voc annotation format as shown he…
Using Yolox on an asset image doesn’t draw any detection
So I’m trying to learn how to use Yolox for my bachelor thesis, and after hours of installing and updating components, finally managed to run Yolox on a test image in the assets folder. However, when I go to the output folder, it’s the same image there, with no boxes on detected objects and I can&…
Rotate polygons without cutting edges
I am writing an augmentation code to rotate annotated polygons inside images. I wrote a code but it’s not working right. Just Copy paste the code and you can get the results. Thank you for helping me out. Image: Need to rotate the image as well as a polygon for respective angle. Currently, I am not able…
How do I use the exported ‘best.pt” file from yolov5 colab file to run the trained weights locally?
I have trained my model using yoloV5 on google colab, following the provided tutorial and walkthrough provided for training any custom model: Colab file for training your own custom model. I now have an exported best.pt file after running the last cell in the link provided. Now, I want to make use of this tra…
Hough Transform for equilateral triangles detection
I have a homework where I have to implement hough transform for equilateral triangles detection: The trianlges edges are of length L, so this means all the trianlges in the image are the same. What did I do? first i used canny edge detector to get the edges in the image. now i have to find a way to parameteri…
ValueError: Expected x_max for bbox (0.65, 0.51, 1.12, 0.64, 3) to be in the range [0.0, 1.0], got 1.1234809015877545
I want to apply data augmentations from PyTorch’s Albumentations to images with bounding boxes. When I apply the HorizontalFlip Transformation, I receive this error ValueError: Expected x_max for bbox (0.6505353259854019, 0.517013871576637, 1.1234809015877545, 0.6447916687466204, 3) to be in the range […
morphological transformation opencv noob questiong
hope you all have good day today. so I’m here learning python,opencv on a raspberry pi and Im hoping that someone can explain what the code below do, I’ve read from https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.html and it…