Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
27e1d3d962
commit
9f64277757
1 changed files with 39 additions and 0 deletions
|
@ -34,14 +34,45 @@ gzip -d *.gz
|
||||||
|
|
||||||
## Convert the data into numpy files
|
## Convert the data into numpy files
|
||||||
|
|
||||||
|
### [numpy.dtype.newbyteorder](https://numpy.org/doc/stable/reference/generated/numpy.dtype.newbyteorder.html)
|
||||||
|
|
||||||
|
```python
|
||||||
|
type.newbyteorder(new_order='S', /)
|
||||||
|
```
|
||||||
|
|
||||||
|
> Return a new dtype with a different byte order.
|
||||||
|
>
|
||||||
|
> Changes are also made in all fields and sub-arrays of the data type.
|
||||||
|
>
|
||||||
|
> **new_order** : string, optional
|
||||||
|
>
|
||||||
|
> Byte order to force; a value from the byte order specifications below. The default value (‘S’) results in swapping the current byte order. new_order codes can be any of:
|
||||||
|
>
|
||||||
|
> ‘S’ - swap dtype from current to opposite endian
|
||||||
|
>
|
||||||
|
> {‘<’, ‘little’} - little endian
|
||||||
|
>
|
||||||
|
> {‘>’, ‘big’} - big endian
|
||||||
|
>
|
||||||
|
> {‘=’, ‘native’} - native order
|
||||||
|
>
|
||||||
|
> {‘\|’, ‘I’} - ignore (no change to byte order)
|
||||||
|
>
|
||||||
|
|
||||||
### Label file structure
|
### Label file structure
|
||||||
|
|
||||||
> [offset] [type] [value] [description]
|
> [offset] [type] [value] [description]
|
||||||
|
>
|
||||||
> 0000 32 bit integer 0x00000801(2049) magic number (MSB first)
|
> 0000 32 bit integer 0x00000801(2049) magic number (MSB first)
|
||||||
|
>
|
||||||
> 0004 32 bit integer 60000 number of items
|
> 0004 32 bit integer 60000 number of items
|
||||||
|
>
|
||||||
> 0008 unsigned byte ?? label
|
> 0008 unsigned byte ?? label
|
||||||
|
>
|
||||||
> 0009 unsigned byte ?? label
|
> 0009 unsigned byte ?? label
|
||||||
|
>
|
||||||
> ........
|
> ........
|
||||||
|
>
|
||||||
> xxxx unsigned byte ?? label
|
> xxxx unsigned byte ?? label
|
||||||
|
|
||||||
The labels values are 0 to 9.
|
The labels values are 0 to 9.
|
||||||
|
@ -49,13 +80,21 @@ The labels values are 0 to 9.
|
||||||
### Pattern file structure
|
### Pattern file structure
|
||||||
|
|
||||||
> [offset] [type] [value] [description]
|
> [offset] [type] [value] [description]
|
||||||
|
>
|
||||||
> 0000 32 bit integer 0x00000803(2051) magic number
|
> 0000 32 bit integer 0x00000803(2051) magic number
|
||||||
|
>
|
||||||
> 0004 32 bit integer 60000 number of images
|
> 0004 32 bit integer 60000 number of images
|
||||||
|
>
|
||||||
> 0008 32 bit integer 28 number of rows
|
> 0008 32 bit integer 28 number of rows
|
||||||
|
>
|
||||||
> 0012 32 bit integer 28 number of columns
|
> 0012 32 bit integer 28 number of columns
|
||||||
|
>
|
||||||
> 0016 unsigned byte ?? pixel
|
> 0016 unsigned byte ?? pixel
|
||||||
|
>
|
||||||
> 0017 unsigned byte ?? pixel
|
> 0017 unsigned byte ?? pixel
|
||||||
|
>
|
||||||
> ........
|
> ........
|
||||||
|
>
|
||||||
> xxxx unsigned byte ?? pixel
|
> xxxx unsigned byte ?? pixel
|
||||||
|
|
||||||
Pixels are organized row-wise.
|
Pixels are organized row-wise.
|
||||||
|
|
Loading…
Reference in a new issue