gustavla / autocolorize

Automatic colorizaton of grayscale images using Deep Learning
BSD 3-Clause "New" or "Revised" License
220 stars 65 forks source link

Training - missing bgr_to_hsv_layer.hpp #6

Closed AlverGant closed 7 years ago

AlverGant commented 7 years ago

Hi,

I had no problems compiling caffe with GPU support and running your pip package to colorize some images, by the way congratulations for your work, deep learning colorization is really awesome!

On the training code, apparently "bgr_to_hsv_layer.hpp" include is missing. Also I had to uncomment SoftmaxKLDLossParameter and SparseHistogramExtractorParameter on LayerParameter in order to try to recompile caffe.

Best regards

gustavla commented 7 years ago

I have added the missing file. Thanks for letting me know!

I'm not sure I understand your second problem though. You will have to uncomment all of those lines and place them inside the LayerParameter message block.

AlverGant commented 7 years ago

Hi, Thank you!

I am still having problems trying to recompile caffe though. I am getting the following errors on LayerParameter gustav_larson_colorizer.txt :

caffe.proto:318:10: "DropPathParameter" is not defined. caffe.proto:319:10: "FractalJoinParameter" is not defined. make: *** [.build_release/src/caffe/proto/caffe.pb.h] Error 1

The steps that I am using are attached

If the above parameters are commented out, compilation fails further down the road on:

In file included from src/caffe/layers/extended_image_data_layer.cpp:18:0: ./include/gason.h:32:5: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat] JsonValue(JsonTag tag = JSON_NULL, void payload = nullptr) { ^ In file included from src/caffe/layers/extended_image_data_layer.cpp:18:0: ./include/gason.h:32:56: error: ‘nullptr’ was not declared in this scope JsonValue(JsonTag tag = JSON_NULL, void payload = nullptr) { ^

I've got gason.h include from MS COCO API as well as maskApi.h

Sorry for the trouble, it seems I am missing something.

gustavla commented 7 years ago

The first issue was two lines that had accidentally snuck in. Removing them was the right call. I have also pushed a change for this.

For the second, I think I forgot the instructions to add the following to the Makefile around line 204:

LIBRARIES += matio maskApi gason boost_filesystem                                                                    
CXXFLAGS += -std=c++11
AlverGant commented 7 years ago

Great, going forward but still stuck on extended_image_data_layer.cpp

src/caffe/layers/extended_image_data_layer.cpp: In instantiation of ‘void caffe::ExtendedImageDataLayer::DataLayerSetUp(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = float]’: src/caffe/layers/extended_image_data_layer.cpp:703:1: required from here src/caffe/layers/extended_image_data_layer.cpp:574:21: error: ‘class caffe::ExtendedImageDataLayer’ has no member named ‘PREFETCH_COUNT’ for (int i = 0; i < this->PREFETCH_COUNT; ++i) { ^ Please help!

kenshinzh commented 7 years ago

we net the same issue~ any suggestion?

abhaymittal commented 7 years ago

I am also stuck on the same issue, PREFETCHCOUNT and iter are not there (#7)

gustavla commented 7 years ago

@abhaymittal It looks like there are quite a few issues with getting ExtendedImageDataLayer on the current Caffe master. However, I don't think any of the features in this layer are necessary for colorization, so I might just remove it from this repository and update examples and files to work without it. Feel free to just remove that file and re-compile to get it running.