dgriffiths3 / ml_segmentation Goto Github PK
View Code? Open in Web Editor NEWMachine learning semantic segmentation - Random Forest, SVM, GBC
Machine learning semantic segmentation - Random Forest, SVM, GBC
Hello dear Sir,
and thanks for sharing the code. I have some questions about the code. There are some lines that are not so clear like
num_examples = 1000 # number of examples per image to use for training model
Why do you take just 1000, what does this number represents? Which examples?
What are h_neigh and h_ind ? which role they play here?
h_ind = int((h_neigh - 1)/ 2)
label = label[h_ind:-h_ind, h_ind:-h_ind]
Why do you use patch (11,11)? You can also direct process the whole image?
cal_haralick gives back 13 features. Why do you take just the first 9 and leave the rest?
Why does the border is increased here ?
img = cv2.copyMakeBorder(img, top=border, bottom=border, \
left=border, right=border, \
borderType = cv2.BORDER_CONSTANT, \
value=[0, 0, 0])
Thanks
I have a dataset of 11000 images for semantic segmentation.
Thank you for the clean code!
Training goes fine; however, on inference it takes dozens of minutes to compute the result for a single image. The Haralick feature computation is very very slow.
I try one 64*64 pixel image, cost 20 seconds. Is it normal?
[INFO] Reading image data.
[INFO] Creating training dataset on 3 image(s).
[INFO] Computing local binary pattern features.
[INFO] Computing haralick features.
Traceback (most recent call last):=======================================] 100%
File "train.py", line 229, in
main(image_dir, label_dir, classifier, output_model)
File "train.py", line 217, in main
X_train, X_test, y_train, y_test = create_training_dataset(image_list, label
_list)
File "train.py", line 161, in create_training_dataset
features, labels = create_features(img, img_gray, label_list[i])
File "train.py", line 143, in create_features
label = label[h_ind:-h_ind, h_ind:-h_ind]
TypeError: 'NoneType' object is not subscriptable
what should I do ?
I solved this problem by changing some codes in train.py form 49 line -53 line
here is my changes:
for file in filelist:
image_list.append(cv2.imread(file, 1))
filelist2 = glob(label_dir + '/*.png')
for file in filelist2:
label_list.append(cv2.imread(file, 0))
<path/to/model.p>作者你好,请问训练命令中这个路径是什么参数啊
Hello dear Sir,
How can we use the code for 3d image segmentation. Can you help us with that?
I know that the features can be calculated and give back an array of shape(4, 13) for a whole image. The patches would not play anymore a role. Is it a good thing?
Or how can we do it for 3d image?
Thanks
I trained this on my own data of around ~ 500 images and it is performing really badly on unseen data (low generalisation). Can you comment on whether the segmented images you show in the repo description are training or unseen test images?
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.