models icon indicating copy to clipboard operation
models copied to clipboard

***Test of mask_rcnn_inception_v2_coco***

Open SpiralBeing opened this issue 8 years ago • 13 comments

System information

What is the top-level directory of the model you are using: /home/jesse/gpu-py3/models/research/object_detection Have I written custom code (NO): OS Platform and Distribution (Windows 10): TensorFlow installed from (binary[using pip3): TensorFlow version (1.8.0): Python version: (3.6.5) Bazel version (N/A): GCC/Compiler version (N/A): CUDA/cuDNN version: CUDA 9.0/ CUDDN 7 GPU model and memory: Nvidia GTX 1050/ 2GB Exact command to reproduce: python train.py --logtostderr --train_dir=data/ --pipeline_config_path=data/mask_rcnn_inception_v2_coco.config

When I'm creating tf__pet_record I see mask as and in tutorial (feature_dict["image/object/mask"] bytes_list { value: "\211PNG\r\n\032\n\000\000\000\rIHDR......) (I change also here if not faces_only: # Original is ''if not faces_only'' mask_remapped = (mask_np == 1).astype(np.uint8) ) #==1 (in original !=2) Input image for training mask were png image (png with pixels ==1 or 0, with 3 channels)

I've trained model (during the training process I see that box and mask were training [double step]) but in jupyter notebook I can only observe box in the image without mask.. In jyputer: tensor_dict {'num_detections': <tf.Tensor 'num_detections:0' shape= dtype=float32>, 'detection_boxes': <tf.Tensor 'detection_boxes:0' shape= dtype=float32>, 'detection_scores': <tf.Tensor 'detection_scores:0' shape= dtype=float32>, 'detection_classes': <tf.Tensor 'detection_classes:0' shape= dtype=float32>} Mask isn't here! Must I exact something other additional command except this (python train.py --logtostderr --train_dir=data/ --pipeline_config_path=data/mask_rcnn_inception_v2_coco.config) ?

SpiralBeing avatar Jul 03 '18 16:07 SpiralBeing

Hi @FreedoomFighter , Does your loss for the mask generation is decreasing or constant in tensorboard ? I think you have to provide 1 channel png image for masks, perhaps try to modify your pipe to keep only one channel of your image

victorherbemontagne avatar Jul 04 '18 08:07 victorherbemontagne

Can you paste here your script for create_pet_tf_record please ?

I see that your are following the tutorial on toy example in Medium aren't you? Just checking, did you follow the tutorial proposed by tensorflow in object_detection/g3doc? The tutorial in Medium is not very helpful as nothing is explained and the authors report results that can't be achieved with her code. I reported a bug on the create_pet_record script but all tutorial are pretty good and may help you ( if you didn't already seen them)

Otherwise:

  • Is the mask loss in tensorboard decreasing ?

victorherbemontagne avatar Jul 04 '18 12:07 victorherbemontagne

@victorherbemontagne I can, but maybe I sent it you (mail)?

SpiralBeing avatar Jul 04 '18 12:07 SpiralBeing

It's all what I have. There is not loss of mask, don't it? tf

SpiralBeing avatar Jul 04 '18 13:07 SpiralBeing

Check your config file and be sure that you have the flag use_Mask=true Small advice too, change optimizer for Adam, it converges faster, and for quick fine tuning increment the weights of the mask loss in the config file, helps generate mask quicker during training

victorherbemontagne avatar Jul 04 '18 16:07 victorherbemontagne

@victorherbemontagne I've already solved, thank you for all avdvices. I agree that 'Toy example in Medium' is really unuseful. Good luck you!

SpiralBeing avatar Jul 05 '18 11:07 SpiralBeing

Hi, i have same probleme but could not make it work...

leccyril avatar Jul 13 '18 12:07 leccyril

where add use_mask ?

leccyril avatar Jul 13 '18 12:07 leccyril

Hi @FreedoomFighter, how you solve your problem? How did you create your mask? If numerical, then can you show your code for creating mask and model config?

kulsemig avatar Aug 31 '18 03:08 kulsemig

for me i create with vgg mask outline... then right click and save as PNG... it make a black img with yellow outline.... because i need PNG mask, how to create correclty PNG mask, and then outline segmentation mask ?please help us noboy answer us

leccyril avatar Aug 31 '18 13:08 leccyril

@FreedoomFighter Hi. can you describe the chages you made to your workflow. Im having problems making the correct png files.

JohnSDevs avatar Sep 14 '18 07:09 JohnSDevs

If you want you can check on my repo I forked tensorflow/models, you can just take the script I modified for the add_mask (same position in the folder) Let me know if you have any trouble with it Cheers !

victorherbemontagne avatar Sep 14 '18 08:09 victorherbemontagne

Thx. you have some customised path and file structure that differs from the original Is It create_record.py?

JohnSDevs avatar Sep 14 '18 08:09 JohnSDevs