Niftynet Data augmentation settings - niftynet

I'm using 'NiftyNet' for my project. For data augmentation, in the config file I noticed there are 'rotation_angle', 'scaling_percentage' and 'random_flipping_axes'. I checked the documents but still don't understand what is the proper setting for 'random_flipping_axes': if I want to flip all three axes, shall I use (1,1,1) or (0,1,2)?
Thank you!

It should be
random_flipping_axes=0,1,2
Based on the documentation here:
http://niftynet.readthedocs.io/en/latest/config_spec.html?highlight=random_flipping_axes

Related

How can I correct this error from testing of my mask rcnn model

Please I need solution with correcting and running this code for mask rcnn
As commented by Gtomika, please provide error trace in text format. Also provide more details about the repo where you got the model from and any other information that you think is relevant.
Based on my past experience, I'm pretty sure that you are using Matterplot's mask RCNN and your issue is due to class count mismatch. You are trying to load weight of a model that was trained on a different class count. You should exclude some layers such as 'mrcnn_bbox_fc','mrcnn_class_logits’.
Fix is to change model.load_weights(COCO_MODEL_PATH, by_name=True) to model.load_weights(filepath, by_name=True, exclude=[ "mrcnn_class_logits", "mrcnn_bbox_fc", "mrcnn_bbox", "mrcnn_mask"])
Refer this issue for more information.

how to create a recordio format with the custom dataset

I want to create a recordio format dataset by using the custom images and use it for building a ml model.
Is there any way to create the recordio format?
Try the example shown here.
Empty .lst files are typically the result of not calling on the right directory, or accidentally switching the positions of the arguments being passed in.
Yes, there is. You can use this to convert to .rec, .idx and generate the .lst file. Follow the instructions mentioned in the code and you will be good to go.

NiftyNet 'evaluation' action output is incorrect

I'm trying to use the new 'evaluation' action after inference to generate some metrics for my output. However, the .csv files just show scores of '0' for average_distance and '1' for Jaccard and Dice for each of my data volumes. I can't seem to find any documentation for the evaluation action, so I'm not sure what I'm doing wrong. Also, the --dataset_to_infer=Validation option doesn't seem to work, both inference and evaluation are being applied to all data rather than just the validation set.
Thanks!
For the evaluation issue, we're working on the documentation. The dataset_to_infer option is only tested for the applications in NiftyNet/niftynet/application; applications from the model zoo are not upgraded to support it yet (please file an issue with more details https://github.com/NifTK/NiftyNet/issues if you believe it's a bug).
For the time being, pointing directly to the inference result in the config.ini worked for me.
e.g.
[inferred]
csv_file = model_dir/save_seg_dir/inferred.csv
I believe this file is not found currently and then evaluation defaults to comparing labels to labels. See the issue on GitHub.

What is CvBlobTrackerAuto class in OpenCV?

I am trying to understand blobtrack.cpp code provided as a sample code with OpenCV. In this code class named CvBlobTrackerAuto is used. I tried to find some documentation about this class but it does not provide a detailed explanation.
I am particularly interested in
CvBlobTrackerAuto::Process(IplImage *pImg, IplImage *pMask = NULL) function. What does this do and what is the task of this mask used here?
Thank you in advance
I've been working with CvBlobTrackerAuto in the last few weeks. Here are some of things I have figured out.
CvBlobTrackerAuto::Process is used to process the last captured image in order to update the tracking information (blob ids and positions). Actually, CvBlobTrackerAuto is an abstract class since it doesn't provide an implementation for CvBlobTrackerAuto::Process. The only concrete implementation there is (as far as I can tell) is CvBlobTrackerAuto1, which can be found in blobtrackingauto.cpp.
What CvBlobTrackerAuto1::Process does is to implement the following pipeline:
Foreground detection: this produces a binary mask corresponding to the foreground.
Blob tracking: updates the position of blobs. It may use mean shift, particle filters or a combination of these.
Post processing: (I'm not sure of what this section does).
Blob deletion: it is "experimental and simple" according to a comment in there. It deletes blobs which have been too small or near the image borders in the last frames.
Blob detection: detects new blobs. See enteringblobdetection.cpp.
Trajectory generation: (not sure of what it does).
Track analysis: (not sure of what it does. But I do remember having read the code and deciding that it had no influence on blob tracking, so I disabled it.)
In this particular implementation of CvBlobTrackerAuto::Process, the pMask parameter is used for nothing at all. It has a default value of NULL and it is assigned to a variable once, only to be overwritten some lines later.
The OpenCv sample to be found in samples/c/blobtrack_sample.cpp is built around this CvBlobTrackerAuto1 class, providing different options to each module in the pipeline.
I hope it helps.
I was directed to this link when I posted the same question in OpenCV mailing group. This doc explains OpenCV Blobtracker and its modules.
Hope this helps anyone interested.

add a new Color scheme to the Rad Studio

It's possible modify or change a color scheme (Color SpeedSetting) in the Rad-Studio?
There is an entry in the Windows Registry? or must edit some file?
Thanks in advance.
It doesn't look easy at first glance.
I found the following under then HKCU path:
\HKCU\Software\CodeGear\ETM\12.0\Color
with the following sub-keys
List item
Classic
Default
Ocean
Twilight
Each key has what appear to be color constants but there doesn't appear to be enough constants to make it the right section.
The list of values under each key:
Auto_TranslatedItemColor
EditBackgroundColor
EditForegroundColor IsOEM
Non_editBackgroundColor
Non_editForegroundColor
SelectionBackgroundColor
SelectionForegroundColor
TranslatedItemColor
UntranslatedItemColor UnusedItemColor
That's all I've got, with out spending a lot more time from the looks of it.
It's probably stored in a BPL as a Opentools API object.
Take a look at OP's https://github.com/rruz/delphi-ide-theme-editor, it supplies thousands of themes. Yes, the OP makes one himself.
Thanks for the OP's awesome project.
Thanks for #Nicholas point out this for me.

Resources