delmalih / MIAS-mammography-obj-detection

Detection of tumors on mammography images
14 stars 10 forks source link

Out of bounds error and import error #2

Closed Jenifer-Anjali closed 4 years ago

Jenifer-Anjali commented 4 years ago

hey, i tried implementing the faster-r-cnn code for reference purpose in windows but when i try to Generate COCO or VOC augmented data code, i get index out of bounds error at line 68 to 75 in generate_COCO_annotations.py and also that i get import error as "no module maskrcnn_benchmark found" while i try to implement train.py even though i tried correcting the path.

Can you please help me solve the issue? Thankyou

Also i have attached the images for your reference.

1 2

delmalih commented 4 years ago

Hey,

For the 1st issue, could you please show me your Info.txt file ? (It should normally be a copy/paste of the positions of tumors given here : http://peipa.essex.ac.uk/info/mias.html - starting from mdb001 G CIRC B 535 425 197 ...)

For the 2nd issue, make sure that the package maskrcnn_benchmark is correctly installed : https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/INSTALL.md#windows-10

Jenifer-Anjali commented 4 years ago

Thank you

Jenifer-Anjali commented 4 years ago

Hello, As you mentioned i edited the info.txt file and tried to run the generate_COCO_annotations.py file but i get this key error. I have attached the info.txt file and the snapshots of the error. Also i have included the directory structure of the code, kindly help me solve this problem. 3 4 5 Info.txt

delmalih commented 4 years ago

Here is the correct Info.txt file you should use : https://github.com/delmalih/MIAS-mammography-obj-detection/blob/master/utils/Info.txt

Jenifer-Anjali commented 4 years ago

Hello sir, This is the file i have used already but still i'm getting "index 0 is out of bounds for axis 0 with size 0" when i try to map it. Exactly at line no 134 in generate_COCO_annotations.py and similar code of lines. I also tried removing the headers but the again i get error REFNUM and so on. I guess its because Info.txt file can't be read. Also could you please look at my directory structure and correct me if something's wrong.

2. Generate COCO or VOC augmented data

When i tried to run this command i get Info.txt is not found python generate_COCO_annotations.py --images ../mias-db/ --annotations ../mias-db/Info.txt --output ../mias-db/COCO--aug_fact 20 --train_val_split 0.9

1

2

3

4

delmalih commented 4 years ago

It works fine for me. Make sure :

Jenifer-Anjali commented 4 years ago

Oh I used python 3.7 let me try this and let you know how it goes.

Thanks

picEmily commented 4 years ago

@Jenifer-Anjali
in windows system,at line num 67 in generate_COCO_annotations.py should be changed as this: imgname, = os.path.splitext(os.path.basename(img_path))

Jenifer-Anjali commented 4 years ago

@Jenifer-Anjali in windows system,at line num 67 in generate_COCO_annotations.py should be changed as this: imgname, = os.path.splitext(os.path.basename(img_path))

Thank you.