Principle and implementation of picture question and answer based on BLIP-2

Large language models (LLM) have gained a lot of attention recently, and many popular models have emerged, such as GPT, OPT, BLOOM, etc. These models excel at learning natural language and are ideal for building chatbots, coding assistants, decision-making assistants, or translation systems. However, they lack knowledge of other modalities-for example, they cannot process images, […]

Cut out part of the picture by drawing a frame in the vue picture

Capture a portion of the image Using html2canvas to convert images was too slow, so I ended up using canvas to intercept them. <template> <div> <el-dialog title=”Please draw the location where the fault needs to be added on the picture” :visible.sync=”dialogVisible” width=”1270px” :before-close=”handleClose” :close-on-click-modal= “false” :close-on-press-escape=”false”> <div> <img id=”newImg” ref=”newImg” style=”user-select:none;” crossOrigin=”Anonymous” :src=”ftp + info.detectionImgLocation” […]

Practical implementation of the function of adding text watermarks and picture watermarks in Java!

This article introduces how to add text watermarks to pictures in Java. The watermark can be a picture or text, and it is easy to operate. Steps to implement adding watermark to pictures in java: Get the original image object information (local image or network image) Add watermark (set watermark color, font, coordinates, etc.) Process […]

Vue conference room time picker (modified)

Vue conference room time picker Original link: Compare the modified content of the original text 1. The original article used a time interval selector based on 5-minute intervals, but here it has been changed to a half-hour interval. 2. The css style was modified, and the original timeline was changed to box selection. 3. […]

Embedded Linux driver development (I2C topic) (4)

Write APP to directly access EEPROM References: Linux driver: drivers/i2c/i2c-dev.c I2C-Tools-4.2: AT24cxx.pdf 1. Hardware connection STM32MP157 I2C module connection method IMX6ULL I2C module connection method 2. AT24C02 access method 2.1 Device address From the chip manual, we can know that the device address of AT24C02 is related to its A2, A1, and A0 pins: […]

Embedded Linux driver development (I2C topic) (5)

I2C system driver model References: Linux kernel documentation: Documentation\i2c\instantiating-devices.rst Documentation\i2c\writing-clients.rst Linux kernel driver example: drivers/eeprom/at24.c 1. I2C driver level I2C Core is the I2C core layer. Its function is: Provide unified access functions, such as i2c_transfer, i2c_smbus_xfer, etc. Implement I2C bus-device-driver model, manage: I2C device (i2c_client), I2C device driver (i2c_driver), I2C controller (i2c_adapter) 2. I2C […]

Embedded Linux driver development (I2C special topic) (6)

Improve the virtual I2C_Adapter driver and simulate EEPROM References: Linux kernel documentation: Linux-4.9.88\Documentation\devicetree\bindings\i2c\i2c-gpio.txt Linux-5.4\Documentation\devicetree\bindings\i2c\i2c-gpio.yaml Linux kernel driver: emulating I2C using GPIO Linux-4.9.88\drivers\i2c\busses\i2c-gpio.c Linux-5.4\drivers\i2c\busses\i2c-gpio.c Real I2C controller driver for Linux kernel IMX6ULL: Linux-4.9.88\drivers\i2c\busses\i2c-imx.c STM32MP157: Linux-5.4\drivers\i2c\busses\i2c-stm32f7.c 1. Implement master_xfer function In the virtual I2C_Adapter driver, as long as the master_xfer function is implemented, the I2C Adapter can […]

The datetime type in el-date-picker disables dates containing time and minutes

It’s a very confusing situation. For the disabled time under the datetime type, the timestamp is disabled in pickerOptions, but the time division cannot be disabled. Idea: disabledDate in pickerOptions disables overall date selection Disable time range through selectableRange Disadvantage: still cannot disable the second range // view interface <el-date-picker v-model=”remindTime” type=”datetime” placeholder=”Select time” value-format=”timestamp” […]

python self (2) slice dictionary traverse delete add modify query definition function function return value scope serialization exception error urllib uses one type and six methods to download video audio picture

Slice # # Slice # s = ‘hello word’ # # The subscript index is 0 # print(s[0]) #h # # Left closed and right open (left starts with the subscript, right is several index values), for example, 4 index values starting from 0 # print(s[0:4]) #hell # # Change the starting position of the […]

Android implements the function of converting signatures into pictures and printing

Android implements signatures, converts them into pictures and prints them out Android implements signature function Customize a signature canvas panel Write a signature page layout Some logic and function implementation required when signing in activity Display and print the signed image Other pages receive data and display it Print signature Picture retouching Android implements signature […]