Giter VIP home page Giter VIP logo

obb-yolov3's People

Contributors

feifeiwei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obb-yolov3's Issues

TypeError: can't convert np.ndarray of type numpy.object_.

Hello there
Thanks for your OBB detector, I've started working with it and I'm very excited to see the results.
That being said, I have an issue with the training, the error is the following :

TypeError: can't convert np.ndarray of type numpy.object_. The only supported types are: float64,
float32, float16, int64, int32, int16, int8, uint8, and bool.

It happens during the model's forward pass, when trying to create the grid indexes

Full stack :


 /usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:2416: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
  warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-218-382ae974e2fb> in <module>()
      9         optimizer.zero_grad()
     10 
---> 11         losses = model(imgs,targets)  #[loss,x,y,w,h,conf,cls]
     12 
     13         loss = losses[0]

4 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    530             result = self._slow_forward(*input, **kwargs)
    531         else:
--> 532             result = self.forward(*input, **kwargs)
    533         for hook in self._forward_hooks.values():
    534             hook_result = hook(self, input, result)

/content/OBB-YOLOv3/module/model.py in forward(self, x, target)
     96 
     97         if target is None:
---> 98             detections = self.detection(out1, out2, out3)
     99             return detections
    100         else:

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    530             result = self._slow_forward(*input, **kwargs)
    531         else:
--> 532             result = self.forward(*input, **kwargs)
    533         for hook in self._forward_hooks.values():
    534             hook_result = hook(self, input, result)

/content/OBB-YOLOv3/module/layers.py in forward(self, fms, targets)
    103                                                                                                fm_size,
    104                                                                                                self.ignore_threshold,
--> 105                                                                                                self.num_classes)
    106         mask, conf_mask = mask.byte().cuda(), conf_mask.byte().cuda()
    107         tx, ty = tx.cuda(), ty.cuda()

/content/OBB-YOLOv3/module/util.py in get_target(target, anchors, g_dim, ignore_threshold, num_classes)
    137             gw = max(target[b,t,[0,2,4,6]] * g_dim) - min(target[b,t,[0,2,4,6]] * g_dim)
    138             gh = max(target[b,t,[1,3,5,7]] * g_dim) - min(target[b,t,[1,3,5,7]] * g_dim)
--> 139 
    140             # Get shape of gt box
    141             gt_box = torch.FloatTensor(np.array([0, 0, gw, gh])).unsqueeze(0)

TypeError: can't convert np.ndarray of type numpy.object_. The only supported types are: float64, float32, float16, int64, int32, int16, int8, uint8, and bool.

Do you have an idea what could fix this issue?
Thank you for your time and your work!

能提供能跑的代码吗

你发布的这个版本的代码好像有点问题,代码的非极大抑制是正框的还是斜框,网络输出8个点,但非极大抑制用的不是这8个点。还有iou的计算,是针对正框的iou

Could you please provide with the missing files?

For example the darknet53.pth file is missing. I tried to download it from the internet from a different source but the name of the keys in the dict are different. Also, there are some missing files to run the demo.py. Could you at least provide the link to the darknet53.pth file that you are using so that I can train your network on my own data without editing the weight file?

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.