unsupervised-video icon indicating copy to clipboard operation
unsupervised-video copied to clipboard

Request for sample codes generating segmentation result

Open sehyun03 opened this issue 7 years ago • 1 comments

I tried to do inference on trained motion segmentation model with motionSegmenter_fullModel.t7. However I could not find any input loader or sample inference codes. I only found following piece of inference method code that seems not be able to run.

-- function: inference (used for full scene inference)
function DeepMask:inference()
   self:cuda()
   utils.linear2convTrunk(self.trunk,self.fSz)
   self.trunk:evaluate()
   self.trunk:forward(torch.CudaTensor(1,3,800,800))
   if self.flow then
      utils.linear2convHead(self.flowBranch)
      self.flowBranch:evaluate()
      self.flowBranch:forward(torch.CudaTensor(1,512,300,300))
      return
   end

   utils.linear2convHead(self.maskBranch.modules[1])
   self.maskBranch = self.maskBranch.modules[1]
   self.maskBranch:evaluate()
   self.maskBranch:forward(torch.CudaTensor(1,512,300,300))

   if self.color then
      utils.linear2convHead(self.colorBranch)
      self.colorBranch:evaluate()
      self.colorBranch:forward(torch.CudaTensor(1,512,300,300))
   else
      utils.linear2convHead(self.scoreBranch)
      self.scoreBranch:evaluate()
      self.scoreBranch:forward(torch.CudaTensor(1,512,300,300))
   end
end

could you provide sample codes for inference(generating segmentation mask from trained DeepMaskAlexNet) or explain how to do it. Thanks.

sehyun03 avatar Oct 26 '18 14:10 sehyun03

@sehyun03 have you soloved it?

Ai-is-light avatar Oct 29 '19 04:10 Ai-is-light