-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Run coco panoptic dataset #337
Comments
Hi, This will require a few changes. Here is what I would do: Create a Target classCurrently, we only have target classes which correspond to boxes or regions, and they all are tied to a This will also require writing a Modify the implementations to get the
|
proposals, proposal_losses = self.rpn(images, features, targets) | |
if self.roi_heads: | |
x, result, detector_losses = self.roi_heads(features, proposals, targets) |
and instead have something like
region_targets = targets.regions # this is a Target instance, get the BoxList from it
proposals, proposal_losses = self.rpn(images, features, region_targets)
if self.roi_heads:
x, result, detector_losses = self.roi_heads(features, proposals, region_targets)
Make datasets return a Target
This should be fairly easy, and consists of adding after
target = target.clip_to_image(remove_empty=True) |
something like
target = Target(region=target)
I believe this is pretty much it for the changes to the library.
Add your own modifications to handle panoptic task
The rest is actually up to you on how you'll handle it, as it's still an open research question.
Let me know what you think, I'd me more than happy to merge a PR which implements what I've mentioned just above!
Thank you for your response! I guess I also need to modify the to load panoptic annotations since its JSON file format is different with coco detection, right? |
Yeah, definitely, you need to have the full segmentation mask there, as well as adding extra branches in your model etc. I was explaining the changes that were necessary only for the current detection approach to still be valid, while enabling users to build on top of it in order for panoptic segmentation to work |
Hello @fmassa I've been trying to get semantic segmentation to work but I'm running into trouble while computing the loss function. Assuming my image is 880 by 800 in height and width. The number of semantic segmentation classes is 2 and batch size is 4. My predicted mask is of size 4, 2, 800, 800.
I'm using the cross entropy loss function to calculate the loss of the predicted mask. However the Panoptic FPN paper tells us to only compute the loss over positive labels( the ones having label 1 in this case). I'm having trouble with this step, how should I compute this loss in Pytorch code ? Any help would be really appreciated ! Regards, |
Hi,
I'm trying to do some experiments about panoptic segmentation on the coco-panoptic dataset. Which files should I change to let the data load function can distinguish object and stuff classes?
Thank you!
The text was updated successfully, but these errors were encountered: