summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingbei Li2018-12-11 18:46:22 +0800
committerJingbei Li2018-12-11 18:46:22 +0800
commitcbdfef2e5976523d8a139807b360cd35c57ac095 (patch)
tree496ab93a7a90acbd762f71f81fab5e279ea9e41c
parentdf51b2922efcd58a9341caa1421d4e44814e2053 (diff)
downloadaur-cbdfef2e5976523d8a139807b360cd35c57ac095.tar.gz
upgraded to 1.3.1
-rw-r--r--.SRCINFO8
-rw-r--r--13559.patch105
-rw-r--r--PKGBUILD11
3 files changed, 118 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0fc9c4d09345..c4af3d1fd84d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mxnet
pkgdesc = Flexible and Efficient Library for Deep Learning
- pkgver = 1.3.0
- pkgrel = 3
+ pkgver = 1.3.1
+ pkgrel = 1
url = http://mxnet.io/
arch = x86_64
license = Apache
@@ -31,9 +31,11 @@ pkgbase = mxnet
optdepends = opencv
optdepends = vtk
optdepends = glew
- source = git+https://github.com/apache/incubator-mxnet#tag=1.3.0
+ source = git+https://github.com/apache/incubator-mxnet#tag=1.3.1
+ source = 13559.patch
source = cuda_call.patch
md5sums = SKIP
+ md5sums = 74b7b068f126e34633f82319cc801b4c
md5sums = 77a777e6971e568177e0ea3aeecb401c
pkgname = mxnet
diff --git a/13559.patch b/13559.patch
new file mode 100644
index 000000000000..753f4e5f1d5f
--- /dev/null
+++ b/13559.patch
@@ -0,0 +1,105 @@
+diff --git a/src/io/image_aug_default.cc b/src/io/image_aug_default.cc
+index f31664709bd..a6d7cc1204f 100644
+--- a/src/io/image_aug_default.cc
++++ b/src/io/image_aug_default.cc
+@@ -479,14 +479,14 @@ class DefaultImageAugmenter : public ImageAugmenter {
+ }
+ if (rand_order[i] == 1) {
+ // contrast
+- cvtColor(res, temp_, CV_RGB2GRAY);
++ cvtColor(res, temp_, cv::COLOR_RGB2GRAY);
+ float gray_mean = cv::mean(temp_)[0];
+ res.convertTo(res, -1, alpha_c, (1 - alpha_c) * gray_mean);
+ }
+ if (rand_order[i] == 2) {
+ // saturation
+- cvtColor(res, temp_, CV_RGB2GRAY);
+- cvtColor(temp_, temp_, CV_GRAY2BGR);
++ cvtColor(res, temp_, cv::COLOR_RGB2GRAY);
++ cvtColor(temp_, temp_, cv::COLOR_GRAY2BGR);
+ cv::addWeighted(res, alpha_s, temp_, 1 - alpha_s, 0.0, res);
+ }
+ }
+@@ -495,7 +495,7 @@ class DefaultImageAugmenter : public ImageAugmenter {
+ // color space augmentation
+ if (param_.random_h != 0 || param_.random_s != 0 || param_.random_l != 0) {
+ std::uniform_real_distribution<float> rand_uniform(0, 1);
+- cvtColor(res, res, CV_BGR2HLS);
++ cvtColor(res, res, cv::COLOR_BGR2HLS);
+ // use an approximation of gaussian distribution to reduce extreme value
+ float rh = rand_uniform(*prnd); rh += 4 * rand_uniform(*prnd); rh = rh / 5;
+ float rs = rand_uniform(*prnd); rs += 4 * rand_uniform(*prnd); rs = rs / 5;
+@@ -515,7 +515,7 @@ class DefaultImageAugmenter : public ImageAugmenter {
+ }
+ }
+ }
+- cvtColor(res, res, CV_HLS2BGR);
++ cvtColor(res, res, cv::COLOR_HLS2BGR);
+ }
+
+ // pca noise
+diff --git a/src/io/image_det_aug_default.cc b/src/io/image_det_aug_default.cc
+index afe5174b75d..5476ea37218 100644
+--- a/src/io/image_det_aug_default.cc
++++ b/src/io/image_det_aug_default.cc
+@@ -547,7 +547,7 @@ class DefaultImageDetAugmenter : public ImageAugmenter {
+ if (h != 0 || s != 0 || l != 0) {
+ int temp[3] = {h, l, s};
+ int limit[3] = {180, 255, 255};
+- cv::cvtColor(res, res, CV_BGR2HLS);
++ cv::cvtColor(res, res, cv::COLOR_BGR2HLS);
+ for (int i = 0; i < res.rows; ++i) {
+ for (int j = 0; j < res.cols; ++j) {
+ for (int k = 0; k < 3; ++k) {
+@@ -558,7 +558,7 @@ class DefaultImageDetAugmenter : public ImageAugmenter {
+ }
+ }
+ }
+- cv::cvtColor(res, res, CV_HLS2BGR);
++ cv::cvtColor(res, res, cv::COLOR_HLS2BGR);
+ }
+ if (std::fabs(c) > 1e-3) {
+ cv::Mat tmp = res;
+diff --git a/src/io/image_io.cc b/src/io/image_io.cc
+index b3f7c40b2b1..438c6157865 100644
+--- a/src/io/image_io.cc
++++ b/src/io/image_io.cc
+@@ -169,7 +169,7 @@ void ImdecodeImpl(int flag, bool to_rgb, void* data, size_t size,
+ }
+ CHECK_EQ(static_cast<void*>(dst.ptr()), out->data().dptr_);
+ if (to_rgb && flag != 0) {
+- cv::cvtColor(dst, dst, CV_BGR2RGB);
++ cv::cvtColor(dst, dst, cv::COLOR_BGR2RGB);
+ }
+ }
+ #endif // MXNET_USE_OPENCV
+diff --git a/tools/im2rec.cc b/tools/im2rec.cc
+index 915b78029c8..beae75361c4 100644
+--- a/tools/im2rec.cc
++++ b/tools/im2rec.cc
+@@ -85,9 +85,9 @@ int main(int argc, char *argv[]) {
+ int partid = 0;
+ int center_crop = 0;
+ int quality = 95;
+- int color_mode = CV_LOAD_IMAGE_COLOR;
++ int color_mode = cv::IMREAD_COLOR;
+ int unchanged = 0;
+- int inter_method = CV_INTER_LINEAR;
++ int inter_method = cv::INTER_LINEAR;
+ std::string encoding(".jpg");
+ for (int i = 4; i < argc; ++i) {
+ char key[128], val[128];
+@@ -192,11 +192,11 @@ int main(int argc, char *argv[]) {
+ std::vector<unsigned char> encode_buf;
+ std::vector<int> encode_params;
+ if (encoding == std::string(".png")) {
+- encode_params.push_back(CV_IMWRITE_PNG_COMPRESSION);
++ encode_params.push_back(cv::IMWRITE_PNG_COMPRESSION);
+ encode_params.push_back(quality);
+ LOG(INFO) << "PNG encoding compression: " << quality;
+ } else {
+- encode_params.push_back(CV_IMWRITE_JPEG_QUALITY);
++ encode_params.push_back(cv::IMWRITE_JPEG_QUALITY);
+ encode_params.push_back(quality);
+ LOG(INFO) << "JPEG encoding quality: " << quality;
+ }
diff --git a/PKGBUILD b/PKGBUILD
index 12c77b2aa438..fba8434183f7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
# Contributor: Carl Ã…kerlindh <carl.akerlindh at gmail dot com>
pkgname=mxnet
_gitname=incubator-mxnet
-pkgver=1.3.0
-pkgrel=3
+pkgver=1.3.1
+pkgrel=1
pkgdesc="Flexible and Efficient Library for Deep Learning"
arch=('x86_64')
url="http://mxnet.io/"
@@ -12,8 +12,9 @@ depends=('hdf5' 'cblas' 'lapack' 'python-numpy' 'python-requests' 'intel-tbb')
optdepends=('cairo' 'cuda' 'cudnn' 'gtk3' 'gtkglext' 'python-graphviz' 'opencv' 'vtk' 'glew')
makedepends=(${optdepends[@]} 'git' 'cython')
source=("git+https://github.com/apache/$_gitname#tag=$pkgver"
+ '13559.patch'
"cuda_call.patch")
-md5sums=('SKIP' '77a777e6971e568177e0ea3aeecb401c')
+md5sums=('SKIP' '74b7b068f126e34633f82319cc801b4c' '77a777e6971e568177e0ea3aeecb401c')
prepare() {
cd "$srcdir/$_gitname"
@@ -57,6 +58,10 @@ prepare() {
# https://github.com/apache/incubator-mxnet/pull/12374
patch -p1 < ${srcdir}/cuda_call.patch
+
+ # Modified from https://github.com/apache/incubator-mxnet/pull/13559
+ patch -p1 < ${srcdir}/13559.patch
+ sed 's/opencv)/opencv4)/g' -i Makefile
}
build() {