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

How can I split registered COCO dataset to train and validation for Detectron2?

I'm trying to train an instance segmentation model using Detectron2 but I'm not sure how I could validate every certain number of iterations on 20% of the data available. I have multiple registered COCO datasets using register_coco_instances() but I…
Sam Matar
  • 43
  • 4
1
vote
0 answers

Detectron2 - undefined symbol: _ZNK2at6Tensor7reshapeEN3c108ArrayRefIlEE

File /home/xyzUser/MyProject/.env/lib/python3.8/site-packages/detectron2/layers/deform_conv.py", line 11, in from detectron2 import _C ImportError:…
ReaL_HyDRA
  • 314
  • 1
  • 18
1
vote
0 answers

Detectron2 - How to use RepeatFactorTrainingSampler in class imbalance problem

I'm facing class imbalance problem in a 2 classes classification problem. Generally class 1 is about 25% of class 2. (class 1= 100 observations, class 2 = 400) So i will need class 1 to have 4x times more than the current observation. With the…
kwc
  • 21
  • 4
1
vote
0 answers

In detectron2, how could I put the keypoint names on the image?

First, I will explain the problem statement. I am wuing Detectron2 for keypoint detection for my custom dataset. I am using the below code to visualize the bounding box and the keyoints. outputs = predictor(im[..., ::-1]) v = Visualizer(im[:, :,…
1
vote
1 answer

How to "visualise" the images which go inside the model for training in Detectron 2?

How can I see my inputs to Detectron 2: Faster RCNN Object detection model? I need to debug my model to see both the X (Image) and Y (bounding Box coordinates, classes, labels etc). I am using some custom augmentations and in this github comment it…
Deshwal
  • 3,436
  • 4
  • 35
  • 94
1
vote
0 answers

Is it possible to get the pixels coordinates of the detected object with Detectron2?

Is there any way to save segmentation area to a TXT file or CSV file? I would like to get all the pixel coordinates (integers) of segmentation area, but I don't know how to do it. Is there any way to do it? thank you in advance
1
vote
0 answers

How to train custom keypoint detection with COCO formated dataset and Detectron2 with out skeleton?

I have successfully trained a model for custom instance segmentation using Detectron2. Now I am preparing my custom dataset to train a keypoint detection model using Detectron2. Detectron2 uses COCO formatted dataset for training. The format of COCO…
Amit
  • 51
  • 5
1
vote
0 answers

error while trying to install detectron2: error: metadata-generation-failed × Encountered error while generating package metadata

I am trying to install detectron2 using Pip but I face this error: MacBook-Air desktop % python -m pip install -e detectron2 Obtaining file:///Users/test/Desktop/detectron2 Preparing metadata (setup.py) ... error error:…
1
vote
0 answers

How to add early stopping in Detectron2 model

I am using detectron2 for object detection, but facing over fitting issues. Read somewhere of using after_step() function.. But can't understand how to fit the logic in the model... Please help. Thanks in advance.
R.K
  • 1,721
  • 17
  • 22
1
vote
1 answer

How to save Detectron2 model as a vanilla pytorch model?

I have a Faster-RCNN model trained with Detectron2. Model weights are saved as model.pth. I have my pickled config.yml file and there are a couple of ways to load this model: from detectron2.modeling import build_model from detectron2.checkpoint…
Deshwal
  • 3,436
  • 4
  • 35
  • 94
1
vote
1 answer

Changing the path of builtin datasets of Detectron2

I want to change the default path of builtin PASCAL VOC Dataset in Detectron2. According to the documentation, You can set the location for builtin datasets by export DETECTRON2_DATASETS=/path/to/datasets I'm unable to understand where to place…
1
vote
1 answer

How to install a package from git repo build when it needs another package to be already present?

I am trying to deploy my app to Streamlit and it requires detectron2. I had to install detectron2 using python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' It requires torch to be already present as it'll throw an error…
Deshwal
  • 3,436
  • 4
  • 35
  • 94
1
vote
1 answer

How to fine tune an object detection model for custom data and classes using Detectron2?

I have a pre-trained model weight (as .pth) and it's configuration (as .yaml) and I want to fine-tune this model on my downstream task. The only problem is that I have 1 class while the pre trained model has 5 classes and when I have fine tuned my…
Deshwal
  • 3,436
  • 4
  • 35
  • 94
1
vote
2 answers

Detectron2 Installation based on pytorch and cuda versions

I am fairly new to Object Detection and I'm trying to install Detectron2 on colab. My Pytorch version is 1.12 whereas Cuda version is 11.2. I referred the website https://detectron2.readthedocs.io/en/latest/tutorials/install.html to find the most…
1
vote
1 answer

How can I show validation loss and validation accuracy evaluation for the detectron2 model?

I have split the data to train and test (0.85) and here's my loss visualization code : import pandas as pd metrics_df = pd.read_json("./output/metrics.json", orient="records", lines=True) mdf = metrics_df.sort_values("iteration") mdf.head(10).T fig,…