Use "detectron" tag for questions related to FAIR's detectron or detectron2 framework for object detection and segmentation.
Questions tagged [detectron]
217 questions
0
votes
1 answer
Is it possible to get the number of pixels of the detected object with Detectron2?
I'm totally new to deep learning. I have a Detectron2 model detecting solar panels located on rooftops. I'd love to calculate the surface of the detected panels, therefore I need to get the number of pixels of detected objects. Is there any way to…

user19115084
- 3
- 2
0
votes
4 answers
How to access the save results of yolov5 in different folder?
I am using the below code to load the trained custom Yolov5 model and perform detections.
import cv2
import torch
from PIL import Image
model = torch.hub.load('ultralytics/yolov5', 'custom',
path='yolov5/runs/train/exp4/weights/best.pt',…

Rabiya Abbasi
- 1
- 1
- 2
0
votes
1 answer
How to do input for detectron2 builtinmodel?
I trained a model, now I would like to use it to detect objects in images. Using the DefaultDetector only the boundyboxes are returned, I would need the masks. I saw that you can also perform inference with this method:
model.eval()
with…

Claudio Russo
- 106
- 1
- 7
0
votes
1 answer
Difficulty with installing detectron2
I am trying to create a project using python, detectron2, opencv and tkinter. I created a virtual environment with anaconda and created part of my code with opencv, tkinter and python successefully. But I am having trouble installing detectron2 on…
user10693041
0
votes
1 answer
How to use gradient accumulation in detectron2
def do_train(cfg, model, resume=False):
model.train()
optimizer = my_build_optimizer(cfg, model)
scheduler = build_lr_scheduler(cfg, optimizer)
checkpointer = DetectionCheckpointer(
model, cfg.OUTPUT_DIR,…
0
votes
1 answer
What is the difference between the Faster R-CNN and RPN & Fast R-CNN models offered in Detectron2 model zoo?
I am trying to implement a pretrained model from the Detectron2 library for object detection and it seems that Faster R-CNN models outperform the RetinaNet models. However, when accessing the model zoo, I came across Faster R-CNN models and RPN…
0
votes
1 answer
Detectron2 prediction problem on my local machine with custom model
I trained a custom model with detectron2 on google colab, and ok, it's working correctly. The model was trained, the predictions were ok, this on google colab. But when I made predictions on my local machine did'nt work. Here a similar example on…

Curious G.
- 838
- 8
- 23
0
votes
1 answer
How to extract or get the image bounded by Detectron
I am working on creating bounding boxes upon images with my own created training dataset with the help of Detection, while I'm now stuck at the part of extracting the bounded image. I just want the image of the part inside the bounding box.
The…
0
votes
1 answer
Understanding Detectron2 COCO Evaluator
I am evaluating Cityscapes dataset using COCOEvaluator from Detectron2.
I want to know if COCO Evaluation metric implemented in Detectron2 takes into consideration the number of instances of each class, i.e. if the mAP is actually the weighted…

pinxau1000
- 301
- 1
- 11
0
votes
1 answer
detectron2 - CUDA is not available
I am trying out detectron2 and want to train the sample model.
When running the following code I get (, RuntimeError('No CUDA GPUs are available'), ). Find below the code:
import…

Carol.Kar
- 4,581
- 36
- 131
- 264
0
votes
1 answer
Detectron2 Trainer Value-Error on Custom keypoint dataset, stopped before training the data
I am currently working on a project with a custom keypoint dataset.
Before moving further with the dataset, I hoped to check both the dataset and training process are on point.
I came across this error, tried to look around for similar issues in…

gle2dev
- 1
- 1
0
votes
1 answer
Elegant way to quickly load only a small subset of data in detectron2
I'm looking for an elegant way to load only a small subset of data in detectron2 in order to speed up the training startup for debugging purposes.
I'm building my own instance segmentation model with detectron2 and running it the usual…

Dominik Filipiak
- 1,192
- 14
- 26
0
votes
1 answer
Change Metadata values in python, Detectron2
I work with Detectron for panoptic segmentation.
I would like to change the metadata values to values that I have chosen.
In particular, I would like to replace one dictionary with another dictionary that I have written.
but I got an…

mad_
- 1
- 1
0
votes
2 answers
can not visulize the images during loading images to COCO detectron2
I wanted to load and plot images with masks on detectron2. But during loading, it throws me such error:
6 for s in random.sample(dataset_custom, n):
7 img = cv2.imread(s['file_name'])
----> 8 v =…

Saltanat Khalyk
- 39
- 3
0
votes
1 answer
Inference on image dataset without annotations in detectron2
Motivation
I have a detectron2 Mask R-CNN baseline model that is good enough to predict some object boundaries accurately.
I'd like to convert these predicted boundaries to COCO polygons to annotate the next dataset (supervised labeling).
To do…

DV82XL
- 5,350
- 5
- 30
- 59