xuduo35 / unet_mxnet2ncnn Goto Github PK
View Code? Open in Web Editor NEWtrain mxnet unet, then run it in ncnn
train mxnet unet, then run it in ncnn
Hi, thanks for your sharing. I want to know how about the fps and hardware configure in your test, can you share this information. Thanks!
when i run trainunet, I get train_loss and validat_loss, It doesn't feel right
New training ...
Best model at Epoch 1
Epoch 0: Moving Training Loss -0.98716, Validation Loss -0.98693
......
Epoch 23: Moving Training Loss -0.99521, Validation Loss -0.99272
Epoch 24: Moving Training Loss -0.99550, Validation Loss -0.99271
.....
i have model trained UNET segmentation (keras), then converted to NCNN (param, bin) by tool keras2ncnn. Can i use this source code for my converted model? Thanks <3
top = (INPUT_HEIGHTtop)/width;
bottom = (INPUT_HEIGHTbottom)/width;
left = (INPUT_WIDTHleft)/height;
right = (INPUT_WIDTHright)/height;
请教您一下,这四个变量这么定义有什么具体的意义吗?
when i finish the train work and get best_unet_person_segmentation-symbol.json and best_unet_person_segmentation-0000.params
the predict encounter this error:
data: (1, 3, 256, 256)
[08:41:50] c:\jenkins\workspace\mxnet-tag\mxnet\src\common\exec_utils.h:392: InferShape pass cannot decide shapes for the following arguments (0s means unknown dimensions). Please consider providing them as inputs:
softmax_label: [],
When I train ,got these errors:
Traceback (most recent call last):
File "trainunet.py", line 95, in
main()
File "trainunet.py", line 73, in main
curr_loss = F.mean(loss).asscalar()
File "/Library/Python/2.7/site-packages/mxnet/ndarray/ndarray.py", line 1990, in asscalar
return self.asnumpy()[0]
File "/Library/Python/2.7/site-packages/mxnet/ndarray/ndarray.py", line 1972, in asnumpy
ctypes.c_size_t(data.size)))
File "/Library/Python/2.7/site-packages/mxnet/base.py", line 252, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [09:22:19] src/operator/nn/./deconvolution-inl.h:224: Check failed: req[deconv::kOut] == kWriteTo (0 vs. 1)
when i train the unet i get this loss value:
Epoch 8: Moving Training Loss -0.98323, Validation Loss -0.94432
raining 0/10 ./datasets/humanparsing/JPEGImages/2500_1005.jpg
raining 1/10 ./datasets/humanparsing/JPEGImages/2500_1004.jpg
raining 2/10 ./datasets/humanparsing/JPEGImages/2500_10.jpg
raining 3/10 ./datasets/humanparsing/JPEGImages/2500_1002.jpg
raining 4/10 ./datasets/humanparsing/JPEGImages/2500_1006.jpg
raining 5/10 ./datasets/humanparsing/JPEGImages/2500_1003.jpg
raining 6/10 ./datasets/humanparsing/JPEGImages/2500_1000.jpg
raining 7/10 ./datasets/humanparsing/JPEGImages/2500_100.jpg
raining 8/10 ./datasets/humanparsing/JPEGImages/2500_1001.jpg
raining 9/10 ./datasets/humanparsing/JPEGImages/2500_1.jpg
raining 10/10
g 0/10 ./datasets/humanparsing/JPEGImages/dataset10k_6506.jpg
g 1/10 ./datasets/humanparsing/JPEGImages/dataset10k_6507.jpg
g 2/10 ./datasets/humanparsing/JPEGImages/dataset10k_6508.jpg
g 3/10 ./datasets/humanparsing/JPEGImages/dataset10k_6509.jpg
g 4/10 ./datasets/humanparsing/JPEGImages/dataset10k_651.jpg
g 5/10 ./datasets/humanparsing/JPEGImages/dataset10k_6510.jpg
g 6/10 ./datasets/humanparsing/JPEGImages/dataset10k_6511.jpg
g 7/10 ./datasets/humanparsing/JPEGImages/dataset10k_6512.jpg
g 8/10 ./datasets/humanparsing/JPEGImages/dataset10k_6513.jpg
g 9/10 ./datasets/humanparsing/JPEGImages/dataset10k_6514.jpg
g 10/10
Epoch 9: Moving Training Loss -0.98339, Validation Loss -0.94633
is this loss value right? thank you!
when run python trainunet.py.
File "/usr/local/lib/python3.4/dist-packages/mxnet/base.py", line 251, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [01:35:45] src/storage/./cpu_device_storage.h:73: Failed to allocate CPU Memory
my unet convert to ncnn(.param/.bin),no error appear
when I inference in vs2017,
.......
ncnn::Mat mask;
ex.extract("final_layer", mask);
std::cout << "whc " << mask.w << " " << mask.h << " " << mask.c << " " << std::endl;
get : whc 2 128 2
so ,why mask.h != mask.w ? my model should get (128,128,2) output.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.