artyze / yolo_segmentation Goto Github PK
View Code? Open in Web Editor NEWimage (semantic segmentation) instance segmentation by darknet or yolo
image (semantic segmentation) instance segmentation by darknet or yolo
Thank you for the code. I've tried to train our own dataset in GPU. When I set GPU and CUDNN in preprocessor, I got many unresolved external symbol error such as activate_array_gpu, which is defined in activation_kernels.cu. What can I do to fix them?
Hi,
ThanX great work as such this project.
I have started reproducing your great result, but a no pretrained weight to check our result.
Can you send me pretrained weights file to below,
As of now, we can not get good result of our project, but we try hardly to reproduct and will send you our result sometimes.
Best regards.
My environments
OS: ubuntu 18.04
I prepared data like below.
data file
classes= 4
train = /home/yes89929/segmentation/yolo_segmentation/data/list/cityscapes/train.lst
valid = /home/yes89929/segmentation/yolo_segmentation/data/list/cityscapes/val.lst
names = /home/yes89929/segmentation/yolo_segmentation/data/label.names
backup = backup
results = /home/yes89929/segmentation/yolo_segmentation/result/
labels = /home/yes89929/segmentation/yolo_segmentation/aachen_resize/
train.lst file
/home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknr8wpn0000n3a6bqi0tcty2_leftImg8bit.png
/home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknr5qx27000u3a6bef9amy90_leftImg8bit.png
/home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknjitehd11na3a6b8jfct2n0_leftImg8bit.png
/home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknpkd4t50xx83a6bc6e4q18x_leftImg8bit.png
/home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknpw2l3p03b53a6bd02uuz5o_leftImg8bit.png
Terminal command
./darknet segmenter train cfg/maskyolo.data cfg/segment.cfg cfg/instance_segment_161000.weights
Output message
I added some code for printing function name and image path.
load_data_seg
load_image_color: /home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknjkfr0y11pk3a6bxdpgf8pl_leftImg8bit.png
load_image: /home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknjkfr0y11pk3a6bxdpgf8pl_leftImg8bit.png
stbi_load: /home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknjkfr0y11pk3a6bxdpgf8pl_leftImg8bit.png
fopen result: false
Message printed from original code.
"annot load image "/home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknjkfr0y11pk3a6bxdpgf8pl_leftImg8bit.png
STB Reason: can't fopen
I made code to test fopen(), and confirmed fopen() work.
code
#include <iostream>
int main(int, char**) {
std::cout << "Hello, world!\n";
FILE* f = fopen("/home/yes89929/segmentation/yolo_segmentation/data/cityscapes/leftImg8bit/train/cknskurbm000e3a6blrlysviw_leftImg8bit.png", "rb");
if (!f)
{
printf("fail\n");
}
else
{
printf("success\n");
}
}
Output message
Hello, world!
success
I have no idea about this problem.
Hello ,
i have successfully launched the training after changing the code and using backup/segment.backup made by segment.backup when i do training for the first time .
My problem is that avg value doesn't decrease and the rate of learning doesn't increase during the training.
How can i fix this issue ?
Thanks
c++ 怎么调用这个修改后的darknet
Hi, I got "CUDA Error: an illegal memory access was encountered" when I was testing an image with [logistic], I also tried [softmax] which run succefully but pred.png was totally dark.
Would you mind helping to solve this problem?
Thanks
Julien
Couldn't open file: /backup//segment_40.weights
cityscapes have lane annotation?
@ArtyZe are you looking into the implementation of yolact into your current repo do u have any future thoughts on thsi
Nice Job!
I download your repo, with GPU=1/OPENCV=1/CUDNN=1 .
make -j8
Error occurs in ./src/image.c L1464
It seems you don't declare i,j,k and c,h,w before.When I annotate the wrong code, compile goes well, but I can't use the original detetctor demo func.
I can compile with the original darknet code on my aarch64 TX2.
I'm looking forward to your reply, Thx
Hello ,
What should i change to training custom dataset for exemple ?
dataset with one class
Hi.
Thanks you for sharing good code.
Now I`m training your model. But It seems like using 1 GPU.
Can I use multiple GPUs by just using arguments on terminal?
OR
need I modify some code?
Can anybody share with me a sample data set and train.txt to be include in data set configuration file. including the format of train.txt. Thanks.
Hi, Thanks for your project. Could you help to share the weights and cfg file? It is hard for me to train from scratch by my estimation. I would like to get your weights as pre-trained weights for my project.
您好,能提供一下cfg和weights吗?上传到百度或google云盘,或者发我邮箱:[email protected]
I've noticed that in predict_segmenter method, it will call
if (l.out_w && l.out_h && l.out_c){ return float_to_image(l.out_w, l.out_h, l.out_c, l.output); }
image float_to_image(int w, int h, int c, float *data) { printf("c = %d, w = %d, h = %d\n", c, w, h); image out = make_image(w,h,1); for(int ii=0; ii<w*h; ii++){ int max_id = 0; float max_value = 0; for(int jj = 0; jj < c; ++jj){ if(max_value < data[jj*w*h + ii]){ max_value = data[jj*w*h + ii]; max_id = jj; } } if(max_value > 0.05){ out.data[ii] = (float)max_id; }else{ out.data[ii] = 0; } } return out; }
I thought that value of l.output will be between 0 and 1 as softmax is used at end, but they are not (I saw most of them are <0 or >1 values). What is l.output and why > 0.05 is used? Thanks much!
Hello ,
I tried to train my own dataset using this project but it failed ,
For the first time , i didn't get any errors when runing this command :
./darknet segmenter train data/obj.data cfg/segment.cfg segment.backup
this is the output for the first time ( but training doesn't work ):
33 logistic x entropy 173056
Loading weights from segment.backup...Done!
the net n is 34
Learning Rate: 1e-07, Momentum: 0.9, Decay: 0.0005
2357
Saving weights to backup/segment.weights
When i tried again , i get this error :
33 logistic x entropy 173056
Loading weights from segment.backup...Done!
the net n is 34
Learning Rate: 1e-07, Momentum: 0.9, Decay: 0.0005
2357
Saving weights to backup/segment.weights
Cannot load image "/home/starinfo/yolo_segmentation/mask/Img_810_img.txt"
STB Reason: can't fopen
How can i solve those issues ?
Thanks
I was wondering if the pre-trained model for tiny version is available online.
at first,thank you for the project.when I try to use the opencv lib,there are some small bug finded:
./src/image.c: In function ‘test_resize’:
./src/image.c:1464:9: error: ‘k’ undeclared (first use in this function)
Hi, to make use of ur repo on window. I try to copy your files into the AlexeyAB files and build darknet with msvs but however it fails with error such as
C1083 Cannot open include file: 'darknet.h': No such file or directory darknet c:\darknet-master\darknet-master\src\activations.h 3
I'm not sure if i did it in a correct way. Do you have any guide to install it on window ?
I think I can imagine what cfg setting is.
and whats the sample label rule do you set? is it a "binary image+src image" for every target? or some rule like "0 2532 12 2624 12 2881 10 3012 10 ..."
@ArtyZe Can you please elaborate the process , datasets preparation and training for multiple classes?
@ArtyZe
Hi, thank you for the project it's really helpful, but I want to know how I can organize my dataset (data file)for the training and what tools do you use for the segmentation-annotation. ????
I can not find Find_replace function in "segmenter"
Can you pls upload the weights and cfg files somewhere
@ArtyZe thanks for the source code and sharing the model . i have few queries
Thanks in advance
while(1){
image aug = random_augment_image(im, 0, .75, 320, 448, 320, 320);
show_image(aug, "aug", 1);
free_image(aug);
for(k = 0; k < c; ++k){
for(j = 0; j < h; ++j){
for(i = 0; i < w; ++i){
int dst_index = i + w*j + w*h*k;
int src_index = k + c*i + c*w*j;
im.data[dst_index] = (float)data[src_index]/255.;
}
}
some variable is not define, so some problem happens;
./src/image.c: In function ‘test_resize’:
./src/image.c:1467:22: error: ‘h’ undeclared (first use in this function)
for(j = 0; j < h; ++j){
^
compilation terminated due to -Wfatal-errors.
Makefile:85: recipe for target 'obj/image.o' failed
have u consider of combine detection and segmentation?
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.