git clone https://huggingface.co/AXERA-TECH/LibCLIP
File Description
m5stack@raspberrypi:~/rsp/LibCLIP $ ls -lh
total 157M
drwxrwxr-x 2 m5stack m5stack 4.0K Aug 11 09:09 cnclip
-rw-rw-r-- 1 m5stack m5stack 156M Aug 11 09:08 coco_1000.tar
-rw-rw-r-- 1 m5stack m5stack 3.8K Aug 11 09:08 config.json
-rw-rw-r-- 1 m5stack m5stack 779K Aug 11 09:08 gradio_01.png
drwxrwxr-x 5 m5stack m5stack 4.0K Aug 11 09:08 install
drwxrwxr-x 2 m5stack m5stack 4.0K Aug 11 09:08 pyclip
-rw-rw-r-- 1 m5stack m5stack 6.0K Aug 11 09:08 README.md
python -m venv clip
source clip/bin/activate
pip install -r pyclip/requirements.txt
export LD_PRELOAD=/usr/lib/
cp install/lib/aarch64/libclip.so pyclip/
tar xf coco_1000.tar
python pyclip/gradio_example.py --ienc cnclip/cnclip_vit_l14_336px_vision_u16u8.axmodel --tenc cnclip/cnclip_vit_l14_336px_text_u16.axmodel --vocab cnclip/cn_vocab.txt --isCN 1 --db_path clip_feat_db_coco --image_folder coco_1000/
After successful startup, you will see information similar to the following:
(clip) m5stack@raspberrypi:~/rsp/LibCLIP $ python pyclip/gradio_example.py --ienc cnclip/cnclip_vit_l14_336px_vision_u16u8.axmodel --tenc cnclip/cnclip_vit_l14_336px_text_u16.axmodel --vocab cnclip/cn_vocab.txt --isCN 1 --db_path clip_feat_db_coco --image_folder coco_1000/
Trying to load: /home/m5stack/rsp/LibCLIP/pyclip/aarch64/libclip.so
❌ Failed to load: /home/m5stack/rsp/LibCLIP/pyclip/aarch64/libclip.so
/home/m5stack/rsp/LibCLIP/pyclip/aarch64/libclip.so: cannot open shared object file: No such file or directory
🔍 File not found. Please verify that libclip.so exists and the path is correct.
Trying to load: /home/m5stack/rsp/LibCLIP/pyclip/libclip.so
open libax_sys.so failed
open libax_engine.so failed
✅ Successfully loaded: /home/m5stack/rsp/LibCLIP/pyclip/libclip.so
Available devices: {'host': {'available': True, 'version': '', 'mem_info': {'remain': 0, 'total': 0}}, 'devices': {'host_version': 'V3.6.3_20250722020142', 'dev_version': 'V3.6.3_20250722020142', 'count': 1, 'devices_info': [{'temp': 62, 'cpu_usage': 1, 'npu_usage': 0, 'mem_info': {'remain': 7022, 'total': 7040}}]}}
[I][ run][ 31]: AXCLWorker start with devid 0
input size: 1
name: image [unknown] [unknown]
1 x 3 x 336 x 336
output size: 1
name: unnorm_image_features
1 x 768
[I][ load_image_encoder][ 50]: nchw 336 336
[I][ load_image_encoder][ 60]: image feature len 768
input size: 1
name: text [unknown] [unknown]
1 x 52
output size: 1
name: unnorm_text_features
1 x 768
[I][ load_text_encoder][ 44]: text feature len 768
[I][ load_tokenizer][ 60]: text token len 52
100%|███████████████████████████████████| 1000/1000 [00:00<00:00, 163246.95it/s]
* Running on local URL: http://0.0.0.0:7860
* To create a public link, set `share=True` in `launch()`.