Use "detectron" tag for questions related to FAIR's detectron or detectron2 framework for object detection and segmentation.
Questions tagged [detectron]
217 questions
1
vote
0 answers
Detectron2: Custom Data Augmentation Implementation
I am working on an underwater image detection problem using detection2. I have applied an image enhancement augmentation offline (by storing the newly processed data in a separate folder). But I need to apply the image enhancement on the fly, such…

muhammad ali
- 31
- 6
1
vote
0 answers
Why am I getting RuntimeError: Not compiled with GPU support with detectron2?
I am trying to run the code from:
https://github.com/cvlab-stonybrook/ContactHands on Windows 10.
It uses detectron2 and pytorch with CUDA. I installed CUDA 11.6, pytorch 1.12.0 (with conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c…

Volcan Tajumulco
- 11
- 1
1
vote
0 answers
Detectron model giving different results for different machines (constant seed)
My training script for the model:
seed = 42
import random
import os
import numpy as np
def seed_everything(seed):
random.seed(seed)
os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
torch.manual_seed(seed)
…

Dawny33
- 10,543
- 21
- 82
- 134
1
vote
0 answers
visual embeddings with detectron
I'm trying to extract visual embeddings from the detectron model with the help of this colab notebook. I want the shape of vector after passing through fc1 to be (1000, 2048), but somehow this model gives me output of (1000, 1024). Is there any way,…

lazytux
- 157
- 5
1
vote
1 answer
How to make inference on multiple images, with detectron2 and DefaultPredictor
I have trained the model, now i would like to use it to detect objects in many images. I saw that the defaultpredictor allows you to detect only on an image, what can I do?
I am really new to this world. The approach I tried was to use a for loop…

Claudio Russo
- 106
- 1
- 7
1
vote
1 answer
Error Training Custom COCO Dataset with Detectron2
I'm trying to train a custom COCO-format dataset with Detectron2 on PyTorch. My datasets are json files with the aforementioned COCO-format, with each item in the "annotations" section looking like this:
The code for setting up Detectron2 and…

Sam Skinner
- 376
- 3
- 12
1
vote
1 answer
Build confusion matrix for instance segmantation (mask r-cnn from detectron2)
I've trained a mask r-cnn on corn images (I cannot show examples because they are confidential), but they are basically pictures of corn kernels scattered over a flat surface.
There are different kinds of corn kernels I want to be able to segment…

Ramon Griffo
- 333
- 5
- 14
1
vote
1 answer
Draw lines connecting the centroids of a bounding boxes on different levels
I trained a model with Detectron2 to detect windows on an image of building.
As output I also get bounding boxes around each window with x,y-coordinates of top-right and bottom-left corner.
I want to derive info about the number of floors from this…

Julia Koncha
- 85
- 1
- 12
1
vote
1 answer
Detectron2 deployment using TorchScript and Visual Studio 2019 in C++
I have with me the exported file which is a TS file.
I cannot understand what does the next command after exporting the model does.
./build/torchscript_mask_rcnn output/model.ts input.jpg scripting.
I have followed this example for doing…

Kushagra Pal
- 124
- 5
1
vote
0 answers
With computer vision can one object return multiple classes?
So i'm really new to computer-vision and I think I know my answer but I wanted to ask first.
Im using detectron2 and I'm just getting started but is it possible to have one object belong to multiple classes?
For example: Lets say I was detecting…

zgf2022
- 63
- 6
1
vote
1 answer
Using detectron2 how do I change how many classes my dataset has
Despite changing the classes line to
cfg.MODEL.ROI_HEADS.NUM_CLASSES = 2
in the config portion of my detectron2 training python script I keep getting back
Got an invalid category_id=1 for a dataset of 1 classes
Is there something special I need to…

zgf2022
- 63
- 6
1
vote
0 answers
RuntimeError: faster_rcnn_fbnetv3a_C4.yaml not available in Model Zoo! in d2go
I am trying to run D2GO_Introduction.ipynb Notebook link file but I am facing some issue with that I am getting that error during getting the model from model zoo ,, "RuntimeError: faster_rcnn_fbnetv3a_C4.yaml not available in Model Zoo"
Here is the…

Bappy Ahmed
- 25
- 3
1
vote
1 answer
How to save the best model instead of the last one for Detectron2
I want to save the best model instead of the last model for detectron2. The evaluation metric I want to use is AP50 or something similar. The code I currently have is:
trainer.register_hooks([
EvalHook(eval_period=20,…

Caspertijmen1
- 351
- 1
- 14
1
vote
1 answer
Detectron2 models not generating any results
I am just trying out detectron2 with some basic code as follows
model = model_zoo.get('COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml', trained=True)
im = Image.open('input.jpg')
t = transforms.ToTensor()
model.eval()
with torch.no_grad():
im =…

tangolin
- 434
- 5
- 15
1
vote
0 answers
how to train DeepLabv3+ on coco dataset with detectron
I need to train DeepLabv3+ model on coco dataset. Detectron2 helped a lot when I trained it on cityscapes. Normally, detectron2 tells that when the config file is changed, you can train the model on other datasets. However, when I changed config…

user15684397
- 11
- 4