feifeiwei / obb-yolov3 Goto Github PK
View Code? Open in Web Editor NEWan oriented bounding boxes implement of YOLOv3
License: MIT License
an oriented bounding boxes implement of YOLOv3
License: MIT License
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!
When i run train.py, i bacame the error like in the titel.
Where can i found the darkNet53.pth?
Dear friend, I want to run this demo for my own dataset, but i lock of the "pth" file, Can provide the "dota_ckpt6.pth"of runing the demo.py?
Thank you!
你发布的这个版本的代码好像有点问题,代码的非极大抑制是正框的还是斜框,网络输出8个点,但非极大抑制用的不是这8个点。还有iou的计算,是针对正框的iou
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.