diff --git a/source/FAQ/index.rst b/source/FAQ/index.rst index 6ba6973..db5670e 100644 --- a/source/FAQ/index.rst +++ b/source/FAQ/index.rst @@ -25,4 +25,8 @@ Ameba FAQ ameba-pro2_mipi_connection - gpio_pins_output_voltage \ No newline at end of file + gpio_pins_output_voltage + + yolov7_reparameterization + + sensor_replacement \ No newline at end of file diff --git a/source/FAQ/sensor_replacement.rst b/source/FAQ/sensor_replacement.rst new file mode 100644 index 0000000..1a610e2 --- /dev/null +++ b/source/FAQ/sensor_replacement.rst @@ -0,0 +1,10 @@ +.. tags:: sensor, camera, amb82-mini, replacement + +Is there a source for JXF-37 sensor replacement? +================================================ + +**Answer** + +Unfortunately, there is no source for replacement as the manufacturer for JXF-37 does not sell them individually. If possible, you may want to try with another sensor model instead, please refer to the list of supported sensors in `FreeRTOS SDK `_. + +When choosing your sensor, please note that AMB82 Mini is only compatible with MIPI type sensors. \ No newline at end of file diff --git a/source/FAQ/yolov7_reparameterization.rst b/source/FAQ/yolov7_reparameterization.rst new file mode 100644 index 0000000..d114292 --- /dev/null +++ b/source/FAQ/yolov7_reparameterization.rst @@ -0,0 +1,11 @@ +.. tags:: reparameterization, yolov7, amb82-mini + +How to do reparameterization for customized YOLOv7-tiny model? +============================================================== + +Reparameterization is used to reduce trainable BoF modules into deploy model for fast inference. For example merge BN to conv, merge YOLOR to conv, ..etc However, before reparameterization, the model has more parameters and computation cost.reparameterized model (cfg/deploy) used for deployment purpose + +**Answer** + +You may clone a copy of `YOLOv7 repo `_ into your local machine and perform reparameterization there. +Else, you may create a copy of this `Kaggle notebook `_, upload your best trained model pt file and perform reparameterization on Kaggle. After running all the lines correctly, you can download your reparameterized model ``best_reparam.pt`` and use it on Ameba. \ No newline at end of file diff --git a/source/_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image02.png b/source/_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image02.png new file mode 100644 index 0000000..3b24667 Binary files /dev/null and b/source/_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image02.png differ diff --git a/source/_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image03.png b/source/_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image03.png new file mode 100644 index 0000000..cdbfed0 Binary files /dev/null and b/source/_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image03.png differ diff --git a/source/ameba_pro2/amb82-mini/API_Documents/FileSystem/Class File.rst b/source/ameba_pro2/amb82-mini/API_Documents/FileSystem/Class File.rst index 23878c6..c603b01 100644 --- a/source/ameba_pro2/amb82-mini/API_Documents/FileSystem/Class File.rst +++ b/source/ameba_pro2/amb82-mini/API_Documents/FileSystem/Class File.rst @@ -62,6 +62,8 @@ A class for data manipulation of files in a file system. +---------------------------+------------------------------------------+ | File::playmp3 | Execute convertMp3TArray. | +---------------------------+------------------------------------------+ +| File::readFile | Read data according to opened file size | ++---------------------------+------------------------------------------+ **File::File** -------------- @@ -84,7 +86,7 @@ Constructs a File object. ~~~~~~~~~~~~~~ filename: pointer to a char array containing the path of the file to open. -fileType: The macro of the file type defined in AmebaFatFSFile.h to support different opening steps for different types of file. +fileType: The macro of the file type defined in AmebaFatFSFile.h to support different opening methods for different types of file. **Returns** ~~~~~~~~~~~ @@ -118,6 +120,7 @@ Open a file from the file system. ~~~~~~~~~~~~~~ filename: pointer to a char array containing the path of the file to open. +fileType: The macro of the file type defined in AmebaFatFSFile.h to support different opening methods for different types of file. **Returns** ~~~~~~~~~~~ @@ -178,7 +181,7 @@ Write data to the currently open file. size_t write(uint8_t c); size_t write(const uint8_t* buf, size_t size); - size_t write(const char* str; + size_t write(const char* str); size_t write(const char* buf, size_t size); **Parameters** @@ -599,4 +602,38 @@ NA NA +.. note :: "AmebaFatFSFile.h" must be included to use the class function. + +**File::readFile** +------------------ + +**Description** +~~~~~~~~~~~~~~~ + +Read opened data file according to its file size, malloc is done within API, no pre-definition of fixed size buffer needed. + +**Syntax** +~~~~~~~~~~ + +.. code-block:: c++ + + bool readFile(unsigned char *file_data, uint32_t &file_size); + +**Parameters** +~~~~~~~~~~~~~~ + +file_data: buffer pointer for the file to be read + +file_size: the size of the file to be read + +**Returns** +~~~~~~~~~~~ + +True if the file data is read successfully, false if failed to read file data. + +**Example Code** +~~~~~~~~~~~~~~~~ + +NA + .. note :: "AmebaFatFSFile.h" must be included to use the class function. \ No newline at end of file diff --git a/source/ameba_pro2/amb82-mini/Example_Guides/SPI/Display SD JPG ILI9341 TFT.rst b/source/ameba_pro2/amb82-mini/Example_Guides/SPI/Display SD JPG ILI9341 TFT.rst new file mode 100644 index 0000000..bbd1f60 --- /dev/null +++ b/source/ameba_pro2/amb82-mini/Example_Guides/SPI/Display SD JPG ILI9341 TFT.rst @@ -0,0 +1,74 @@ +Display SD JPG ILI9341 TFT +========================== + +.. contents:: + :local: + :depth: 2 + +If you are not familiar with SPI, please read `Introduction to SPI `_ first. + +Materials +--------- + +- `AMB82-mini `_ x 1 + +- ILI9341 TFT LCD with SPI interface x 1 + +- microSD card x 1 + +Example +------- + +- QVGA 2.2″ TFT LCD + + - http://www.lcdwiki.com/2.2inch_SPI_Module_ILI9341_SKU:MSP2202 + +Common pins in ILI9341 TFT LCD with SPI interface: + +- MOSI: Standard SPI Pin + +- MISO: Standard SPI Pin + +- SLK: Standard SPI Pin + +- CS: Standard SPI Pin + +- RESET: Used to reboot LCD. + +- D/C: Data/Command. When it is at LOW, the signal transmitted are commands, otherwise the data transmitted are data. + +- LED (or BL): Adapt the screen backlight. Can be controlled by PWM or connected to VCC for 100% backlight. + +- VCC: Connected to 3V or 5V, depends on its spec. + +- GND: Connected to GND. + +**AMB82 MINI and QVGA TFT LCD Wiring Diagram:** + +|image01| + +Open the example, “File” -> “Examples” -> “AmebaSPI” -> “DisplaySDJPG_ILI9341_TFT” + +|image02| + +Modify the file name according to the image saved name. + +|image03| + +Compile and upload to Ameba, then press the reset button. + +Then, you can see the image displayed on the LCD screen. + +.. |image01| image:: ../../../../_static/amebapro2/Example_Guides/SPI/LCD_Screen_ILI9341_TFT/image01.png + :width: 1020 px + :height: 593 px + +.. |image02| image:: ../../../../_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image02.png + :width: 707 px + :height: 841 px + +.. |image03| image:: ../../../../_static/amebapro2/Example_Guides/SPI/DisplaySDJPG_ILI9341_TFT/image03.png + :width: 1095 px + :height: 702 px + :scale: 90% + diff --git a/source/ameba_pro2/amb82-mini/Example_Guides/SPI/index.rst b/source/ameba_pro2/amb82-mini/Example_Guides/SPI/index.rst index 0a751b6..c6334d5 100644 --- a/source/ameba_pro2/amb82-mini/Example_Guides/SPI/index.rst +++ b/source/ameba_pro2/amb82-mini/Example_Guides/SPI/index.rst @@ -4,5 +4,6 @@ SPI .. toctree:: :maxdepth: 1 + Display SD JPG ILI9341 TFT LCD Screen ILI9341 TFT \ No newline at end of file