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

what does main_dir contain? #11

Open
sawsenrezig opened this issue Apr 30, 2018 · 1 comment
Open

what does main_dir contain? #11

sawsenrezig opened this issue Apr 30, 2018 · 1 comment

Comments

@sawsenrezig
Copy link

Hello,
I was using the oralign1d in the pythorch implementation like this:
x, main_dir = oralign1d(x, self.nOrientation, True)
main_dir is a vector of 80 size of values in [0, 7], can you tell what do this values and their positions mean? and how can I use this information to get the dominate orientation in the image?

@ZhouYanzhao
Copy link
Owner

@sawsenrezig
Hi, the main point of ORConvs is to enable CNNs to explicitly encode orientation information into its weights (ARFs) as well as feature maps. Therefore in ORN, we can perform the ORAlign operation on the feature maps of the top convolution layer, i.e., raw ORN features, to obtain rotation robust ORN features.

In your case, the feature of the shape of 80 x 8 (nChannel x nOrientation) shows that the ORN extracts the response strength of 80 discriminative structures (learned from data) in 8 different directions (0°, 45°, 90°, etc.) on the image. So we can calculate the dominant orientation (index is within [0, 7]) for each structure and align the feature as in SIFT (see Sec 3.4 in the paper for more details).

Note that ORAlign is for the cases we want rotation-invariant representation, e.g., image classification. If you need to estimate the orientation of the image or objects, you should use the raw ORN features directly (see Sec 4.2 in the paper).

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