BrainCore icon indicating copy to clipboard operation
BrainCore copied to clipboard

Add ability to import Caffe networks

Open alejandro-isaza opened this issue 10 years ago • 13 comments

I don't think we should add all of Protobuf but maybe have a script that converts a caffe prototxt into simpler format. Then have that simpler format be the standard BrainCore network definition format.

alejandro-isaza avatar Oct 24 '15 15:10 alejandro-isaza

@aleph7 Are you thinking JSON? Or something even lighter? Take a look at msgpack.org

aidangomez avatar Oct 24 '15 20:10 aidangomez

I was thinking YAML

-
    name: ip1
    type: Inner Product
-
    name: relu1
    type: ReLU
    sources: [ip1]

alejandro-isaza avatar Oct 24 '15 22:10 alejandro-isaza

Ooo very nice.

aidangomez avatar Oct 25 '15 19:10 aidangomez

Any news on that? Will love to use Caffe models with BrainCore. :+1:

hartator avatar Apr 09 '16 21:04 hartator

@hartator this is not a priority for us right now, hence the 'help wanted' tag.

alejandro-isaza avatar Apr 10 '16 17:04 alejandro-isaza

you maybe able to cherry pick from this code https://github.com/naru-hiyoko/simple-cnn-swift

https://github.com/noradaiko/caffe-ios-sample

johndpope avatar May 12 '16 20:05 johndpope

https://github.com/DeepLearningKit/caffemodel2json could maybe help

jrimestad avatar May 26 '16 08:05 jrimestad

@aleph7 since BrainCore primary target is mobile, wouldn't it be more reasonable to drop json/yaml and go with binary protobuf, to avoid processing overhead?

skeeet avatar Aug 10 '16 17:08 skeeet

@skeeet yes, that would be good but I don't want to force people to get all the protobuf dependencies just to use BrainCore. Maybe that can be a separate project.

alejandro-isaza avatar Aug 17 '16 02:08 alejandro-isaza

Maybe we should just read protobuf now that https://github.com/apple/swift-protobuf-plugin is out!

alejandro-isaza avatar Sep 27 '16 17:09 alejandro-isaza

Hi, I'm wondering if this is still an ongoing update to BrainCore still? I'm interested in possibly helping to contribute but I'm not sure where to get started.

Thanks!

thomashocking avatar Jan 30 '17 20:01 thomashocking

If you want to contribute reading protobuf models I would suggest starting with caffe's protobuf definition. Try to to generate the Swift code for that with with swift-protobuf on a project by itself. Then try generating BrainCore layers from that. If you get that working on a separate repo I'd be happy to integrate it to BrainCore.

ghost avatar Jan 30 '17 20:01 ghost

Great thanks, I'll take a look at it.

thomashocking avatar Feb 15 '17 00:02 thomashocking