Questions tagged [detectron]

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

217 questions
0
votes
0 answers

How to train a detectron2 model without bounding box in the training set but have the segmentation labels

I have a training dataset which has many images but do not have bounding box annotations. I have annotations for the images in validation and test dataset. Goal is to train a detectron2 model using validation (with bbox) and training dataset(without…
0
votes
1 answer

got "Could not export Python function call '_ScaleGradient'" when export detectron2 model to torchscript

After trained a module by Detectron2, I tried to export the model to TorchScript, Then I got the following errors: Could not export Python function call '_ScaleGradient'. Remove calls to Python functions > before export. Did you forget to add…
Ben
  • 9
  • 4
0
votes
1 answer

Image size in DefaultPredictor of Detectron2

For object detection, I'm using detectron2. I want to fix the input image size so I made my customized dataloader: def build_train_loader(cls, cfg): dataloader = build_detection_train_loader(cfg, mapper=DatasetMapper(cfg, is_train=True,…
Kosar KAZEMI
  • 3
  • 1
  • 2
0
votes
1 answer

Torch is installed but I'm unable to import it in a computer vision python project in Jupyter notebook

I'm working on a computer vision project using detectron2. I'm having trouble installing torch or importing it into my jupyter notebook. I'm working on a mac that is running MACOS Catalina, Python3 version in 3.8.2 and I'm using Anaconda for my…
0
votes
1 answer

Give randomCrop augmentation and loss become explode

I'm trying to test the different kind of augmentation, but when I gave option with RandomCrop it gives loss value NaN or infinity. Here is my random augmentation optims def mapper2(dataset_dict): dataset_dict = copy.deepcopy(dataset_dict) # it…
user14556788
0
votes
1 answer

AttributeError: Cannot find field 'pred_masks' in the given Instances

I trained a model with RetinaNet Detectron2 on colab. The training is successful but i am unable to test it on images. Code: from detectron2.utils.visualizer import ColorMode import glob for imageName in glob.glob('/content/drive/My…
0
votes
1 answer

Empty output file, Detectron2

I want to create body pose estimator with Detectron2. I have been trying to run following code locally to read a video file, make the prediction frame by frame and record a video with the processed frames. But it doesn`t work properly. It creates…
Teodred
  • 1
  • 1
0
votes
1 answer

In detectron2, how could I put the text on image?

I am learning how to use detectron2 well. And I could do predicting the bounding box. But, I also want to put the bounding box coordinate on the image. For this, I use cv2.putext library. but it did not work. Could you please make the below code can…
Seunghyeon
  • 103
  • 1
  • 2
  • 10
0
votes
1 answer

How to use the Detectron2 .pth model for prediction from storage..?

I have trained the Detectron2 model on the google colab server free server. from detectron2.engine import DefaultTrainer from detectron2.config import get_cfg import os cfg = get_cfg() cfg.merge_from_file(model_zoo.get_config_file("COCO-…
0
votes
1 answer

How can I plot my trained model result on video using Detectron2?

I am new on using Detectron2. I want to load the video from local drive. And then, do detection using my trained model using Detectron2's VideoVisualizer. I tried to find a tutorial about this. But it does not exist. Could you please what do I…
Seunghyeon
  • 103
  • 1
  • 2
  • 10
0
votes
1 answer

Detectron2 video object detection

I run obeject detection code, using detectron2. I trained the net and it works fine on images. Now I would like to test it on video, but when I run the video it doesn't detect any of my labels, more then that, it detect untrained object, means my…
alik
  • 21
  • 1
  • 5
0
votes
1 answer

How do I get X server to display an image in detectron2?

I am following detectron2 getting started tutorial to detect objects in an image using one of their machine learning models. I am doing this using an AWS machine learning AMI and jupyter notebook. The model successfully detects an object in the…
0
votes
1 answer

Storing given percentage of shape contour coordinates

I am building a project on Detectron2 with some mushrooms as a topic. The prediction works OK-well and I'm now trying to generate COCO-like annotations of the images with the predicted region (all XY coordinates of the region). For this, I need to…
Stefano
  • 43
  • 4
0
votes
1 answer

Multi-object tracking with dlib

I'm trying to implement the following code from the pyimagesearch web for multi object tracking with dlib. I tried to customize it to run it with detectron2 instead of the Mobilenet + SSD Caffe model. Here is the code #!/usr/bin/python # -*- coding:…
Laura_M
  • 43
  • 1
  • 3
-1
votes
2 answers

Error with Detectron2 : RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same

I'm getting this rather annoying error and I have no idea how to correct : RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same. I'm running the code for image detection locally on a Jupyter…
NicolasRx
  • 29
  • 5
1 2 3
14
15