hollance / YOLO-CoreML-MPSNNGraph

Tiny YOLO for iOS implemented using CoreML but also using the new MPS graph API.
MIT License
935 stars 252 forks source link

Why is the feature set 255x13x13 ? #53

Closed prateethvnayak closed 5 years ago

prateethvnayak commented 5 years ago

I am trying to fit in a model trained on the VOC dataset with 20 classes. Can you quickly point me to the necessary changes ?

The changes I did so far are:

  1. Change the label and anchor in Helpers.swift
  2. Change the input and output name for the model built in YOLO.swift
  3. Changed numClasses to 20 in YOLO.swift

Not sure about what the gridHeight and gridWidth variables represent. Arent they a single value. My final predictions are 13x13x125.

hollance commented 5 years ago

Here you can read about what the grid represents: https://machinethink.net/blog/object-detection/

prateethvnayak commented 5 years ago

@hollance Sorry for the nuance question. I figured it out. I am using tiny-yolov2 hence I have only a single output and the 3-dimension are for yolov3.

But can you just point me out how you got very high anchor boxes value ? I am getting an exception on that point. Like the original Darknet cfg files have anchor boxes in decimals. Did you scale them by 100 ?

Thanks

hollance commented 5 years ago

Those anchor boxes were taken from the Keras version. It’s possible they have changed since I wrote this code 2 years ago.