try to train a new dataset by extracting classes from the coco dataset (yolov5) - dataset

i try to train a new dataset by extracting three classes (backpack, handbag, suitcase) from the coco dataset using yolov5(number of images 3800).
Even though the coco pretrained model was used, the mAP value did not exceed 0.4. (yolov5_s,m,l) What should I do to get a good result value?

Related

Can I train object segmentation using RLE for individual objects(COCO dataset format and YOLACT)

I want to train Yolact, I have generated mask images for my data. My question is can I use RLE to define the segmentation for all my individual objects since in every image every object is there exactly once.
Any suggestion will be appreciated.

How to create Datasets Like MNIST in Pytorch?

I have looked Pytorch source code of MNIST dataset but it seems to read numpy array directly from binaries.
How can I just create train_data and train_labels like it? I have already prepared images and txt with labels.
I have learned how to read image and label and write get_item and len, what really confused me is how to make train_data and train_labels, which is torch.Tensor. I tried to arrange them into python lists and convert to torch.Tensor but failed:
for index in range(0,len(self.files)):
fn, label = self.files[index]
img = self.loader(fn)
if self.transform is not None:
img = self.transform(img)
train_data.append(img)
self.train_data = torch.tensor(train_data)
ValueError: only one element tensors can be converted to Python scalars
There are two ways to go. First, the manual. Torchvision.datasets states the following:
datasets are subclasses of torch.utils.data.Dataset i.e, they have __getitem__ and __len__ methods implemented. Hence, they can all be passed to a torch.utils.data.DataLoader which can load multiple samples parallelly using torch.multiprocessing workers.
So you can just implement your own class which scans for all the images and labels, keeps a list of their paths (so that you don't have to keep them in RAM) and has the __getitem__ method which given index i reads the i-th file, its label and returns them. This minimal interface is enough to work with the parallel dataloader in torch.utils.data.
Secondly, if your data directory can be rearranged into either structure, you can use DatasetFolder and ImageFolder pre-built loaders. This will save you some coding and automatically provide support for data augumentation routines from torchvision.transforms.

logistic regression always predict the same value when the nework are deeper

im using darknet to train a logistic regresion model. but it always output the same prediction for different input image.
but when i remove some convolutional layers , it seems to become normal.(different output for different input images)
the model cfg file is as follows:
[net]
some parameter...
[convolutions]
[convolutions]
[shortcut]
...
[avgpool]
[connected]
batch_normalize=1
output=1
activation=linear
[logistic]
i tryed different learning rate, momentum. not work.
and the trainging data is ballanced. two class, 15000images for each class.
any advices?
thanks.

populate an array from dataset

Hi can anyone provide me with a simple example (or point me in the direction of an example) of how to fill an array with a specific column from a dataset within VB.NET?
I'm having a hard time finding documentation on the controls of a dataset within VB.
here is documentation on the dataset class: http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx
you can access a dataset which is strongly typed with:
dataSetName.dataTableName(rowIndex).ColumnName
if your dataset isn't strongly typed then you can use:
dataSetName.tables("tableName").Rows(rowIndex).Item(columnIndex)

Sorting dicom dataset in Matlab

Hi have about 5000 2d images from multiple CT-scans and need to get them sorted. The dataset is directly imported from a GE workstation.
Right now the images are in bunches of about 10 sorted images at a time in some random order.
How could we get these images sorted? If you would suggest dicominfo please tell us exactly which parameter to go after.
Thank you!
How the DICOM CT images should be sorted is ultimately dependent on the usage context, but as a rule of thumb I would recommend that you first group the images based on (patient), study and series using these tags:
(0010,0020) Patient ID
(0020,000D) Study Instance UID
(0020,000E) Series Instance UID
To sort the images within one series, you could use the Instance Number (0020,0013), although there is no guarantee that this value is set since it is a type 2 attribute.
Another alternative is to use the Image Position (Patient) (0020,0032), which is mandatory in CT images. You would need to check the Image Orientation (Patient) (0020,0037) to decide how to sort on position. Often CT image orientation is (1,0,0), (0,1,0), and then the Z (third) component of the image position can be used as the basis for sorting.
If the series also contains a localizer image, this image would have to be excluded from positional sorting.

Resources