Yuliang-Liu / Curve-Text-Detector

This repository provides train&test code, dataset, det.&rec. annotation, evaluation script, annotation tool, and ranking.
639 stars 155 forks source link

caffe compiling problem:box_annotator_ohem_layer.cu(50): error: a template argument may not reference a local type #23

Closed wenston2006 closed 5 years ago

wenston2006 commented 5 years ago

I met a problem during compiling caffe, I post the screenshot image as below. The problem is "box_annotator_ohem_layer.cu(50): error: a template argument may not reference a local type"; I add "-std=C++11" in makefile of caffe, however , the problem is still there. So have you met the problem during compiling caffe?

I use Ubuntu16.04, cuda9.0, cudnn7.0.3; screenshot from 2018-12-13 14-27-54

Yuliang-Liu commented 5 years ago

See if this helps:

"box_annotator_ohem_layer uses C++11 features, you need to make changes to the makefile"

modified makefile:

ifeq ($(DEBUG), 1)

COMMON_FLAGS += -DDEBUG -g -O0 -std=c++11
NVCCFLAGS += -G

else

COMMON_FLAGS += -DNDEBUG -O2 -std=c++11

endif

From:https://blog.csdn.net/Bankeey/article/details/77573860

Have you maked clean before you recomplied the caffe? It seems you have built on your own caffe, and I recommend you to use the caffe of this repository to avoid some unpredictable issues because we have modified many things of the caffe.

wenston2006 commented 5 years ago

Thank you for your reply!I'll have a try.

FakerYFX commented 5 years ago

i meet the same question,have you solved it? @wenston2006