Open TuanNguyenSKKU opened 4 years ago
Which config file did you use? It looks like it could simply be a mismatch between the small and large model.
Thank you for your response. I have used the default config.py from the Siamese model and used it in the shapesConfig class as below.
`class shapesConfig(siamese_config.Config):
NAME = "shapes" # Override in sub-classes
EXPERIMENT = 'example'
# NUMBER OF GPUs to use. For CPU training, use 1
# GPU_COUNT = 2
IMAGES_PER_GPU = 1
STEPS_PER_EPOCH = 100
NUM_CLASSES = 1 + 3 # For background + my_classes
DETECTION_MIN_CONFIDENCE = 0.9
MASK_SHAPE = [56, 56]
USE_MINI_MASK = False
`
Have you tried using 2 classes (1 + 1)? Because this model is Siamese and uses an example of the class instead of class labels there is just one foreground class that covers the others implicitly.
I have never tried it before. Do you have any solutions for class labels? Because I think someone can also implement this repository with many class labels. Thank you.
Yes that is correct but it would defy the idea of the task and model. If you want to use multiple class labels you should probably use a standard object detection model from a toolbox like mmdetection or detectron2.
Thank you for your suggestions.
sir in Siamese how can we only use two image and pretrain model to detect the output ?.. sir can you make a page to explain every part of code ... i am facing problem understanding it .. i am a beginner to this field
I am slight confused by this thread of discussion, I understand that the network can only output binary labels, but should it be trained that way too (Only bg and instance)? If that's the case if you provide a reference image of people, shouldn't it consider all coco classes it has been trained on as an instance, given that people, apples, bicycles were all trained as the same class?
Hi everyone, I am trying to train the siamese model with a custom dataset (comprises three classes) and I used the trained weight file (mask_rcnn_coco.h5). The dataset_train and the dataset_val are saved as JSON format like the Mask R-CNN repository. But I received the error about the image shapes as below. How I can reshape the image size to fit with this model? Thank you!
This is the code of the training part.
`# Training if name == 'main': dataset_dir = os.path.join(ROOT_DIR, "shapes")
` The error:
ValueError: Dimension 2 in both shapes must be equal, but are 384 and 256. Shapes are [3,3,384,512] and [3,3,256,512]. for 'Assign' (op: 'Assign') with input shapes: [3,3,384,512], [3,3,256,512].