Closed Zzmc closed 7 years ago
You don't need to touch FloatBlob and FloatArray.
DataFrame source supports array labels. You probably should use CoS layer on the caffe side. data source, CoS layer, and an example.
@junshi15 thanks for you answer, i have saw the CoSlayer ,but i still have some questions.my labels is not for basic classification(it's not 0 or 1),it is a new data type(DetectGroupLabel,creat by myself),for example, { "date": [ { "group_lable": 2, "Annotation": [ { "id": 0, "bbox": { "Xmin": 0.16145833, "Ymin": 0.28796297, "Xmax": 0.22916667, "Ymax": 0.39907408, "label": 0, "diffcult": false, "score": 0, "size": 0 } }, { "id": 1, "bbox": { "Xmin": 0.3359375, "Ymin": 0.24166666, "Xmax": 0.4484375, "Ymax": 0.31111112, "label": 0, "diffcult": false, "score": 0, "size": 0 } } ] }, { "group_lable": 5, "Annotation": [ { "id": 0, "bbox": { "Xmin": 0.63489586, "Ymin": 0.19537038, "Xmax": 0.659375, "Ymax": 0.23703703, "label": 0, "diffcult": false, "score": 0, "size": 0 } }, { "id": 1, "bbox": { "Xmin": 0.44895834, "Ymin": 0.21203704, "Xmax": 0.47291666, "Ymax": 0.26944444, "label": 0, "diffcult": false, "score": 0, "size": 0 } } ] } ] } and the CoSlayer is not suit for my require, i need do complex data transform,so i creat my own layer for R-FCN, but when i send the data to FloatBlob an FloatArray, it's not suit my data type,FloatBlob and FloatArray just only suit Float data type ,but my data type is DetectGroupLabel(it's created in Caffe.proto: "repeated DetectGroupLabel detection_group = 3;"),so what shold i do now? Is my idea wrong ?
Spark data frame does not accept protobuf messages. If you can change your label to float array, then you may be able to use CoS layer.
In your example above, if you can convert your data to the following, then maybe you can use CoS layer, but you will have to modify CoS layer to parse the array to its original fields, for example, the first 2 is group label, the next 0 is id, then Xmin, etc. 2, 0, 0.16145833, 0.28796297, 0.22916667, 0.39907408, 0, 0, 0, 0, 1, 0.3359375, 0.24166666, 0.4484375, 0.31111112, 0, 0, 0, 0,...
@junshi15 Thanks for your suggestion,i will try it.
hello everyone, I'm trying to modify the source code,i want to make the CaffeOnSpark run R-FCN. i have done most source code ,but i don't know how to change the soure code FloatBlob and FloatArray.i don't know what the role of FloatBlob and FloatArray.Should i creat new Blobs suit my labels(it's not a simple label,it's a Array, there is a lot of data).if not ,what should i do? And how to understand the role of FloatBlob and FloatArray?