Skip to content

About

Improving Object Classification using Pose Information

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pose Embedding: Improving Object Classification using Pose Information

This repository contains the code used for the experiments in the research report:

Improving Object Classification using Pose Information Hugo Penedones, Ronan Collobert, FranΓ§ois Fleuret, David Grangier Idiap Research Report Idiap-RR-30-2012, November 2012 https://hpenedones.me/publications/Penedones_Idiap-RR-30-2012.pdf

Overview

We investigate whether pose information can be used as a regularizer to improve object classification. The key idea is to train neural networks in a multi-task learning setup, where the network simultaneously predicts:

  1. The object class (classification task)
  2. The camera azimuth (pose estimation task)

The hypothesis is that forcing the network to learn a pose-aware representation will produce smoother, more generalizable features β€” and ultimately reduce classification error.

Experiments are conducted on the small-NORB dataset (LeCun et al., 2004), a collection of 24,300 stereo images of 50 toy objects across 5 categories, photographed at varying azimuths, elevations, and lighting conditions. NORB is well-suited for this study because it provides ground-truth pose labels and the texture-less objects require shape-based reasoning.

Key results

The multi-task approach consistently outperforms the single-task baseline:

Classifier Input Test error
Linear (baseline) raw 2Γ—96Γ—96 30.2%
1-NN (baseline) PCA 95 16.6%
SVM Gaussian (baseline) PCA 95 13.3%
MLP + pose (multi-task) raw 2Γ—96Γ—96 ~12.0%
Conv Net 80 (baseline) raw 2Γ—96Γ—96 6.6%
Conv Net + pose (multi-task) raw 2Γ—96Γ—96 ~5.4%

Adding pose supervision reduced the convolutional network error from 6.6% to ~5.4%, and improved the MLP from ~13% (SVM level) down to ~12% β€” without any changes to the network architecture or hand-crafted features.

Pose loss functions

The network's pose output for class y is a 2D vector g_y(x). Predicting a 2D vector (rather than a scalar angle) avoids boundary issues and naturally handles the 180Β° symmetry of the NORB data. Two loss functions are explored:

  • Cosine loss: maximizes the cosine similarity between the predicted vector and r(ΞΈ) = (cos ΞΈ, sin ΞΈ).
  • L1/L2 regression loss: forces the predicted vector to have unit norm, which is more robust to numerical issues.

Repository Structure

pose_embedding/
β”œβ”€β”€ data_utils/          # Dataset preparation (NORB, synthetic, faces, letters)
β”œβ”€β”€ embedder/            # Core neural network trainer (multi-task learning)
β”œβ”€β”€ includes/            # Shared Lua modules (utilities, dataset loading, visualization)
β”œβ”€β”€ norb-baseline/       # NORB-specific baselines (ranking, angle regression, push-based)
β”œβ”€β”€ pose_corrector/      # Pose-corrected classifier variants
β”œβ”€β”€ sge/                 # SGE grid engine job submission scripts
└── sketchup_scripts/    # Ruby scripts to render synthetic 3D training data via SketchUp

embedder/

The main training code. embedder.lua trains a neural network with a combined classification + pose regression loss using Torch7 and stochastic gradient descent (backpropagation).

norb-baseline/

Several baseline approaches for the NORB dataset:

  • embedd.lua β€” standard embedding
  • embedd-angle.lua β€” angle regression
  • embedd-rank.lua β€” ranking-based embedding
  • embedd-with-push.lua β€” push-based contrastive embedding
  • Custom criteria: AngleCriterion.lua, Atan2Criterion.lua, DistanceCriterion.lua

pose_corrector/

Experiments with lookup-table layers (LookupSpatialConvolution.lua, LookupLinear.lua) to learn pose-conditioned classifiers, along with modulo-aware rotation criteria (ModuloRotationCriterion.lua).

data_utils/

Scripts to load and preprocess NORB (including a MATLAB extractor), generate synthetic datasets from SketchUp 3D models, and create angle-predictor training sets.

sketchup_scripts/

Ruby scripts (get_view.rb, norb_view.rb) that automate SketchUp to render 3D objects at controlled azimuths and elevations, enabling synthetic data augmentation.

Dependencies

  • Torch7 β€” deep learning framework (Lua)
  • SketchUp β€” 3D modeling (for synthetic data generation)
  • MATLAB β€” for NORB data extraction

Authors

  • Hugo Penedones (Idiap Research Institute)
  • Ronan Collobert (Idiap Research Institute)
  • FranΓ§ois Fleuret (Idiap Research Institute)
  • David Grangier (NEC Laboratories, Princeton)

About

Improving Object Classification using Pose Information

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages