Questions tagged [detectron]

Use "detectron" tag for questions related to FAIR's detectron or detectron2 framework for object detection and segmentation.

217 questions
1
vote
1 answer

Demo Code for Detectron Not Detecting Object Instances

I am trying to get the demo code for Detectron2 working locally on my laptop. Everything appears to run correctly, but no object instances are detected, even when I use the image from the Colab demo. I am running on a non-GPU Mac. I followed the…
W.P. McNeill
  • 16,336
  • 12
  • 75
  • 111
1
vote
1 answer

Crop image using pred boxes coordinates

I used detectron2 to get predictions of where an object is located in an image. Now I'm trying to use the prediction boxes to crop the image (in my use case there is only 1 object/box detected per image). The part of my code that's relevant to my…
eTothEipiPlus1
  • 577
  • 2
  • 9
  • 28
1
vote
2 answers

Detectron2 Mask-Rcnn keep same color segmentation for same object class

I am using detectron2 implementation of Mask-Rcnn on video, the problem is that on each frame, the segmentation color of a same object change. Is there any parameter that can allow me to keep a single color for an object class. I already tried…
1
vote
1 answer

Detectron MetadaCatalog and DatasetCatalog import Failed

I'm trying the include of Detectron2.data on Google Colab. I made the connection for colab & my drive. And after that: !pip install pyyaml !pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.7/index.html It…
sssss_sssss
  • 161
  • 2
  • 14
1
vote
1 answer

ValueError from detectron2 import model_zoo

I am trying to install detectron2 inside a Docker container to use it into a project, but after being able to install all the dependencies, I get an error when I try to import model_zoo. Full runnable code or full changes you made: The code that…
Alejandro
  • 21
  • 1
  • 4
1
vote
1 answer

converting json annotation to coco format

I have annotated my data using vott and the default format is json. I wanted to load my data to detectron2 model but it seems that the required format is coco. Can anyone tell me how can I convert my data from json vott to coco format ??
1
vote
2 answers

Converting Detectron2 instance segmentation to opencv Mat array

I am trying to get a binary image from the instance segmentation output performed using Detectron2. According to the official documentation the mask's output format is the following: “pred_masks”: a Tensor of shape (N, H, W), masks for each…
Alex
  • 23
  • 3
1
vote
0 answers

RuntimeError: "upsample_bilinear2d_channels_last" not implemented for 'Long' after converting np array to list

I am trying to send image data across modules. The following works fine: def process_image(pdf_path, page_dimensions): pdf_path = get_pdf(pdf_path, False) pdf_name = os.path.basename(pdf_path) with tempfile.TemporaryDirectory() as path: …
Dawny33
  • 10,543
  • 21
  • 82
  • 134
1
vote
1 answer

The bounding box's position and size is incorrect, how to improve it's accuracy?

I'm using detectron2 for solving a segmentation task, I'm trying to classify an object into 4 classes, so I have used COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml. I have applied 4 kind of augmentation transforms and after training I get…
1
vote
0 answers

Object detection in detectron2 using pytorch on google colab. Reuse already trained model or import existing trained model and predict the objects

First I downloaded the output folder of the trained model and imported it in a new project on the google colab server. In a new project without training the model, I have given the path of model_final.pth of the existing output folder to…
1
vote
1 answer

Detectron2 visualizer- 'Visualizer' object has no attribute 'get_image'

I running detectron2 for object detection. In the origina, after the trining, I run the follwing code: v = Visualizer(im[:, :, ::-1], metadata=MetadataCatalog.get("name"), scale=1, …
alik
  • 21
  • 1
  • 5
1
vote
1 answer

How to do hyperparameter tuning in Detectron2

Detectron2 COCO Person Keypoint Detection Baselines with Keypoint R-CNN R50-FPN How do I do hyperparameter tuning with the model above? Which files do I have to open? Thanks
asz999
  • 23
  • 1
  • 4
1
vote
0 answers

Detectron2 add more classes or fine tune existing class in my model_final.pth

Im using "COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml" and gave a custom dataset that holds picture of orange, apple, and pineapple. Now my model is ready and is able to predict all 3 fruits. Let's say now I need to add more fruits…
ilampirai
  • 33
  • 6
0
votes
0 answers

In deepdoctection I am unable to detect the header. I am not able to detect the title here

sample image of the model result I am using the introduction notebook of deep doctection to extract text. Here I am not able detect the Header and titles as well. I want the header to be detected. It's not even drawing the bounding boxes. I have…
0
votes
1 answer

I used detectron2 to inference video frame by frame. But the inference speed was slow about 6.96it/s

I tried to use detectron2 to do some object detection in videos. But the inference speed was slow about 6.96it/s. The gpu usage was not high. I think there must be a way to improve the speed. I need some help. Wed Aug 2 15:00:27 2023 …