xiaoyuhao / ssd-detection Goto Github PK
View Code? Open in Web Editor NEWssd detector use backbone as VGG、MobileNetV1、MobileNetV2、MobileNetV3
ssd detector use backbone as VGG、MobileNetV1、MobileNetV2、MobileNetV3
你好,请问运行的torch版本是多少
您给出的文件里没有SeaShipsDataset的代码。能麻烦你给出吗
我在config.py里修改了自己的labels,是俩个类,在dataset生成的json文件里,lable_map.json中也是加上背景的三类,可是不管是TEST_objects还是TRAIN_objects.json中,labels都只有其中的一类,且生成的图片数目也不对,就像是包含另一类的图片都没有被放入json文件中,我确定我的数据集没问题,我不知道该如何解决这个问题
我将训练得到的模型转换成了onnx模型和caffe模型,并利用opencv的dnn模块读取,代码如下:
import numpy as np
import cv2 as cv
net = cv.dnn.readNet('mobilenet_ssd.onnx')
img = cv.imread('0000012.jpg')
rows, cols = img.shape[0:2]
inp = cv.dnn.blobFromImage(img, 1.0, (300, 300), mean=(123, 117, 104), swapRB=True)
net.setInput(inp)
out = net.forward()
print(out.shape)
for detection in out[0,0,:,:]:
score = float(detection[2])
if score > 0.7:
xmin, ymin, xmax, ymax = [int(v) for v in detection[3:] * [cols, rows, cols, rows]]
cv.rectangle(img, (xmin, ymin), (xmax, ymax), (23, 230, 210), thickness=2)
cv.imshow('Object detection', img)
cv.waitKey()
但是报错 for detection in out[0,0,:,:]:
IndexError: too many indices for array
我发现out = net.forward()中的out.shape是(1, 2268, 3),这和out[0,0,:,:]肯定是对不上的,但是我创建的blob确实是4D的啊
你知道这是为什么吗?
我在运行train时出现了这个错误,我想问题出在75行 with torch.no_grad():
for i, (images, boxes, labels, difficulties) in enumerate(val_loader):中的val_loader身上,你知道这该如何解决吗
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.