Questions tagged [detectron]

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

217 questions
3
votes
1 answer

How can I avoid getting overlapping keypoints during inference?

I have been using Detectron2 for recognizing 4 keypoints on each image, My dummy dataset consists of 1000 images, and I applied augmentations. def build_train_loader(cls, cfg): augs = [ T.RandomFlip(prob=0.5,horizontal=True), …
3
votes
1 answer

Fine tuning Object Keypoint Similarity (OKS)

I have been trying to figure out how to compute the object similarity (OKS) in Detectron2, In my custom dataset I have 4 keypoints per image, I'd like during training to improve the Object Keypoint Similarity's score properly, therefore I need to…
JammingThebBits
  • 732
  • 11
  • 31
3
votes
0 answers

Unable to install detectron2 on Windows 10

I am using a windows 10 machine with the following configuration NVIDIA GeForce GTX 1650Ti miniconda3 python 3.8 CUDA 11.1 PyTorch 1.8 downloaded directly & installed from PyTorch.org for CUDA-11.1 I have tried to install detectron2 based on the…
3
votes
1 answer

Extract object features from Detectron2

I am really new to object detection, so sorry if this question seems too obvious. I have a trained FasterRCNN model on detectron2 that detects objects, and I am trying to extract the features of each detected object for the output of my model's…
nkay4321
  • 31
  • 1
3
votes
2 answers

How do I register a dataset to use with detectron2? We have images and their annotations in COCO JSON format

I am trying to train a model using Detectron2. I am using Grocery image data and I have annotations in COCO format. I am having a problem with model loading. Model is not taking annotations. I am referring to this blog…
3
votes
2 answers

How can I calculate Intersection Over Union in Detectron2?

I am using Detectron2 for object detection. I have registered pascalvoc dataset and trained a model for detection. How can I calculate Mean IOU of my test dataset ? I know that detection2 has a predefined function for calculating IOU i.e.…
3
votes
2 answers

Replace instance of a class with new instance

I am working on detectron2 object detection. I am facing a problem in filtering the objects detected. Here is the detectron2 predicted output: Instances(num_instances=9, image_height=547, image_width=820, fields=[pred_boxes:…
Rathish Kumar B
  • 1,271
  • 10
  • 21
3
votes
1 answer

Training Detectron2 on part of COCO dataset

I'm trying to train model with Detectron2 and COCO dataset for vehicle and person detection and I'm having problems with model loading. I've used posts here on SO and https://github.com/immersive-limit/coco-manager (filter.py file) code to filter…
qalis
  • 1,314
  • 1
  • 16
  • 44
2
votes
2 answers

How to use Custom (or albumentation) augmentations on Detectron 2?

I have the below code where I'm using default augmentation during training of Detectron 2 but the problem is that there are very few augmentations that are useful to me. Here is something like what I to achieve with my own functions. This github…
Deshwal
  • 3,436
  • 4
  • 35
  • 94
2
votes
2 answers

How to change the default optimizer in detectron2

So from what I can tell by reading the docs, the default optimizer used in detectron2 is SGD with momentum. But I was wondering if there is a way to change the default optimizer to something like Adam for example. The closest I was able to get to…
2
votes
1 answer

torch.onnx.export() raises indexError: too many indices for tensor of dimension 2

This is the snipped of my code, dummy_input = torch.randn(800, 1067, 3) torch.onnx.export(model, dummy_input, "/content/model/detectron2.onnx", opset_version=11) This is the error it gives: 22 dummy_input = torch.randn(800, 1067, 3) ---> 23…
2
votes
1 answer

Train Mask R-CNN with some classes having no masks but only bounding boxes

I want to train a model to detect three different types of defects. I have a training dataset where two of these classes contain segmentation masks, but one contains only bounding boxes. Can I train a shared model or do I need to separate the…
2
votes
4 answers

In detectron2 there are class IDs instead of class names

I finished training model for instance segmentation in detectron2 when I test images in training files there is no problem class names(apple,banana,orange) are written on the image but I downloaded some fruit images from the internet and class names…
Onur Aygun
  • 33
  • 3
2
votes
0 answers

Cuda out of memory with larger dataset and not smaller dataset despite same batchsize

Im training a faster r-cnn model with the detectron2 framework. When I'm training the model using only 15 images in the dataset it works on my RTX 3060, however, when training on a dataset of 3000 images cuda goes out of memory. Despite using a…
wuannnn
  • 31
  • 2
2
votes
1 answer

can't resume training with detectron2

I am training a model on Faster R CNN architecture. For the first session I used the below config: def get_train_cfg(config_file_path, checkpoint_url, train_dataset_name, test_dataset_name, num_classes, device, output_dir): cfg = get_cfg() …
Meet Gondaliya
  • 387
  • 4
  • 18
1
2
3
14 15