Giter Club home page Giter Club logo

darknet.keras's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

darknet.keras's Issues

the shape of label and the output of the layer is different

I run the TrainYolo.py and using Tensorflow as keras backend, howerver i get exception:
Exception: Error when checking model target: expected dense_3 to have shape (None, 1470) but got array with shape (16, 1225)
the shape of label and the output of the layer is different.

Fine Tuning

How to fine tune your model?
I don't have sufficient data to retrain your model from scratch.
I want to fine tune your model on my data which has only two classes ?

loading weights issue

Hi, I have downloaded yolo-tiny.weights and put it into folder 'weights'.

Then happens an ERROR:
Using Theano backend.
Traceback (most recent call last):
File "RunTinyYOLO.py", line 194, in
yoloNet = ReadTinyYOLONetWeights(os.path.join(os.getcwd(),'weights/yolo-tiny.weights'))
File "D:\DeepLearningProgram\Darknet.keras-master\utils\TinyYoloNet.py", line 80, in ReadTinyYOLONetWeights
l.biases = np.asarray(testArray[0][count])
IndexError: index 0 is out of bounds for axis 0 with size 0

And I check file 'TinyYoloNet.py', def 'ReadTinyYOLONetWeights', the 'testArray' variable is [] (null) with many many dtype.

What is the problem ??

1225 parameters in the last layer

Hi, there are supposed to be 1470 parameters in the last layer of Yolo-Tiny. But when I do a model.summary(), there are 1225 parameter, which is giving me an out of bounds error when I try to do detection with it.

Exception when trying to run code

I followed the instructions but I can not run code
I got the following
line 80, in ReadTinyYOLONetWeights
l.biases = np.asarray(testArray[0][count])
IndexError: index 0 is out of bounds for axis 0 with size 0

Runtime evaluation

@sunshineatnoon Hi, could you please report your average runtime per each image when you run the yolo-tiny network? And which graphic card did you use on it? Thanks !!

Building yolo-tiny on tensorflow

Dear @sunshineatnoon your repo is really cool,
after using the crop function in utils, I tried to feed the image into the net I built in tensorflow as follows:

class SimpleNet(object):
    def __init__(self, yolo):

        self.input_x = tf.placeholder(tf.float32, 
            [None, 448, 448, 3], name = "input_x")

        now = self.input_x
        for i in range(yolo.layer_number):
            l = yolo.layers[i]
            if (l.type == "CONVOLUTIONAL"):
                now = tf.nn.conv2d(
                    now,
                    tf.Variable(l.weights.transpose([2,3,1,0])),
                    strides = [1,1,1,1],
                    padding = "SAME")
                now = tf.nn.bias_add(now, tf.Variable(l.biases))
                now = tf.maximum(0.1 * now, now)
            elif l.type == 'MAXPOOL':
                now = tf.nn.max_pool(now,
                    ksize = [1,2,2,1],
                    strides = [1,2,2,1],
                    padding = "SAME")
            elif l.type == 'FLATTEN':
                now = tf.reshape(now, 
                    [-1, int(np.prod(now.get_shape()[1:]))])
                print ('add flat')
            elif l.type == 'CONNECTED':
                now = tf.nn.xw_plus_b(now,
                    tf.Variable(l.weights),
                    tf.Variable(l.biases))
            elif l.type == 'LEAKY':
                now = tf.maximum(0.1 * now, now)
            elif l.type == 'DROPOUT':
                pass
        self.out = now

And then try to feed the image into the net as follows:

                image = crop(img,resize_width=512,resize_height=512,new_width=448,new_height=448)
        image = image.transpose([1,2,0])
        image = np.expand_dims(image, axis = 0)
        feed_dict ={
            model.input_x: image
        }
        timer = Timer()
        timer.tic()
        out = sess.run([model.out], feed_dict)[0]

Can you help me why is it that for the same input image our nets produce different results (out != predictions) and yours seem to be correct one, I have double checked the net construction in tensorflow above and cannot find any mis-correspondence between our nets.

Thank you.

doesn't work

return empty list from np.fromfile at TinyYoloNet.py, ReadTinyYOLONetWeights. line 76

how to fix it?

screenshot from 2017-06-22 22-06-18

Changes in ReadTinyYOLONetWeights

I'm not sure what changes have to be made to ReadTinyYOLONetWeights to use the updated weights. Can I still download the old weights? Or what changes do I have to make to the function?

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.