Use "detectron" tag for questions related to FAIR's detectron or detectron2 framework for object detection and segmentation.
Questions tagged [detectron]
217 questions
2
votes
1 answer
Detectron2: No instances in prediction
I'm trying to train Detectron2 on a custom dataset that I annotated with coco-annotator. After training I wanted to predict Instances of my Image, but I dont get any shown.
Training:
from detectron2.engine import DefaultTrainer
cfg =…

Lukas Scholz
- 55
- 5
2
votes
0 answers
How to deploy a detectron2 model using file in azureML
I have a detectron2 detection model trained and saved ( by someone else ) as a file model.pth, I also have a cfg.yaml file that specifies the weights path as the path to model.pth as follows :
inside cfg.yaml we have this line
WEIGHTS:…

Mountassir EL MOUSTAAID
- 79
- 1
- 4
2
votes
0 answers
What does "register" do in detecron2 for training custom dataset?
When I read the "Use Custom Datasets" section on the detectron2 web page, I saw that I needed to register my dataset. The web page says:
" If you want to use a custom dataset while also reusing detectron2’s
data loaders, you will need to:
Register…

hande
- 31
- 2
- 5
2
votes
1 answer
Saving a trained Detectron2 model and making predictions on a single image
I am new to detectron2 and this is my first project. After reading the docs and using the tutorials as a guide, I trained my model on the custom dataset and performed the evaluation.
I would now like to make predictions on images I receive via an…

Sushma Suresh Kalkunte
- 81
- 1
- 7
2
votes
2 answers
How to save a model using DefaultTrainer in Detectron2?
How can I save a checkpoint in Detectron2, using a DefaultTrainer?
This is my setup:
cfg = get_cfg()
cfg.merge_from_file(model_zoo.get_config_file("COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml"))
cfg.DATASETS.TRAIN =…

Rexcirus
- 2,459
- 3
- 22
- 42
2
votes
1 answer
install detectron2 package on Docker
I am using the python 3.7.9 version. The dectron2 is not installed properly.
command:
docker exec -it 1ee02b74a599 /bin/bash
root@1ee02b74a599:/app# pip install detectron2==0.2.1 -f …

Bhuvaneswari
- 21
- 4
2
votes
3 answers
Detectron2 Checkpoint not found
I've been getting an error like this since last night. I trained 5 models, there was no problem. Then there was such a problem. I would be glad if you could help.
AssertionError Traceback (most recent call…

Özgür Kan
- 51
- 1
- 6
2
votes
3 answers
In detectron2, how could I plot only bounding on images without label (class name) in object detection?
I am learning detectron2 and practicing it using pokemonster data.
So, I follow the detectron2 tutorial (here : https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5)
And also a detector is developed and below image can be…

Seunghyeon
- 103
- 1
- 2
- 10
2
votes
1 answer
detectron2 training keyerror
I am trying to train my own COCO dataset with detectron2, however when I start my own training I encounter a key error
KeyError: 'category_id
error code : https://i.stack.imgur.com/yO5IO.png
//this is the code i am training with
from…

eric chen
- 33
- 1
- 5
2
votes
1 answer
How to train a custom keypoint detector for drone pose estimation. Detectron2
Because I couldn't find the answer elsewhere I decided to describe my issue here.
I'm trying to create keypoints detector of the Eachine TrashCan Drone for estimating its pose.
I followed some tutorials. The first one was with the TensorFlow…

BrunoK
- 21
- 2
- 4
1
vote
1 answer
No evaluator found. Use `DefaultTrainer.test(evaluators=)`, or implement its `build_evaluator` method
I am using Detectron2 in a notebook and I keep getting the error: No evaluator found. Use DefaultTrainer.test(evaluators=), or implement its build_evaluator method.
I already have the build_evaluator function in the Trainer function.
class…

Azra Tuni
- 11
- 4
1
vote
1 answer
Incorrect positions of annotation polygons when drawing with Detectron2 Visualizer
Hello Stack Overflow community,
I apologize if my question seems trivial. I am currently working on building detection from aerial PNG images. Each image has dimensions of 2000 pixels by 2000 pixels with a resolution of 20cm. To accomplish this, I…

Alfa
- 23
- 6
1
vote
0 answers
Category id error while training detectron2 model on custom dataset
My custom dataset which I am trying to train through detectron2 consists of 193 classes.
cfg.MODEL.ROI_HEADS.NUM_CLASSES = 193
This is how I have set the number of classes in the model configurations, but every time I run my model I am getting…

Nitya Rakhe
- 41
- 2
1
vote
1 answer
Detectron2 saving output file as json
I would like to save the output image as json for future annotation.
The following code is able to show the output prediction. Would like to seek your help to assist me on how to save the output as json format. Many thanks.
from…

Lim Cheng Wei
- 11
- 3
1
vote
1 answer
Not correct instance segmentation if bounding box intersects another bounding boxes
I trained Mask-RCNN model by Detectron 2 for only one class for instance segmentation of lines. If the line is located at an angle to the horizon close to 0 or 90 degrees and its bounding box does not intersect the boxes of other lines, then…

Iurii Sobolev
- 11
- 2