Comments (13)
This is the mechanism of MXNet. You need to specify a somehow 'maximum' shape before building the computational graph.
Therefore, just change the '100' in those two lines https://github.com/msracver/FCIS/blob/master/fcis/train_end2end.py#L93-L94
to '200' or '500' will solve this warning.
from fcis.
Strange, I did not encounter this issue with my own data. What dataset do you use?
from fcis.
Hi, how to read your own data to anthor's code framework ? Do you turn them into voc(.mat file) or coco(.jsom file) annotation format ?
from fcis.
@xiaxianxiaxian Yes that's what I have done.
from fcis.
@oh233 thank you
@xiaxianxiaxian i convert to mat file
from fcis.
@oneOfThePeople could you share link/instructions how did you create the mat files? I have ground truth of polygon points for each object in my dataset and I want to convert that to be compatible with the pascal voc mat format
from fcis.
i use this code but i'm not sure if its help for any other dataset
from fcis.
@oneOfThePeople could you tell me how to create .geojson files?i tried to use the code,but the .geojson files are needed
from fcis.
its sound complicated way to create geojson and then mat....
but i used gdal library if its help
from fcis.
@ziyu919 what i ended up doing is changing the code to read my own created dataset of serialized numpy arrays for each object category and instance. Way more simpler and does not require any complicated processing.
from fcis.
@ogail is it convenient to share the scripts or part of it ?
from fcis.
Imagine that your labeled data is in form of polygon points, each polygon surrounds an object of interest, here's code I had
def create_pascal_voc_sbd_dataset(raw_learning_examples, out_dir, split_thresh=0.9, split_name='val.txt'):
"""
Creates SBD dataset for training instance segmentation networks. For more info check
http://home.bharathh.info/pubs/codes/SBD/download.html
:param raw_learning_examples: list of learning examples
:param out_dir: the output dataset directory
:param split_thresh: the percentage of the training data. Defaults to use 90% for training.
:param split_name: the name of the non-training output file. Defaults to val.txt file.
"""
# create dataset dir
layout_dir = os.path.join(out_dir, 'ImageSets', 'Main')
images_dir = os.path.join(out_dir, 'img')
inst_dir = os.path.join(out_dir, 'inst')
cls_dir = os.path.join(out_dir, 'cls')
if not os.path.exists(out_dir):
os.makedirs(out_dir)
if not os.path.exists(layout_dir):
os.makedirs(layout_dir)
if not os.path.exists(images_dir):
os.makedirs(images_dir)
if not os.path.exists(inst_dir):
os.makedirs(inst_dir)
if not os.path.exists(cls_dir):
os.makedirs(cls_dir)
# shuffle the provided dataset to avoid construction bias
shuffle(raw_learning_examples)
# create the instance segmentation dataset
train_cutoff = int(len(raw_learning_examples) * split_thresh)
for learning_example_count, (img, xml_file) in enumerate(raw_learning_examples):
print('preparing learning example {}/{}'.format(learning_example_count + 1, len(raw_learning_examples)))
label_filename, detection_objects = parse(xml_file)
filename_prefix = label_filename.split('.')[0]
img_filename = filename_prefix + '.jpg'
w, h = img.size
cls_mask = np.zeros((h, w))
inst_mask = np.zeros((h, w))
for obj_id, obj in enumerate(detection_objects, 1):
x_points = []
y_points = []
for x, y in obj.poly:
x_points.append(x)
y_points.append(y)
# the problem in hand has one class only, hard code it as 1
cls_mask[skipoly(np.array(y_points), np.array(x_points))] = 1
inst_mask[skipoly(np.array(y_points),
np.array(x_points))] = obj_id
if learning_example_count < train_cutoff:
layout_filename = 'train.txt'
else:
layout_filename = split_name
# write the learning example to the proper layout file (train or validation))
with open(os.path.join(layout_dir, layout_filename), 'a') as out_file:
# write the learning example image
out_file.write(filename_prefix + '\n')
img.save(os.path.join(images_dir, img_filename))
# write instance mask to inst folder
np.save(os.path.join(inst_dir, filename_prefix), inst_mask)
# write class mask to inst folder
np.save(os.path.join(cls_dir, filename_prefix), cls_mask)
from fcis.
@ogail thanks
from fcis.
Related Issues (20)
- TypeError: _update_params_on_kvstore() takes exactly 4 arguments (3 given) HOT 1
- there is an error when trained on ResNet-50 model HOT 1
- Index out of bounds error in line 143 of proposal_annotator.py HOT 1
- Some problems encountered when using deconvolution
- mxnet.base.MXNetError: [15:20:32] src/engine/threaded_engine.cc:320: Check failed: device_count_ > 0 (-1 vs. 0) GPU usage requires at least 1 GPU HOT 1
- The result finetune with cityscapes is very poor
- Network structure
- When I train my own coco-like datasets,I successfully train and test the model,but the result of all AP is 0. HOT 5
- If my data is small,such as 6000 images,is it difficult to train the model? HOT 3
- my own data set ,test map is 0
- 有哪位遇到过训练成功,测试map=0的情况吗 HOT 3
- mxnet.base.MXNetError: [16:31:18] src/operator/nn/./cudnn/cudnn_convolution-inl.h:449: Check failed: e == CUDNN_STATUS_SUCCESS (3 vs. 0) cuDNN: CUDNN_STATUS_BAD_PARAM HOT 1
- pip install -r requirements.txt HOT 3
- unable to install ./init.sh error HOT 3
- Problems when launching demo.py
- Is it possible to run FCIS on AMD?
- Trouble building on Windows 10 (TypeError: expected str, bytes or os.PathLike object, not NoneType) HOT 2
- In-depth guide to getting FCIS working on Windows 10 HOT 3
- [HELP] problem with cpu_nms HOT 1
- Result file for COCO test-dev instance segmentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fcis.