Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LMDB multidim labels #4

Open
AlexTS1980 opened this issue Mar 10, 2017 · 4 comments
Open

LMDB multidim labels #4

AlexTS1980 opened this issue Mar 10, 2017 · 4 comments

Comments

@AlexTS1980
Copy link

I created train and test datasets with each entry looking like:

/Data/train/00001.png 347.0 178.0 408.0 283.0

where the four digits are bounding box values (x,y,h,w) of a bounding box. The label file was created, where every label entry looked like this:

<type 'numpy.int64'>
channels: 1
height: 1
width: 4
float_data: 347
float_data: 178
float_data: 408
float_data: 283

When training in caffe, I added a 4-neuron fully connected layer at the very end (before the error function) with relu activator. Is this the correct way of doing things? I get a huge error. Caffe reports a seemingly correct shape:

I0310 11:05:16.992735 4867 net.cpp:86] Creating Layer relu_fc8_cows
I0310 11:05:16.992741 4867 net.cpp:408] relu_fc8_cows <- fc8cows
I0310 11:05:16.992748 4867 net.cpp:369] relu_fc8_cows -> fc8cows (in-place)
I0310 11:05:16.993499 4867 net.cpp:124] Setting up relu_fc8_cows
I0310 11:05:16.993512 4867 net.cpp:131] Top shape: 1 4 (4)

@sukritshankar
Copy link
Owner

sukritshankar commented Mar 10, 2017 via email

@AlexTS1980
Copy link
Author

I'm sorry, I don't understand why label values have to be between 0 and 255? If a label in my case is (x,y,h,w) bouding box parameters, for example?

@sukritshankar
Copy link
Owner

You just have to scale the values of your bounding box parameters to a range [0,255]. Internally since we are using a data layer for labels, Caffe rescales it by 255, so that will be your correct numbers then !! In a nutshell, you can have any range of your values, just scale it to [0,255] for inputting purposes !!

@AlexTS1980
Copy link
Author

But this means most numbers will be fractional. This is a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants