mask is not added for mask_rcnn_inception_v2
System information
- What is the top-level directory of the model you are using:
/models/object_detection
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
NO only launch data_tools/create_pet_tf_record.py with parameter faces_only False (i want mask)
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Debian 9
- TensorFlow installed from (source or binary):
installation from pip3, python 3.6
- TensorFlow version (use command below):
1.8.0 cpu installation
protobuf 3.6
Describe the problem
_create files as gear_1.jpg /2,3,4.... create files as gear_1.xml create mask file as gear_1.png
path /images/mask/images images/mask/test_images images/mask/annotations/xmls images/mask/annotations/trimaps (mask png into)
put all files created into above directory
config file is configured to take mask and in PNG format
data_tools/create_pet_tf_record.py
i verified there is image/object/mask in record files
train-0000-of-00010.record (several files like this - 10)_
then i launch train.py /eval.py but mask is not displayed (my mask is just line who delimiter object not complete object ,juste delimitation).
How i can add the mask or see it in eval ? or detection ?
Source code / logs
no error log juste bounding box displayed, not mask.... i become crazy!
please no one could make it work with precise command to execute ? it is not clear and i made exaclty as all tutorial but with pet dataset (i have not json ...)
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/instance_segmentation.md
i made all things specified here or in all tutorial without success, ,maybe it miss one command or one configuration but not clear, i use the pet record tf file with my own dataset.. all is ok ,only mask is not displayed , i ask question on stackoverflow but no answer it is really annoying please help me !
i tried to simply pet dataset record => untar , then data/create_pet_tfrecord.py then train,eval, tensorboard, after 14K step, only bounding box no mask i am in CPU mode Anyone to help me please ?
Hi leccyril, Have you resolved your issue ? Cause I'm experiencing the exact same trouble on my end and it's getting frustrating.
I have also implemented the 1.8 tensorflow version, running the mask_rcnn_inception_v2_coco model (CPU mode). I've done everything as asked in the documentation but despite everything, i can't display masks.
Many thanks
Did you set this flag to be false when generating the dataset? It would produce different input files which has mask field.
Yes it is false and in record file i see image/object line... I debugged the pet_record_tf. Py and there is mask, path retrieve etc... All ok... But when i launch train nothing happpen with mask. Is there any specifiq command or parameter else the flag in train or eval. Py ? It is working sith only cpu ? I am lost
Could you share the config you are using?
of course:
i made you a zip.
i tested with : mask_rcnn_inception_v2_coco_2018_01_28 (download the model)
i tried the sample dataset with pet. i tried with only one shard (don't know what is the difference between one or several) i tried with faces_only FALSE /YES i tried with data changed :
#nonbackground_indices_x = np.any(mask_np != 2, axis=0) #nonbackground_indices_y = np.any(mask_np != 2, axis=1) nonbackground_indices_x = np.any(mask_np == 1, axis=0) nonbackground_indices_y = np.any(mask_np == 1, axis=1)
i had file masks_train.record generated (1 of 10) and you can see there is mask into
juste one question when we launch the train with model.ckpt => mask_rcnn_inception_v2_coco_2018_01_28 it is from skratch ? why give this directory it is train from skratch or retrain ? i found answer nowhere.
this is the zip you have all files i used (the rest is the tensorflow 1.8.0 with path to slim, research and object detection)
thank you very much i don't know what to do now !
hi,
guy help me on this thread #3913 , and it was missing one configuration in pipeline.config, number_of_stages: 3 very important,now i launch train and from beginning i see the mask so i have other question but i think i will open a new issue
maybe just ask before, how i can change mask color ? and i created outline in yellow, but i see green color and all shape... how i can change this ?
thank you. if you tell me to close ticket i will do it
The issue persist. i do not see the mask_loss in eval tensorboard. and the mask is not the outline/png i have made but a complete green mask on the bounding box...
any idea ?
I am having the same issue where I see the mask just completely covers the whole bounding box. Have you been able to fix it in this time?
hi, in fact i think it does not existe a simly outline, it is segmentation, and outline i never see that in differente examples
Whole box mask typically means that the training just started so the predictor didn't do any job yet. When training for more steps it should become better.
@pkulzc I have trained it for 1500 steps but still no shape in the mask at all. I'm pretty sure I do something wrong. I followed a blog where the mask already shows from step 0. See my screenshot and steps at https://github.com/tensorflow/models/issues/6135
i had same problem after 20000 step on 2 objects with 300 pictures
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.