guigzzz / keras-yolo-v2 Goto Github PK
View Code? Open in Web Editor NEWKeras re-implementation of Yolo v2 Object Detection
Keras re-implementation of Yolo v2 Object Detection
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?
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.
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
.
I have seen other loss functions implemented, yours is more similar to that of Yolo V1, my question is:
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
thanks a lot! :D
I started the training however after certain epochs i am getting loss NaN . just before getting nan the loss was converging .
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.