File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ usls = "latest-version"
9595| [ CLIP] ( https://github.com/openai/CLIP ) | Vision-Language Embedding | [ demo] ( examples/clip ) |
9696| [ jina-clip-v1] ( https://huggingface.co/jinaai/jina-clip-v1 ) | Vision-Language Embedding | [ demo] ( examples/clip ) |
9797| [ jina-clip-v2] ( https://huggingface.co/jinaai/jina-clip-v2 ) | Vision-Language Embedding | [ demo] ( examples/clip ) |
98- | [ mobileclip] ( https://github.com/apple/ml-mobileclip ) | Vision-Language Embedding | [ demo] ( examples/clip ) |
98+ | [ mobileclip & mobileclip2 ] ( https://github.com/apple/ml-mobileclip ) | Vision-Language Embedding | [ demo] ( examples/clip ) |
9999| [ BLIP] ( https://github.com/salesforce/BLIP ) | Image Captioning | [ demo] ( examples/blip ) |
100100| [ DB(PaddleOCR-Det)] ( https://arxiv.org/abs/1911.08947 ) | Text Detection | [ demo] ( examples/db ) |
101101| [ FAST] ( https://github.com/czczup/FAST ) | Text Detection | [ demo] ( examples/fast ) |
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ This demo showcases how to use [CLIP](https://github.com/openai/CLIP) to compute
33## Quick Start
44
55``` shell
6- cargo run -r -F cuda --example clip -- --device cuda:0
6+ cargo run -r -F cuda --example clip -- --device cuda:0 --dtype q4f16
77```
88
99## Results
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ fn main() -> Result<()> {
2222 let args: Args = argh:: from_env ( ) ;
2323
2424 // build model
25- let config = Config :: mobileclip_s0 ( )
26- // mobileclip_blt ()
25+ let config = Config :: mobileclip2_s0 ( )
26+ // mobileclip_s0 ()
2727 // clip_vit_b16()
2828 // clip_vit_l14()
2929 // clip_vit_b32()
Original file line number Diff line number Diff line change @@ -108,4 +108,44 @@ impl crate::Config {
108108 . with_textual_file ( "blt-textual.onnx" )
109109 . with_visual_file ( "blt-visual.onnx" )
110110 }
111+
112+ pub fn mobileclip2 ( ) -> Self {
113+ Self :: mobileclip ( ) . with_name ( "mobileclip2" )
114+ }
115+
116+ pub fn mobileclip2_s0 ( ) -> Self {
117+ Self :: mobileclip2 ( )
118+ . with_textual_file ( "s0-textual.onnx" )
119+ . with_visual_file ( "s0-visual.onnx" )
120+ }
121+
122+ pub fn mobileclip2_s2 ( ) -> Self {
123+ Self :: mobileclip2 ( )
124+ . with_textual_file ( "s2-textual.onnx" )
125+ . with_visual_file ( "s2-visual.onnx" )
126+ }
127+
128+ pub fn mobileclip2_s3 ( ) -> Self {
129+ Self :: mobileclip2 ( )
130+ . with_textual_file ( "s3-textual.onnx" )
131+ . with_visual_file ( "s3-visual.onnx" )
132+ }
133+
134+ pub fn mobileclip2_s4 ( ) -> Self {
135+ Self :: mobileclip2 ( )
136+ . with_textual_file ( "s4-textual.onnx" )
137+ . with_visual_file ( "s4-visual.onnx" )
138+ }
139+
140+ pub fn mobileclip2_b ( ) -> Self {
141+ Self :: mobileclip2 ( )
142+ . with_textual_file ( "b-textual.onnx" )
143+ . with_visual_file ( "b-visual.onnx" )
144+ }
145+
146+ pub fn mobileclip2_l_14 ( ) -> Self {
147+ Self :: mobileclip2 ( )
148+ . with_textual_file ( "l-14-textual.onnx" )
149+ . with_visual_file ( "l-14-visual.onnx" )
150+ }
111151}
You can’t perform that action at this time.
0 commit comments