Open jinyu121 opened 6 years ago
Hi jinyu121. Thank you for this fantasic tutorial and i felt happy when you do this, but i am stuck at step 5 of the Generate Proposals. I tried to install Edges following pdollar's instructions. It was not working. How to install Structured Edge Detection Toolbox on Ubuntu.
@jinyu121 Great work! It saves us lots of time : )
Hi jinyu121. Thank you for this fantasic tutorial and i felt happy when you do this, but i am stuck at step 5 of the Generate Proposals. I tried to install Edges following pdollar's instructions. It was not working. How to install Structured Edge Detection Toolbox on Ubuntu.
Hello, have you solved this problem? I have the same problem. If you have solved it, could you tell me how to solve it
@masaruhoang Hello, have you solved this problem? I have the same problem. If you have solved it, could you tell me how to solve it
I gave up as this code uses Matlab :(
@jinyu121 Thank you so much!!
I've modified a line in the code "dataset.py" for can run on Python 2.7 and TensorFlow 1.4.0 or less. I hope that help to future people. I changed the line 73 for something like that:
example = tf.train.Example(features=tf.train.Features(feature={"img_features", "proposals", "objects"}))
For the users that don't can run the pdollar or installed it, Matlab is easier than pdollar. The code delay around 1 hour. The instructions are:
1.- Open Matlab 2.- Open the file compute_edgeboxes.m 3.- Modified the paths such as: addpath(genpath('/home/user/incremental_detectors/edges/')); addpath(genpath('/home/user/incremental_detectors/piotr_toolbox/toolbox/')); voc_dir = '/home/user/incremental_detectors/datasets/voc/VOCdevkit/VOC2007/'; model = load('/home/user/incremental_detectors/edges/models/forest/modelBsds'); 4.- This generate the data into dataset folder
You should follow the instructions that Jinyu told us. I only mentioned some things to help.
I gave up as this code uses Matlab :( @giangnguyen2412 Same here!! Did you find anything else over the internet for Incremental learning in Object detection? (Code not paper)
@vishwa30 why you ask me that? There are a lot of papers about Incremental learning in Object detection. Just googling and you can find them.
@jinyu121 @Joker316701882 @AldrichCabrera @masaruhoang @giangnguyen2412 guys, when I running the script for training first (let's say 3 classes), I am getting this error:
tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value resnet_v1_50/block3/unit_4/bottleneck_v1/conv2/BatchNorm/beta [[{{node resnet_v1_50/block3/unit_4/bottleneck_v1/conv2/BatchNorm/beta/read}}]]
My iterations have been completed but I think this is while "eval" process. Thanks in advance for your help.
Thank you for this amazing tutorial
Please, did you run compute_edgeboxes.m after using your own data ? (because for me, it changes even the number of classes) Thanks
I copy this post from my blog.
What is the most distressing thing in life?
Not money, not paper, but the author released their fantastic code while you do not know how to run it.
So, this tutorial records how I run the code using VOC 2007 dataset.
Prepare
conda install tensorflow-gpu==1.5
)datasets
,resnet
Download dataset
Well, nothing to say.
Then, make a soft link
ln -s XXXX/VOCdevkit ./datasets/voc/VOCdevkit/
Finally, create a folder
mkdir -p ./datasets/voc/VOCdevkit/VOC2007/EvalCache/
, or you will get an error when evaluating.Generate proposals
I HATE MATLAB.
cd
into the code foldergit clone https://github.com/pdollar/edges
https://pdollar.github.io/toolbox/archive/piotr_toolbox.zip
and unzip itcompute_edgeboxes.m
. Comment the COCO part, uncomment VOC part. Change paths. Notice that the result folder should beEdgeBoxesProposals
cd edges
and compile it follow the instructions:compute_edgeboxes.m
. It will take a looooooooooooooong timePS: the toolbox says that it can process images at the speed of 60fps, but in my machine, 0.6 FPS. :sob: 6 hours for VOC, and 37+ hours for COCO.
Make tfrecord
Well, next, generate tfrecord files.
Open
datasets.py
, in the end, you can see the__main__
. Modify it, or just stay them unchanged.If your split is not called
train
,val
,trainval
ortest
, delete the assert inVOCLoader
.Then, run this file.
The result file will show in the
datasets
folder.Run the code! hahaha
For example, I want to train (5+5+5+5).
To start the first session, run
And for the following sessions:
And you can notice that this code only use the first GPU.
BTW: you should change the parameter, like
40K
, to your own!!!Use on my own dataset
Personally, it is easy to convert other dataset formats to VOC format. Isn't it?
So, the first step, convert your dataset! (For me, I convert COCO to VOC)
Then, replace the class names in
voc_loader.py
.Then, search
20
through all codes, and replace into your class numbers. (For me, 20 to 80)Finally, run
python3 dataset.py
to generate tfrecord files, and train the net.WARNING: Maybe you should write a script to re-start training after it crashes due to the annoying NaN loss......
Thank you again for the amazing code, and have fun.