Giter VIP home page Giter VIP logo

tmptsc's Introduction

Traffic-Sign-Classifier-Project

tmptsc's People

Contributors

chatmoon avatar

Watchers

James Cloos avatar

tmptsc's Issues

[STEP][2.2]{dataJit}(jitZoom) Wrong or right output shape when we use a single image or a dataset as an input

--- 1st bug --- template and std tbd

Ref: _TSC-step2.2_170316-1139_WIP.ipynb

1. Case 1: one image, wrong shape

  • Set 1 of parameter:
dct   = {'0': False, '1': True}
tRace = '1110'
dAta  = '001'  # 001 = one image as an input
sHow  = '0000'
index = 0
  • Test code:
if dct[dAta[0]]: xTmp = dataJit(X_valid, y_valid) # +4000 imges
if dct[dAta[1]]: xTmp = dataJit(X_train[index:index+8], y_train[index:index+8])  # 8 images
if dct[dAta[2]]: xTmp = dataJit(X_valid[0], y_valid[0]) # 1 image

if dct[sHow[0]]: showTrace(xTmp)
        
zTmp = xTmp.getImg()
print('[Pipe {:5}][{:5}] zTmp.shape: {}'.format('Test','Input', zTmp.shape))

# show shifted data
if dct[tRace[0]]: 
    xDel0 = xTmp.jitShift()
    if dct[sHow[1]]: showTrace(xDel0)
    print('[Pipe {:5}][{:5}] xDel0.shape: {}'.format('Test','Shift', xDel0.shape))
    xTmp.setImg(xDel0)
# show rotated data
if dct[tRace[1]]: 
    xDel1 = xTmp.jitRot()
    if dct[sHow[2]]: showTrace(xDel1)
    print('[Pipe {:5}][{:5}] xDel1.shape: {}'.format('Test','Rot', xDel1.shape))
    xTmp.setImg(xDel1)
# show zoomIn data
if dct[tRace[2]]: 
    xDel2 = xTmp.jitZoom()
    if dct[sHow[3]]: showTrace(xDel2)
    print('[Pipe {:5}][{:5}] xDel2.shape: {}'.format('Test','Zoom', xDel2.shape))
# show jittered data
if dct[tRace[3]]:
    xDel3 = xTmp.jitData()
    if dct[sHow[4]]: showTrace(xDel3)   
    print('xDel3.shape: {}'.format(xDel3[0].shape))```

- **Result, traces:**
```'''
[Pipe Test ][Input] zTmp.shape: (32, 32, 3)
[Pipe Test ][Shift] xDel0.shape: (32, 32, 3)
[Pipe Test ][Rot  ] xDel1.shape: (32, 32, 3)
[Pipe Code ] self.dataImg.shape: (32, 32, 3)
[Pipe Code ][zoom] xSize: 32, ySize: 32, ch: 3
[zoomOut] outImg.shape: (32, 36, 7)                 # <---  why 7 instead of 3 or 1 ?
[Pipe Code ][rezise] outImg.shape: (32, 32, 32)    # <---  why 32 instead of 3 or 1 ?
[Pipe Test ][Zoom ] xDel2.shape: (32, 32, 32)    # <--  why 32 instead of 3 or 1 ?'''

2. Case 2: a dataset of images, right shape:

  • Set 2 of parameter:
dAta  = '010' # dataset of images
  • Result, traces:
[Pipe Test ][Input] zTmp.shape: (8, 32, 32, 3)
[Pipe Test ][Shift] xDel0.shape: (8, 32, 32, 3)
[Pipe Test ][Rot  ] xDel1.shape: (8, 32, 32, 3)
[Pipe Code ] self.dataImg.shape: (8, 32, 32, 3)
[Pipe Code ][zoom] xSize: 32, ySize: 32, ch: 3
[zoomOut] outImg.shape: (8, 36, 36, 3)                  # <--- output shape OK
[Pipe Code ][rezise] outImg.shape: (8, 32, 32, 3)   # <--- output shape OK
[Pipe Test ][Zoom ] xDel2.shape: (8, 32, 32, 3)      # <--- output shape OK'''

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.