How can I use MS COCO test-dev dataset for instance segmentation? - mscoco

Now I'm reproducing the Mask R-CNN(Instance segmentation task.)
I can't figure out how to use the MS COCO test dataset.
There exists 'instances_train2014', 'instances_val2014' which have specific
annotations.
But in testing data, there are only image_id, image_url, image height and width.
I couldn't figure out how to use it at all.
Could anyone figure this out? :(
Sorry for terrible English

The test data is just that, test data. They did not release annotations for it. Instead, you train on the train/val datasets and submit results for the test data to the evaluation server. This ensures a fair comparison between different methods.

So could you tell me how Researcher evaluate mAP of a model, like ssd_mobilenet_v1_coco have COCO mAP[^1] = 21(according to This)? Did they calculate on COCO validation set instead of COCO Test set and record the mAP number?

Related

Using OpenStreetMapX to create a powergrid graph network

I want to find out a few things about OpenStreetMapX which from what I understand works well with transportation-based networks. I am wondering if it's also possible to use this package along with lightgraphs.jl to create a power grid network. In my case, I have filtered some power grid data using osmosis (a piece of software that allows filtering OpenStreetMap data based on a tag)
I want to know whether it is relevant to use OpenStreetMapX for this kind of data (power grid)?
using OpenStreetMapX
# Load power data for Germany
deData = get_map_data("D:/PowerGridNetwork/data/germany/de_power_160718.osm")
# Get roadways (which I believe has the meta data for edges)
deData.roadways
I ended up with metadata for power as well as roads, which I am wondering, how it came in the first place. Since I filtered only the power data.
The next question I have is, does deData.e returns an adjacency list?. Since what I am really after is creating a MetaGraph with nodes and edges with their respective properties.
Any ideas?
Thanks in advance

how do i convert my image data to a format similar to the fashion-MNIST data

I'm new to Machine Learning so please bear with me with my novice question. I'm trying to train a model to recognize benthic foraminifera based on their detailed taxonomy... here is a sample of what foraminifera look like
I've been successful in doing this simply by loading my data using flow_images_from_directory (). However, i don't know how to explore the structure of the object usually generated by flow_images_from_directory. I will like to format my data-set similar to the structure of the Fashion MNIST data. So that it easy to us the modification of the code below. I have some experience with magick package
dataset_fashion_mnist()
c(train_images, train_labels) %<-% fashion_mnist$train
c(test_images, test_labels) %<-% fashion_mnist$test
so that i have something like set which would make it easier for me to understand especially the labeling part. Also, if possible, i want to be able to append other information from CSV file to the data-set. My data is already arranged in folders and sub-folders as follows
data/
train/
ammonia/ ### 102 pictures
ammonia001.tif
ammonia002.tif
...
elphidium/ ### 1024 pictures
elphidium001.jpg
elphidium002.jpg
...
test/
ammonia/ ### 16 pictures
ammonia001.jpg
ammonia002.jpg
...
elphidium/ ### 6 pictures
elphidium.jpg
elphidium.jpg
...
Any help or guide to materials will be highly appreciated.
I'll describe the steps you would go through on a high level.
Assuming you now have a training and testing set, both with all your classes reasonably balanced
load your images and extract the pixel values, normalize the values so they are between 0 and 1
if the images are of different sizes, you should pad them so they are all of the same size
if you are not using a method requiring 2D structure such as a CNN, you should also flatten the pixel values
Associate your images (in pixel form) with your class labels
Now you have a set of images of fixed size in pixel form with their associated class labels. You can then feed this into whatever model you are using
Hope this helps, let me know if you're confused by any part
Side note: from your sample, it looks like your dataset is heavily skewed - lots of elphidium examples but not a lot of ammonia examples. This will probably lead to problems later on. In general, you want a balanced number of examples between your classes.

Implement BidirectionalGridLSTM

I’m implementing a chatbot using Tensorflow’s seq2seq model[1], feeding it with data from the Ubuntu Dialogue Corpus. I want to compare an RNN using standard LSTM cells with Grid LSTM cells described in Kalchbrenner et al [2].
I’m trying to implement the Grid LSTM cell in the translation model described in section 4.4 [2], but I’m struggling with the bidirectional part.
I have tried using BidirectionalGridLSTMCell, but I’m not sure what they mean by num_frequency_block. They do not mention that in the paper. Does anyone know what they mean by num_frequency_block? In the api docs it says:
num_frequecy_blocks: [required] A list of frequency blocks needed to cover the whole input feature splitting defined by start_freqindex_list and end_freqindex_list.
Further, I have tried to create my own cell. First I do the forward processing with the inputs, then I reverse the inputs, and do the backward processing. But when I concatenate these results, the shape changes. E.g. when I try to run the network with a batch size of 32, then i get this error:
ValueError: Dimensions must be equal, but are 64 and 32
How can I concatenate the results without changing the shape? Is that even possible?
Does anyone have any other tips, on how I can implement Bidirectional Grid LSTM?
[1] https://www.tensorflow.org/tutorials/seq2seq/
[2] https://arxiv.org/abs/1507.01526
-tensorflow has bidirectional LSTMs built-in: https://github.com/aymericdamien/TensorFlow-Examples/blob/master/notebooks/3_NeuralNetworks/bidirectional_rnn.ipynb
here's a tutorial for using bidirectional LSTMs for intent matching: https://blog.themusio.com/2016/07/18/musios-intent-classifier-2/
you're missing your second [2] reference link.
is this a helpful baseline, even if they don't provide grids?
may i ask what you are using it for?

Weka Apriori No Large Itemset and Rules Found

I am trying to do apriori association mining with WEKA (i use 3.7) using given database table
So, i exported two columns (orderLineNumber and productCode) and load it into weka, as far as i go, i haven't got any success attempt, always ended with "No large itemsets and rules found!"
Again, i tried to convert the csv into ARFF file first using ARFF Converter and still get the same message;
I also tried using database loader in WEKA, the data loaded just fine but still give the same result;
The filter i've applied in preprocessing is only numericToNominal filter;
What have i wrongly done here, i suspiciously think it was my ARFF format though, thank you
Update
After further trial, i found out that i exported wrong column and i lack 1 filter process, which is "denormalized", i installed the plugin via packet manager and denormalized my data after converting it to nominal first;
I then compared the results with "Supermarket" sample's result; The only difference are my output came with 'f' instead of 't' (like shown below) and the confidence value seems like always 100%;
First of all, OrderLine is the wrong column.
Obviously, the position on the printed bill is not very important.
Secondly, the file format is not appropriate.
You want one line for every order, one column for every possible item in the #data section. To save memory, it may be helpful to use sparse formats (do not forget to set flags appropriately)
Other tools like ELKI can process input formats like this, that may be easier to use (it also was a lot faster than Weka):
apple banana
milk diapers beer
but last I checked, ELKI would "only" find frequent itemsets (the harder part) not compute association rules. I then used a tiny python script to produce actual association rules as desired.

Saving networks and weights fro EncogModel

I was able to create a network, train it and evaluate it using EncogModel. However, i would like to be able to save the network, training and weights, so that every time i run it, i dont have to train it. I found encog persistence, but I'm having a hard time putting encogmodel and percistence together. is there any sample codes available? If not, how could this be done?
Used:
SerializeObject.Save(string path, network);
and
EncogUtility.SaveEGB( FileInfo path , data);
EncogDirectoryPersistance.SaveObject(FileInfo f,network) seemed to not support NEAT, it kept returning an error.

Resources