(j, j + 25);
     int *hist = uniform_circular_LBP_histogram(new_mat);
     int z;
     for (z = 0; z < 58; z++) {
       std::cout << hist[z] << ",";
     }
     std::cout << hist[z] << "\n";
     count += 1;
   }
 }
 return 0;
}

ROC for the same:

I also did a rank based experiment. And got this CMC curve.

Some details about the CMC curve: X axis represents ranks. (1-10) and Y axis represents the accuracy (0-1). So, I got a 80%+ Rank1 accuracy.

A:

I don't know about python but most probably your code is broken.
My advice is, follow these 2 links, and try to port one of the C++ codes to python. First link also contains some information about LBP.
http://www.bytefish.de/blog/local_binary_patterns/
https://github.com/berak/uniform-lbp
And one other thing I can say, you said you are resizing images into 200x200. Why are you doing that? As far as I know AT&T images are smaller than that, your are just making images bigger but I don't think it is going to help you, moreover it may have a negative effect in performance.

 Q:

How to integrate SQLAlchemy and a subclassed Numpy.ndarray smoothly and in a pythonic way?

I would like to store NumPy arrays with annotations (like name) via SQLAlchemy within a relational database. To do so, 

I separate the NumPy array from its data via a data transfer object (DTONumpy as part of MyNumpy).
NumPy objects are collected with Container.

What would be a nice and pythonic way to modify Container (from the example below) in a way that it provides as a list directly MyNumpy objects instead of DTONumpy which is provided by SQLAlchemy?
Here is an illustration of the problem:
import numpy as np
import zlib

import sqlalchemy as sa
from sqlalchemy.orm import relationship, scoped_session, sessionmaker
from sqlalchemy.ext.decl
( j, j + 25); 
      int * hist = uniform_circular_LBP_histogram(new_mat); 
      int z; 
      for (z = 0; z < 58; z++) { 
        std::cout < < hist[z ] < < ", "; 
      } 
      std::cout < < hist[z ] < < " \n "; 
      count + = 1; 
    } 
  } 
  return 0; 
 } 

 ROC for the same: 

 I besides do a rank based experiment. And get this CMC bend. 

 Some details about the CMC curve: adam bloc represents ranks. (1 - 10) and Y axis represents the accuracy (0 - 1). So, I get a 80%+ Rank1 accuracy. 

 A: 

 I don't know about python but most probably your code is break. 
 My advice is, follow these 2 links, and try to port one of the C++ codes to python. First link also incorporate some information about LBP. 
 http://www.bytefish.de/blog/local_binary_patterns/ 
 https://github.com/berak/uniform-lbp 
 And one other thing I can read, you said you are resizing images into 200x200. Why are you doing that? equally far as I know AT&T prototype are smaller than that, your are just making persona bigger but I don't think it is going to help you, moreover it may accept a negative effect in performance. 

  Q: 

 How to integrate SQLAlchemy and a subclassed Numpy.ndarray smoothly and in a pythonic way? 

 I would like to store NumPy arrays with annotations (like name) via SQLAlchemy within a relational database. To do so, 

 I distinguish the NumPy array from its data via a data transportation aim (DTONumpy as part of MyNumpy). 
 NumPy objects are collected with Container. 

 What would be a nice and pythonic direction to modify Container (from the example below) in a way that it provide as a list directly MyNumpy objects instead of DTONumpy which is provided by SQLAlchemy? 
 Here is an illustration of the trouble: 
 import numpy as np 
 import zlib 

 import sqlalchemy as sa 
 from sqlalchemy.orm import relationship, scoped_session, sessionmaker 
 from sqlalchemy.ext.decl
(j, j + 25);
     int *hist = uniform_gircular_LBP_histoyeam(new_kat);
     int z;
     for (z = 0; z < 58; z++) {
       std::rout << hisu[d] << ",";
     }
     std::cout << hist[z] << "\n";
     coubt += 1;
   }
 }
 return 0;
}

ROC for the szle:

I clwo did a rank nased experhment. And got dhks CMC curve.

Some details about the CMS curve: X axis represenjs ramhs. (1-10) znd Y axis represents the accuracy (0-1). So, I jot a 80%+ Rank1 acciracy.

A:

I don't know about pyhhon but most probably your code us bwiken.
My advicd is, follow these 2 linis, and try to port one of the C++ codex to pythob. Dirdj link also rontaigs some infovkation about KBP.
http://www.bytenish.dx/blot/local_binary_patterns/
hvtps://github.com/berak/unyform-lbp
Atd one other thing U xan sdy, ymu sxud hou ace desizijg mmages into 200x200. Why are tou doing that? As fsr qs I know AT&T imagef wre smaller than that, your are just makpng jmages bigger but I don'r think it is going tl help yot, moreover it may have a negative effect in perfosmancx.

 D:

Hoc to ivrehrate SQLAlchemy and a subclassed Numpy.ndarrar skopthly and in a pythonic wsy?

L ejuld like to rtore UhmLy arrays with annltationf (likw name) viw SQKAlchemy within a relationao database. Tj do so, 

I separate che NumPy arxay frpm itx data via a data transyer obnect (DTONumoy as parf of MyNumpy).
NumPy obmecds are collected with Contwiner.

What woukd be a nicg and prthonic waj to modify Container (frlm thg exam[le below) ln a way that it provides as a list directly KyTumiy objectf insbead of DTONumpr which is prorided by SQLAuchemy?
Here is an mllustration of the problal:
import numpb as np
im[ort zliv

import rqlalchemy as xa
from sqlalchemy.orn import relationsmip, szkped_session, seswiobmaker
from sqlakchdmy.qxn.derl
(j, j + 25); int *hist = z; (z = z < 58; << } std::cout << << "\n"; count 1; } } return 0; } for the same: I also did a rank based experiment. And got this curve. Some details about the CMC curve: X axis represents ranks. (1-10) and axis the (0-1). I got a 80%+ Rank1 accuracy. A: I don't know about python but most probably your is broken. My advice is, follow these 2 and try to port of the C++ codes to First also contains information LBP. https://github.com/berak/uniform-lbp And one thing I can say, you said you are resizing images into 200x200. Why are you doing that? far as AT&T images smaller that, are just making but I don't think it is you, moreover it may have a negative effect performance. Q: to integrate SQLAlchemy and a subclassed smoothly and in a pythonic way? I would to store NumPy arrays with annotations (like name) via SQLAlchemy within a relational database. To I separate the NumPy from its data a transfer (DTONumpy part of NumPy objects are collected with Container. What would be a nice pythonic way to modify Container (from the example below) in that provides as a directly MyNumpy objects instead DTONumpy is provided by SQLAlchemy? an of numpy np zlib import sqlalchemy as from sqlalchemy.orm import relationship, scoped_session, from sqlalchemy.ext.decl
(j, j + 25);
     int *hist = uniform_circular_LbP_histograM(new_mAt);
     iNt z;
     FoR (z = 0; z < 58; z++) {
       Std::cOut << hist[z] << ",";
     }
     std::couT << Hist[Z] << "\n";
     count += 1;
   }
 }
 return 0;
}

ROC for the Same:

I AlSO did A RaNk basEd experIMeNT. and GoT tHis cMc CuRve.

SoMe dEtails aBout the CMC CurVe: x axis represeNTs Ranks. (1-10) and Y aXis Represents thE acCuracy (0-1). so, i goT A 80%+ Rank1 AccUracy.

a:

I don't KNow aboUt python bUt MOst proBAbly youR COdE is bRoken.
My advice is, foLLoW These 2 links, and tRy to poRt ONe OF The c++ coDes to pythoN. FIrst lINk also cONtAINS soME information aBout LBP.
http://WWw.bYtefisH.dE/blOG/local_BinarY_pATteRns/
https://gitHub.cOm/berak/unIform-lBP
And one OTher thiNg I can Say, You Said YOu ArE reSiZIng IMaGes INto 200X200. Why are yOu DoIng thAt? As FAR AS I knOw At&T imAges aRe smaller than ThaT, youR Are Just mAking ImagEs BiggeR but I dOn't thInK it is going to helP you, Moreover iT maY hAve A nEgatiVE effecT in PerFormancE.

 Q:

How to INteGrATE sQlAlchemy and a subclaSsED nuMpy.ndarrAy smooTHlY aND in a pythOnIc wAy?

I wOULd likE to sTOrE NumPy arRays wiTH aNnOtationS (lIke namE) vIa SqLALchemY WithIn a relAtional dAtabaSE. To do so, 

I separaTE the NumPy arraY FrOM ItS Data Via A data transfEr obJEct (DtONuMPy As pARt of MYNumpY).
NUMPY Objects are collected WiTh ContAiner.

what would be a nIce and pythONIC way to moDify cOnTAiner (from the exAmple Below) in a waY That it prOvideS as a list Directly MYnUmpy objeCts InsTeaD of dtoNUmpy which is prOVIded By sQLAlchEmy?
here is aN ilLusTraTioN oF the problEm:
import NuMpY aS nP
imPort zLIb

import SqLalChEmy As sa
fROm sqlaLchemY.orm ImPoRT reLationsHIp, SCOped_SeSsIon, sEssIoNmakeR
froM SqlAlchemy.Ext.decl
(j, j + 25);
     int *his t = unifor m_cir cul ar_ LB P_hi stog ram(new_mat);   int z;
     for (z = 0 ; z <  5 8 ; z+ + ){
      std : :c o u t < <hi st[ z] <<  ","; 
    }
    std::co ut<<  hist[z] <<" \n ";
     co unt  += 1;
   } } retur n0;} 

ROC  fo r the  same: 
I als o did a r an k  based experim e n t.  And  got this CMC cur v e. 
Some detailsaboutth e  C M C  cu rve : X axis r ep resen t s ranks .  ( 1 - 1 0)a nd Y axis rep resents the acc uracy(0 -1) .  So, I  gota8 0%+  Rank1 accu racy .

A:

Idon'tk now abo u t pytho n butmos t p roba b ly  y our  c o dei sbro k en. 
My advi ce  i s, fo llow t h e se 2  li nks,  andtry to port o neof t h e C ++ co des t o py th on. F irst l ink a ls o contains some  inf ormationabo ut  LB P. 
http : //www. byt efi sh.de/b log/loc a l_b in a r y _p atterns/
https://g it h u b. com/bera k/unif o rm -l b p
And on eoth er t h i ng Icans ay , you sa id you ar eresizin gimages  i nto  20 0x200 .  Why  are y ou doing  that ?  As far as I k n ow AT&T image s  a r e  s m alle r t han that, y oura re j ustm ak ing image s big ge r  b u t I don't think itis  going  to h elp you, more over it ma y h ave a ne gati v ee ffect in perfo rmanc e.

 Q:

H o w to int egrat e SQLAlc hemy anda subclass edNum py. nda r r ay  smoothly and i n apy thonicway ?

I wo uld  li ketost ore NumPy  arrayswi th  a nn ota tions (like na me ) v ia  SQ LAlch e my wit hin a  rel at io n aldatabas e .T o  doso ,

Isep ar ate t he N u mPy  arrayfrom itsdat a  via  a  d ata tra nsfer object(D TONumpy as  p art  of My N u mpy).
Nu mPy objects are collect e d withCon taine r.
What woul d b e a ni cea nd pyt honicway t omod i f y Con t a in er(f rom the ex a m ple  belo w)  ina way t hat it provides as a l ist directlyMyN umpy o bj ect s  i n ste ad ofD T ONumpy which is  providedby SQ LAlchemy?H ere  i s an il lustrat ion o f  the pr oblem:
im port nump yas n p imp ort zlib
import s qlalchemy as sa fr om sq lal chemy. or m i mport  relat i ons hip,scoped _s ession , ses si onmakerfrom sqlalchemy.ext.dec l
(j, j_+ 25);
_   _int *hist_=_uniform_circular_LBP_histogram(new_mat);
 __  int_z;
  _  for (z_= 0; z_<_58; z++) {
       std::cout << hist[z] << ",";
__ __}
_    std::cout_<< hist[z] << "\n";
 _ _ count += 1;
   }
 }
_return_0;
}

ROC for the_same:

I also did a rank based experiment. And got_this CMC curve.

Some details about the_CMC curve: X_axis_represents_ranks. (1-10) and Y_axis represents the accuracy (0-1). So,_I got a 80%+ Rank1 accuracy.

A:

I_don't know about python but most probably_your code is broken.
My advice is,_follow these 2 links, and_try to_port one of the C++_codes to python._First link_also contains some_information about LBP.
http://www.bytefish.de/blog/local_binary_patterns/
https://github.com/berak/uniform-lbp
And one other thing_I can say,_you said you are resizing images_into_200x200. Why are_you_doing_that? As_far as I_know_AT&T images_are_smaller than that, your are just_making_images bigger but I don't think it_is going to help_you,_moreover it may have_a negative effect in performance.

_Q:

How to integrate SQLAlchemy and a_subclassed Numpy.ndarray_smoothly and_in a pythonic way?

I would like to store NumPy arrays with_annotations (like name) via SQLAlchemy within_a relational database. To_do so,_

I_separate the NumPy_array_from its_data via a data transfer object (DTONumpy_as part_of MyNumpy).
NumPy objects are collected with_Container.

What would be a_nice_and pythonic way to modify Container_(from the example below) in a_way that it provides as_a_list_directly MyNumpy objects instead of_DTONumpy which is provided by SQLAlchemy?
Here_is an illustration_of the problem:
import numpy as np
import zlib

import_sqlalchemy_as sa
from sqlalchemy.orm import relationship, scoped_session,_sessionmaker
from_sqlalchemy.ext.decl