Giter Club home page Giter Club logo

ssd-detection's People

Contributors

xiaoyuhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ssd-detection's Issues

环境

你好,请问运行的torch版本是多少

您好,我发现了创建json文件上的一个问题

我在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的啊
你知道这是为什么吗?

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.