Code Monkey home page Code Monkey logo

Comments (5)

vincrichard avatar vincrichard commented on August 29, 2024 1

There is no test code in itself, at each epoch the model create and save all the validation images. At the end of the training you can use the weight of the model and load it in your own code to infer new images.

from efficientps.

nmddc0211 avatar nmddc0211 commented on August 29, 2024 1

After looking at the code for some time, I think the features that you extracted for the Instance object (based on detectron2) are binary masks, the corresponding class and the bbox. The Instance object holds not only one instance but all the instances of the thing classes of one image.
# Create same size of bbox and mask instance
if len(rpn_bbox) > 0:
rpn_bbox = coco_to_pascal_bbox(np.stack([*rpn_bbox]))

        instance.gt_masks = BitMasks(np.array(instance_mask))
        instance.gt_classes = torch.as_tensor(instance_cls)
        instance.gt_boxes = Boxes(rpn_bbox)
    else:
        instance.gt_masks = BitMasks(torch.Tensor([]).view(0, 1, 1))
        instance.gt_classes = torch.as_tensor([])
        instance.gt_boxes = Boxes([])

instance_mask, instance_cls, rpn_bbox are basically the lists which contain the features of the thing instances. They have the same length (which is the number of thing instances) and the same index corresponds to the same one instance.

from efficientps.

kashifibnaejaz avatar kashifibnaejaz commented on August 29, 2024

thanks a lot

from efficientps.

kashifibnaejaz avatar kashifibnaejaz commented on August 29, 2024

Hey, thanks a lot for helping me last time
please could you explain in which part of the code you are producing instances
IN INSTANCE HEAD
def forward(self, inputs, targets={}):
27 losses = {}
---> 28 proposals, losses_rpn = self.rpn(inputs, targets['instance'])
29 if self.training:
30 _, losses_head = self.roi_heads(inputs, proposals, targets['instance'])
it's showing error when i test the image. if i am not wrong, are the annotations instances?
in which part of the code model produces instance images

from efficientps.

vincrichard avatar vincrichard commented on August 29, 2024

Hello,
Do you mean the target instances ?
This is in the panoptic_dataset.py file, starting from here I am extracting the instance information from the dataset and creating an Instance object which is base on Detectron2.

After I don't remember quite well the processing I made but I extracted the feature from the dataset to create this object. which is stored in target['instance']

from efficientps.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.