Coder Social home page Coder Social logo

keras-yolo-v2's People

Contributors

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

Watchers

 avatar  avatar  avatar

keras-yolo-v2's Issues

Changing the batch size and number of labels.

I am attempting to train a custom model with TinyYOLOv2, however when I replace the batch size and label count on the trainnet = TinyYOLOv2(13 * 32, batch_size, num_classes, is_learning_phase=True) call I get the following error when the model is being created:

  File "/test/yolo2/tiny_yolo_v2.py", line 24, in __init__
    self.m = self.buildModel()
  File "/test/yolo2/tiny_yolo_v2.py", line 50, in buildModel
    )(model)
  File "/test/venv/lib/python3.7/site-packages/keras/engine/base_layer.py", line 474, in __call__
    output_shape = self.compute_output_shape(input_shape)
  File "/test/venv/lib/python3.7/site-packages/keras/layers/core.py", line 398, in compute_output_shape
    input_shape[1:], self.target_shape)
  File "/test/venv/lib/python3.7/site-packages/keras/layers/core.py", line 386, in _fix_unknown_dimension
    raise ValueError(msg)
ValueError: total size of new array must be unchanged

My guess is i would need to change how the Reshape layer is added, what could I change to make it work?

Loss function input shape

Hello, i was wondering why the input shape to loss function is (13, 13, 5, 25), and you opt to leave out batch dimension, or am i looking at it wrong? I see ProcessGroundTruth returns y_true of shape (13, 13, 5, 25) which is input to loss function. In general, y_true and y_pred in loss function are going to have batch_size as their first dimension, or in this case number_of_samples/steps_per_epoch.

Train TinyYOLOv2 from scratch

Hi,
I am trying to train the TinyYOLOv2 model with VOC07 dataset. I've defined the function to fetch bounding boxes and labels for all the training images. But after fitting the model the output returns empty arrays when I make tiny.m.forward(image)[0] for a test image.

The training set is (318, 416, 416, 3) and the y_true is (318, 13, 13, 5, 25).

Am I doing something wrong? During fitting the loss information per epoch was always NaN.

Quastions about Loss

I have seen other loss functions implemented, yours is more similar to that of Yolo V1, my question is:

  1. Why not use categorical crosss entrophy in class predictions ?
  2. In the IoU filter, maked in the computation of noobjs_loss you put that
    higthst_iou = tf.math.reduce_max(iou, axis=-1)
    mask = (tf.cast(higthst_iou < 0.6, dtype=tf.float32)[..., None] * (1 - true_object)) # noobj mask
    but, if we have to penalize higest IoU, why put < 0.6 and not > 0.6

thanks a lot! :D

Getting Nan after certain epochs

I started the training however after certain epochs i am getting loss NaN . just before getting nan the loss was converging .

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.