48 Commits

Author SHA1 Message Date
Evgeny Proydakov 4699b26933 Using snprintf instead of sprintf for a tools (#6554)
Signed-off-by: Evgeny Proydakov <e.proydakov@gmail.com>
2026-02-26 10:29:28 +08:00
nihui 171b9d1bba use spdx license header, copyright Tencent (#6152) 2025-07-08 11:01:29 +08:00
nihuini e34edfb672 fix caffe2ncnn input shape for 1-dim and 2-dim blob 2021-05-06 11:35:17 +08:00
nihuini f9e42d4ee4 drop fp16 and int8 mode from caffe2ncnn, ncnnoptimize and ncnn2int8 should be used instead 2021-04-26 14:18:57 +08:00
deepage 0690995b1a Update caffe2ncnn.cpp (#2188) 2020-10-10 12:30:37 +08:00
Evgeny Proydakov ecc63a6d52 Fixed compile warning for macos in caffe2ncnn/onnx2ncnn (-Wdeprecated-declarations) (#2180) 2020-10-09 10:11:14 +08:00
Evgeny Proydakov a5b8ca8502 Fixed compile warning for macos in caffe2ncnn (-Wformat) (#2162) 2020-09-30 06:01:15 +08:00
nihui 3ef995ed1e format code style and setup restyled.io (#1840) 2020-06-13 22:17:51 +08:00
JackieWu ce2251db05 Improve ROIAlign (accelerate ROIAlign, support sampling ratio and aligned ROIAlign) (#1820)
* update roialign

* update tool for roialign

* fix ceil for roialign

* fix ios build

* fix

* fix

* make it compatibile with the old version

* fix ios build

* trigger CI

* fix test

* order

* build

* remove code

* merge roialign

* accelerate ROIAlign

* update note

* rename func

* roialign version

* trigger CI

* fix roialign

* use ref for pre-calc in roialign

* retrigger CI

* pre-alloc
2020-06-08 21:40:24 +08:00
nihui 9929d52885 less duplicated code for crop layer, slice axes starts from 0 2020-02-29 18:54:53 +08:00
kalcohol 01853010ea type conversion and MSVC _CRT_SECURE_NO_DEPRECATE warning fix (#1524)
* fix type conversion warning

* fix MSVC _CRT_SECURE_NO_DEPRECATE warning

* type conversion: missing one

* fix  MSVC _CRT_SECURE_NO_DEPRECATE warning and type warning

* reformat

* convert google::protobuf::int64 to size_t to avoid type impl between msvc and gcc gap

* remove C++11 auto

* tab -> space
2020-02-07 14:33:01 +08:00
nihuini c9a9128db7 convert caffe Slice slice_dim 2019-10-30 19:25:13 +08:00
nihuini 7d3ebe2d69 %g may output number without dot, stick to %e 2019-09-26 19:38:03 +08:00
nihuini d67d2531ae convert some well-known noop, printf %g to preserve precision 2019-09-18 16:42:46 +08:00
tpoisonooo 8dbafe7764 constraint input value to [-127, +127] (#1258)
* constraint input value to [-127, +127]

* keep new line at the end
2019-09-14 14:06:43 +08:00
nihui 7ab968e6e1 fix gpu crop, convert crop offset with axis 2019-03-25 23:18:14 +08:00
nihuini 9787625e4b warn users about the old wrong softmax behavior on axis not zero 2019-03-07 17:33:24 +08:00
BUG1989 df3d224484 new int8 implement,better accuracy (#749)
* add the armv7a conv3x3s1 implement without overflow,remove old codes

* fix the bug of conv3x3s2 packed int8

* new int8 implement,weight quant by perchanel,better accuracy~

* fix the bug of conv3x3s1 packed int8 neon

* add the naive c fp32 and int8 winograd F(2,3)

* add the neon intrinsic int8 winograd F(2,3)

* optimize the armv7a int8 winograd F(2,3) with neon assembly

* optimize the armv7a int8 winograd F(2,3) input transform with assembly.

* add the requantize layer and int8 relu implement.

* add graph optimize conv1x1s2 -> conv1x1s1,begin optimize int8 aarch64.

* fix int8 bugs

* add the c naive im2col with sgemm

* add aarch64 int8 winograd f23, conv3x3s2 naive implement

* add the int8 sgemm conv7x7s2 on x86/armv7a platform

* optimize the int8 sgemm by neon intrinsic and packed kernel

* optimize the int8 sgemm with packed data

* optimize the int8 sgemm with armv7a neon assembly

* add the int8 sgemm on arm64-v8a platform

* perpare to merge latest codes from master

* add the int8 param files

* In the Class Net,add the fuse_network method
2019-03-05 11:39:25 +08:00
nihui d85775fbcd fix softmax axis order on 3-dim, fix caffe reshape conversion, regenerate ssd param 2019-03-03 14:20:05 +08:00
nihuini 9b10729860 fix read_int8scale_table, second try 2018-11-22 10:35:40 +08:00
nihuini 501cdf2adf fscanf may advance stream position, workaround it 2018-11-21 20:05:13 +08:00
nihuini 83818bd52e convert roialign 2018-11-21 11:53:11 +08:00
nihuini faac207410 convert psroipooling 2018-11-16 16:23:38 +08:00
Ming-Yang Liu dfbed5a0ad Support yolov3 and mobilenet yolov3 2018-11-07 22:54:25 +08:00
BUG1989 d5df2301cb fix the caffe2ncnn that "DepthwiseConvolution" loss group num param (#540)
* fix the caffe2ncnn  bug that "DepthwiseConvolution" loss group num param
2018-08-23 18:12:44 +08:00
nihuini 2dbaf6f7b7 store int8 scale in binary 2018-08-10 14:38:40 +08:00
nihui 5d04a3a45c layer holds bottom blob scale, depthwise convolution read group scales 2018-08-04 23:19:10 +08:00
nihui 354b95256c bump param version, backward compatible 2018-08-04 12:55:12 +08:00
nihui a169cec363 core int8 inference, quantize and dequantize, net using flag, caffe2ncnn reads int8 scale table 2018-07-29 16:19:01 +08:00
nihui 0b6791e2ba convert BN ReLU6 Reorg YoloDetectionOutput Embed LSTM 2018-06-30 16:13:46 +08:00
nihuini 588487a8a0 convert caffe crop layer with three offset, fix #165 2018-06-15 16:28:21 +08:00
nihuini babbb604e1 fix deconvolution weight order 2018-06-01 11:07:50 +08:00
nihuini 3b8a3f6764 convert depthwiseconvolution from yonghenglh6 branch 2018-05-10 10:48:25 +08:00
nihuini b560252af1 handle batchnorm scale_factor zero, fix #302 2018-04-27 10:48:32 +08:00
nihuini db4b04da53 fix slice with implicit slice point 2018-04-16 17:11:20 +08:00
nihui 0e41c37250 convert convolution pad_w pad_h 2018-03-31 16:54:10 +08:00
nihui d2c01019aa fix convert depthwise deconvolution, fix #300 2018-03-24 11:09:50 +08:00
yqz c6abc872df fix mvn no load param in caffe2ncnn 2018-01-31 17:18:06 +08:00
nihui c9789fb879 slice dim 2018-01-13 20:50:00 +08:00
nihui 0f52418023 change input param order to w h c, replace caffe MemoryData to Input 2017-12-16 12:37:06 +08:00
nihui abfd3ea6c8 convert non-square convolution pooling param 2017-12-16 12:26:46 +08:00
Zexin, Hu 81fb3818a5 add ShuffleChannel layer, only cpp, no arm yet (#210)
* add ShuffleChannel layer, only cpp, no arm yet

* add   assign
2017-12-10 11:48:56 +08:00
nihuini 25f19c2009 implement external scale blob, support SENet 2017-12-01 10:53:12 +08:00
nihuini 96aa5d61af do not print relu negative slope if it is zero 2017-11-22 16:40:36 +08:00
nihuini 8e12bc916d compability improvement for https://github.com/farmingyard/caffe-mobilenet 2017-11-22 16:12:08 +08:00
nihuini e8248ecab0 check dropout has_scale_train 2017-11-16 16:53:47 +08:00
tedder59 4d59d0afda Add depthwise Deconvolution. (#187)
* add depthwise deconvolution.

* add depthwise deconvolution.

* fix some syntax error and uncessary modification
2017-11-14 10:19:37 +08:00
nihuini 20f49b677c move caffe2ncnn to subdir, build mxnet2ncnn 2017-11-01 15:32:52 +08:00