Detecting Brain Tumor?

asked 2018-04-03 12:45:05 -0500

Philia gravatar image

Hey there guys. Newbie here.

I am trying to train a haar cascade file to detect tumors.

Here is the approach I am considering.

  1. Have 8-10 brain images.

  2. Have 1000 negative images.

  3. Draw those brain images in those neg images. Creating many positive samples.

  4. Create vector files for those 10-12 files.

  5. Merge vector files into one.

  6. Train Cascade with that vector.

  7. Extract several tumors from brain images and repeat the process to detect tumors.

  8. Train Cascade for tumor but code it to detect tumor only inside brain.

My questions are: 1. Is there anything wrong with my process?

  1. How many stages should I train for brain and tumor?

  2. Is number of samples enough? Or do I need more?

  3. This is the command I am using to train my cascade.

    opencv_traincascade -data 03 -vec tumor_x.vec -bg bg2.txt -numPos 1600 -numNeg 800 -numStages 8 -w 20 -h 20

Is my numPos and numNeg alright? Or do I need to increase or decrease it for good detection?



edit retag flag offensive close merge delete


LBerger gravatar imageLBerger ( 2018-04-03 14:03:10 -0500 )edit

"I am trying to train a haar cascade file to detect tumors. " -- that probably will NOT work

berak gravatar imageberak ( 2018-04-03 16:20:02 -0500 )edit

Why not ?

Philia gravatar imagePhilia ( 2018-04-03 22:56:57 -0500 )edit

please show 1 or 2 example images.

cascades only work with rigid objects, and it needs a reliable, reproducable texture / shape. they're also not invariant against pose / rotation / perspective

then, trying to "synthesize" artificial positives from few original ones never works in real life.

berak gravatar imageberak ( 2018-04-04 01:26:49 -0500 )edit

Well mister I need to do it for a project. If it is somewhat decent it would still do. It doesn't have to be super accurate. I can train with large quantity of samples.

Philia gravatar imagePhilia ( 2018-04-04 09:27:44 -0500 )edit

i'm only trying to save you a lot of wasted time here.

berak gravatar imageberak ( 2018-04-04 09:29:56 -0500 )edit

Is it that hopeless?

Philia gravatar imagePhilia ( 2018-04-04 10:36:47 -0500 )edit

well i DO think so. still go, make a minimal attempt at it, meanwhile collect as many real images as you can. also explore alternatives, like training an SSD cnn with caffe, tensorflow, or yolo.

berak gravatar imageberak ( 2018-04-04 10:42:11 -0500 )edit

Should I try tensorflow object detection?

Philia gravatar imagePhilia ( 2018-04-04 12:29:27 -0500 )edit

go back to first comment : bibliography

LBerger gravatar imageLBerger ( 2018-04-04 14:46:24 -0500 )edit