kmnp / fashionpedia-api Goto Github PK
View Code? Open in Web Editor NEWPython API for Fashionpedia Dataset
Home Page: https://fashionpedia.github.io/home
License: BSD 2-Clause "Simplified" License
Python API for Fashionpedia Dataset
Home Page: https://fashionpedia.github.io/home
License: BSD 2-Clause "Simplified" License
Instead of the line below in baseline_predictor_demo.ipynb
detections_str = '{} ({}%)'.format(ontology['categories'][detection_classes[i]]['name'],
int(100*detection_scores[i]))
it should be this for correct class prediction:
detections_str = '{} ({}%)'.format(ontology['categories'][detection_classes[i]-1]['name'],int(100*detection_scores[i]))
And can you please open-source your training code. Lots of enthusiasts have been waiting for this code now. Thanks
Great repository and dataset. But I have some problem reproducing the result.
I trained a Mask-RCNN with detectron2 without using the attribute value of the dataset. The model was trained with mask_rcnn_R_50_FPN_1x.yaml config of detectron2. I only change the learning rate to 1e-3 for the sake of convergence. It seems that the network can predict the bounding box and masks, but it gives a pretty low confidence. This lead to very low mAP(about 7, should be around 30 or 40). My code works fine on deepfashion2 dataset(mAP 69).
It will be helpful if you can share some more detailed configurations about how to achieve the baseline. Thanks !
First of all, thank you for sharing your work! While running the following code modified from the demo, looks like fp.getImgIds() doesn't return the correct combination of images from multiple category ids. The code is as follows:
`import numpy as np
import os
from fashionpedia.fp import Fashionpedia
anno_file = "./data/sample.json"
img_root = "./images"
fp = Fashionpedia(anno_file)
cat_ids = [24]
img_ids = fp.getImgIds(catIds=cat_ids)
print("category ", cat_ids, " has img ids ", img_ids)
cat_ids = [6]
img_ids = fp.getImgIds(catIds=cat_ids)
print("category ", cat_ids, " has img ids ", img_ids)
cat_ids = [10]
img_ids = fp.getImgIds(catIds=cat_ids)
print("category ", cat_ids, " has img ids ", img_ids)
cat_ids = [6, 24]
img_ids = fp.getImgIds(catIds=cat_ids)
print("category ", cat_ids, " has img ids ", img_ids)
cat_ids = [6, 24, 10]
img_ids = fp.getImgIds(catIds=cat_ids)
print("category ", cat_ids, " has img ids ", img_ids)
`
The output is:
category [24] has img ids [9813]
category [6] has img ids [10223]
category [10] has img ids [9813]
category [6, 24] has img ids []
category [6, 24, 10] has img ids []
I think the last two outputs should be [9813, 10223]? Or I'm miss understanding the meaning of getImgIds()?
Thanks
~
Hi
could you let me know if this demo is going to be updated soon?
Hi,
Thanks for your excellent work and It's awesom to have segment ontology annotations.
And what is the the threshold of attributes in the inference?
Thanks.
Hi! Could you please tell me the attribute mask rcnn model using any pre_train such as coco or imagenet?
@KMnP In the file baseline_predictor_demo.ipynb in the last code block there is a comment :
# draw segmentation mask
followed by some code using predicted segmentation masks but the resulting image does not have masks drawn on it. Am i missing something?
I was Not able to run the model using inference_saved_model.py in https://github.com/tensorflow/tpu/tree/master/models/official/detection/projects/fashionpedia
I cant import such as
from utils import box_utils
from utils import input_utils
from utils import mask_utils
from utils.object_detection import visualization_utils
Hi. Thanks for your great job!
When I am trying to check your model with your baseline predictor it cannot detect any shirts. Maybe a problem with training phase?
Since TF object detection api requires 1-based indexing for labels I think the problem may be related to your label map being 0-indexed. Check this out
Dear Yin Cui,
First of all it is Great! to see fashionpedia model ckpts with different backbones and their performances have been shared in: https://github.com/tensorflow/tpu/tree/master/models/official/detection/projects/fashionpedia
However, when I was trying to load a model ckpt "SpineNet-143" using following code:
with tf.Session() as sess:
saver = tf.train.import_meta_graph('./spinenet-143/model.ckpt.meta')
saver.restore(sess,tf.train.latest_checkpoint('./spinenet-143/'))
i was getting following error:
"NotFoundError: Op type not registered 'LegacyParallelInterleaveDatasetV2' in binary running on 7d386b9416f5. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler
should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed."
Could you please look into the issue and let us know as how we can load the model to test inference ?
Also it will be great if we can get frozen model (.pb format) similar to example given in "baseline_predictor_demo.ipynb"
Thanking you!
Regards,
Abhishek
Hi,
Thanks for your excellent work and It's awesom to have segment ontology annotations.
But how should I extract the parent-children relationship from the segmentation annotations?
BTW, do you know if there is another dataset having ontology annotations.
Thanks
Hi @KMnP when will you be open sourcing the code to build the model? Many enthusiasts are waiting for the release. Thank you
The demo worked, but as a newbie I don't know what to do from here.
Hi,
Thanks for your excellent work and It's awesom to have segment ontology annotations.
But the attributes are class-agnostic or class-specfic?
Thanks.
Hi, first of all great work with the new SpineNet 143 model with amazing accuracy. I am facing error while running the fashionpedia project of tensorflow/tpu on colab. This is my notebook.
When I do this inside the file inference.py
import sys
sys.path.insert(0, '/content/tpu/models/official/detection')
the previous error in my notebook goes but then the error comes
from hyperparameters import params_dict
ModuleNotFoundError: No module named 'hyperparameters'
How to import all files properly? please guide.
Thanks @KMnP @richardaecn It would be great if you can time some time to release a colab on how to do inference for beginners.
Hi Thanks for your work!
But I found there are duplicated anno id in annotations and may cause mismatch between anns and imgs when using coco api
Thanks again
Greetings! Great job on constructing such a dataset! Thank you!
But I don't find a way to retrieve the main garment.
Example:
Current:
Segmentation 0:
Category: pocket
Attribtues:
218: patch (pocket)
Segmentation 1:
Category: sleeve
Attribtues:
204: set-in sleeve
205: dropped-shoulder sleeve
159: three quarter (length)
Segmentation 2:
Category: sleeve
Attribtues:
205: dropped-shoulder sleeve
159: three quarter (length)
Segmentation 3:
Category: sock
Segmentation 4:
Category: sock
Segmentation 5:
Category: collar
Attribtues:
163: shirt (collar)
Segmentation 6:
Category: shirt, blouse
Attribtues:
225: single breasted
295: no non-textile material
137: loose (fit)
145: no waistline
115: symmetrical
148: micro (length)
149: mini (length)
316: no special manufacturing technique
317: plain (pattern)
What I want to see:
Segmentation 0:
Category: shirt, blouse
Attribtues:
225: single breasted
295: no non-textile material
137: loose (fit)
145: no waistline
115: symmetrical
148: micro (length)
149: mini (length)
316: no special manufacturing technique
317: plain (pattern)
Segmentation 1:
Category: sock
Segmentation 2:
Category: sock
Is it possible to retrieve information in such a way?
Thank you very match, and fill free to close this issue if you already have it.
@richardaecn kindly share following examples :
It will be very helpful for us to see as how we prepare data and train Attribute Mask RCNN network.
Thank You
there is no code in baseline_predictor_demo.ipynb.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.