Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 27345a8
Author: sohaibimran-10xe <[email protected]>
Date:   Thu Aug 22 19:38:31 2024 +0500

    Fixed 2A internal crop, automated testing, osd, yuv rev, ycbcr matrix… (#17)

    * Fixed 2A internal crop, automated testing, osd, yuv rev, ycbcr matrix fixed

    * fix osd configs and linting

    * fixed linting
  • Loading branch information
talhaiqbal-10xe committed Aug 23, 2024
1 parent ffa8149 commit 3e64f64
Show file tree
Hide file tree
Showing 46 changed files with 1,164 additions and 937 deletions.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Pull request checklist:
- [ ] Issue created

**ReadMe**
- [ ] Block Diagram
- [ ] Results
- [ ] UserGuide

**Documentation**
- [ ] Block Diagram
- [ ] Module description
- [ ] Results
5 changes: 3 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[MESSAGES CONTROL]
disable=unsubscriptable-object,E1136, E1137, R,E0401, C3001, E1121, E0001, C0209, W1514, C0302, W0621, W0201, C0413
disable=unsubscriptable-object,E1136, E1137, R,E0401, C3001, E1121, E0001, C0209, W1514, C0302, W0621, W0201, C0413, E0606

# E0401: Unable to import 'util.utils' (import-error)
# C3001: Lambda expression assigned to a variable.
Expand All @@ -8,4 +8,5 @@ disable=unsubscriptable-object,E1136, E1137, R,E0401, C3001, E1121, E0001, C0209
# C0302: Too many lines in module (too-many-lines)
# W0621: Redefining name 'x' from outer scope (redefined-outer-name)
# W0201: Attribute 'x' defined outside __init__ (attribute-defined-outside-init)
# C0413: Import "import infinite_isp" should be placed at the top of the module (wrong-import-position)
# C0413: Import "import infinite_isp" should be placed at the top of the module (wrong-import-position)
# E0606: Possibly using variable 'r_channel' before assignment (possibly-used-before-assignment)
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ ISP pipeline for `InfiniteISP_ReferenceModel v1.0`

1. **RTL-friendly Code**: The model provides a Python implementation of camera pipeline modules that can be directly translated to RTL, with optimizations such as lookup tables, custom approximations, and integer calculations.

2. **Test Vector Generation**: The project includes automated scripts for generating test vectors for individual as well as multiple modules, simplifying the testing process.
2. **Dataset Processing**: The model facilitates execution for multiple images with different or same configuration files.

3. **Dataset Processing**: The model facilitates execution for multiple images with different or same configuration files.

4. **Video Processing**: The model also features a video processing script that allows for sequential frame processing, with operational 3A Statistics data flowing between frames.
3. **Video Processing**: The model also features a video processing script that allows for sequential frame processing, with operational 3A Statistics data flowing between frames.



## Objectives

The primary objective of Infinite-ISP_ReferenceModel is to create a open source Python-based Model that streamlines the process of implementing camera pipeline modules into RTL-friendly implementations. This enables seamless integration with hardware designs and simplifies the development of efficient image processing systems. By providing optimized algorithms, test vector generation, and video processing capabilities, the model aims to be an invaluable tool for developers working on image processing projects and RTL implementations.
The primary objective of Infinite-ISP_ReferenceModel is to create a open source Python-based Model that streamlines the process of implementing camera pipeline modules into RTL-friendly implementations. This enables seamless integration with hardware designs and simplifies the development of efficient image processing systems. By providing optimized algorithms, and video processing capabilities, the model aims to be an invaluable tool for developers working on image processing projects and RTL implementations.

# Features List

Expand All @@ -67,6 +65,7 @@ The table below provides a feature list of the model. The version `1.0` of the m
| Noise Reduction | [Non-local means filter](https://www.ipol.im/pub/art/2011/bcm_nlm/article.pdf) <br> - Implements intensity level difference through a LUT|
| RGB Conversion | Converts YCbCr digital image to RGB|
| Invalid Region Crop | Crops image to a fixed size|
|On Screen Display | Adds 10x Logo on top left corner |
| Scale | Nearest Neighbor <br> - Integer Scaling |
| YUV Format | YUV <br> - 444 <br> - 422 |

Expand All @@ -90,7 +89,7 @@ git clone https://github.com/10xEngineersTech/Infinite-ISP_ReferenceModel
```shell
pip install -r requirements.txt
```
3. Run [isp_pipeline.py](isp+pipeline.py)
3. Run [isp_pipeline.py](isp_pipeline.py)
```shell
python isp_pipeline.py
```
Expand Down Expand Up @@ -129,7 +128,7 @@ DATASET_PATH = './in_frames/normal/data'

```shell
git submodule add <url> <path>
git submodule update –-init -recursive
git submodule update --init --recursive
```


Expand All @@ -142,9 +141,6 @@ DATASET_PATH = './in_frames/normal/<dataset_name>'
5. Run `isp_pipeline_dataset.py` or `video_processing.py`
6. The processed images are saved in [out_frames](out_frames/) folder.

## Test Vector Generation
Please refer to the provided [instructions](test_vector_generation/README.md) for generating test vectors for multiple images, considering individual or multiple modules as the Device Under Test (DUT).

## Contributing

Please read the [Contribution Guidelines](docs/CONTRIBUTIONS.md) before making a Pull Request
Expand Down
30 changes: 19 additions & 11 deletions config/configs.yml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Platform contains configuration parameters that are not part of the ISP pipeline
| disable_progress_bar| Enables or disables the progress bar for time taking modules|
| leave_pbar_string | Hides or unhides the progress bar upon completion |
| save_lut | Flag to store LUT files for 2DNR and BNR |
| generate_tv | Indicates that ISP pipeline is running through [automate_execution.py](../test_vector_generation/automate_execution.py) for debugging instead of [isp_pipeline.py](../isp_pipeline.py)|
|rev_yuv_channels| Use for debugging - Generate YUV test vectors with reversed channels (VUY)|
|save_format| Use for Debugging - Set module output format <br> - `npy` <br> - `png` <br> - `both` |
|rendered_3a| Returns 3a rendered final image with awb gains and correct exposure|

Expand Down
64 changes: 64 additions & 0 deletions docs/assets/10xLogo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
0x0, 0x0, 0x0, 0xc,
0x0, 0x0, 0x0, 0x18,
0x0, 0x1fe, 0x0, 0x70,
0x0, 0x3fe, 0x0, 0xe0,
0x1f, 0xfc0003fe, 0x0, 0x3c0,
0xff, 0xfc0007ff, 0x0, 0x7c0,
0x3ff, 0xfc003fff, 0xe0000000, 0x1f80,
0xfff, 0xfc01ffff, 0xfc700000, 0x3f00,
0x7fff, 0xf8e7ffff, 0xfffc0000, 0x7e00,
0x1ffff, 0xf8fff800, 0xfffe0000, 0xfc00,
0x7ffff, 0xf87fc000, 0x1fff0000, 0x1f800,
0x1fffff, 0xf8ff0000, 0x7ff0000, 0x3f800,
0x1fffff, 0xf87c1fff, 0x81fe0000, 0x7f000,
0x1fffff, 0xf0387fff, 0xe0fe0000, 0xfe000,
0x1fffff, 0xf001ffff, 0xf87e0000, 0x1fc000,
0x3ffcff, 0xf007ffff, 0xfe3e0000, 0x3f8000,
0x3fe0ff, 0xf00fffff, 0xff1f0000, 0x3f0000,
0x3f81ff, 0xf01fffff, 0xff9f00f0, 0x67e0000,
0x3c01ff, 0xe03fffff, 0xff8f87fc, 0xcfc0000,
0x3001ff, 0xe07fffff, 0xffcf87ff, 0xb9fc0000,
0x1ff, 0xe0fffc07, 0xffe7c1ff, 0xf3f80000,
0x1ff, 0xe1fff001, 0xffe7f87f, 0xf7f00000,
0x1ff, 0xc1ffe000, 0xffe7fc1f, 0xe7e00000,
0x3ff, 0xc3ffc000, 0xffe3fc0f, 0xcfc00000,
0x3ff, 0xc3ff8000, 0x7fe3fc1f, 0x9fc00000,
0x3ff, 0xc3ff8000, 0x7fe3fc3f, 0x3f800000,
0x3ff, 0xc3ff0000, 0x7fe3fc7e, 0x7f000000,
0x3ff, 0x83ff0000, 0xffe7fcfc, 0xfe000000,
0x7ff, 0x83ff0000, 0xffe7f0fd, 0xfc000000,
0x7ff, 0x87ff0000, 0xffe7c1f9, 0xfe000000,
0x7ff, 0x83ff0001, 0xffe783f3, 0xff000000,
0x7ff, 0x83ff8003, 0xffcf87e7, 0xff000000,
0xfff, 0x3ff8007, 0xffcf0fcf, 0xff800000,
0xfff, 0x3ffe00f, 0xff9f1f9f, 0xffc00000,
0xfff, 0x1fff87f, 0xff0e1f3f, 0xffc00000,
0xfff, 0x1ffffff, 0xff043f71, 0xffe00000,
0xfff, 0xffffff, 0xfc007e41, 0xfff00000,
0x1ffe, 0x7fffff, 0xf800fc00, 0xfff00000,
0x1ffe, 0x3fffff, 0xf001f800, 0x7ff80000,
0x1ffe, 0x1fffff, 0xe003f000, 0x3ffc0000,
0x1ffe, 0xfffff, 0x8007e000, 0x3ffe0000,
0x1ffe, 0x1fffe, 0x7c000, 0x1ffe0000,
0x0, 0x1fe0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x1188, 0x4030042, 0x1038501, 0x1c0000,
0x3f9e, 0xe1fe0e7, 0x79feff3, 0xf87f0000,
0x7f9e, 0xe3ff1ef, 0x87bfcff7, 0xfcff0000,
0x701f, 0xe7879cf, 0xc7380e07, 0x3ce20000,
0x701f, 0x9ef011cf, 0xc7381e07, 0x1ce00000,
0x7f3f, 0x9ce001cf, 0xe73f9fc7, 0x3cf00000,
0x7f39, 0xdde1f9ce, 0xe73f9fe7, 0xfc7c0000,
0x7f39, 0xdde1f9ce, 0x7f3f9fc7, 0xf83e0000,
0xf038, 0xfce1fbde, 0x7e781c0f, 0xe00f0000,
0xe038, 0xfcf07b9e, 0x3e703c0e, 0xf0070000,
0xfe78, 0x7c7ff39c, 0x3e7f3f8e, 0x71ff0000,
0xff70, 0x787fe39c, 0x1e7fbfce, 0x39fe0000,
0xfe70, 0x381f839c, 0xc7f3fce, 0x38f80000,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
Binary file modified docs/assets/infinite-isp-architecture-initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions in_frames/normal/data/Indoor1_2592x1536_10bit_GRBG-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ platform:
disable_progress_bar: False
leave_pbar_string: False
save_lut: false
generate_tv: false
rev_yuv_channels: false
save_format: npy
# png # npy # both
render_3a: true
Expand Down Expand Up @@ -144,6 +142,18 @@ invalid_region_crop:
is_debug: true
is_save: False

on_screen_display:
is_enable: true
is_debug: false
height: 64
width: 128
x_offset: 50
y_offset: 50
fg_color: [0, 90, 160]
bg_color: [255, 255, 255]
alpha: 50
is_save: false

scale:
is_enable: False
is_debug: True
Expand Down
14 changes: 12 additions & 2 deletions in_frames/normal/data/Outdoor1_2592x1536_10bit_GRBG-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ platform:
disable_progress_bar: False
leave_pbar_string: False
save_lut: false
generate_tv: false
rev_yuv_channels: false
save_format: npy
# png # npy # both
render_3a: true
Expand Down Expand Up @@ -145,6 +143,18 @@ invalid_region_crop:
is_debug: true
is_save: False

on_screen_display:
is_enable: true
is_debug: false
height: 64
width: 128
x_offset: 50
y_offset: 50
fg_color: [0, 90, 160]
bg_color: [255, 255, 255]
alpha: 50
is_save: false

scale:
is_enable: False
is_debug: True
Expand Down
14 changes: 12 additions & 2 deletions in_frames/normal/data/Outdoor2_2592x1536_10bit_GRBG-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ platform:
disable_progress_bar: False
leave_pbar_string: False
save_lut: false
generate_tv: false
rev_yuv_channels: false
save_format: npy
# png # npy # both
render_3a: true
Expand Down Expand Up @@ -145,6 +143,18 @@ invalid_region_crop:
is_debug: true
is_save: False

on_screen_display:
is_enable: true
is_debug: false
height: 64
width: 128
x_offset: 50
y_offset: 50
fg_color: [0, 90, 160]
bg_color: [255, 255, 255]
alpha: 50
is_save: false

scale:
is_enable: False
is_debug: True
Expand Down
14 changes: 12 additions & 2 deletions in_frames/normal/data/Outdoor3_2592x1536_10bit_GRBG-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ platform:
disable_progress_bar: False
leave_pbar_string: False
save_lut: false
generate_tv: false
rev_yuv_channels: false
save_format: npy
# png # npy # both
render_3a: true
Expand Down Expand Up @@ -146,6 +144,18 @@ invalid_region_crop:
is_debug: true
is_save: False

on_screen_display:
is_enable: true
is_debug: false
height: 64
width: 128
x_offset: 50
y_offset: 50
fg_color: [0, 90, 160]
bg_color: [255, 255, 255]
alpha: 50
is_save: false

scale:
is_enable: False
is_debug: True
Expand Down
14 changes: 12 additions & 2 deletions in_frames/normal/data/Outdoor4_2592x1536_10bit_GRBG-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ platform:
disable_progress_bar: False
leave_pbar_string: False
save_lut: false
generate_tv: false
rev_yuv_channels: false
save_format: npy
# png # npy # both
render_3a: true
Expand Down Expand Up @@ -145,6 +143,18 @@ invalid_region_crop:
is_debug: true
is_save: False

on_screen_display:
is_enable: true
is_debug: false
height: 64
width: 128
x_offset: 50
y_offset: 50
fg_color: [0, 90, 160]
bg_color: [255, 255, 255]
alpha: 50
is_save: false

scale:
is_enable: False
is_debug: True
Expand Down
Loading

0 comments on commit 3e64f64

Please sign in to comment.