Comments (3)
After several days I have been successfully reproduce the result! Here is my attempt. The code is using python3 and contains FCN training code (use torchvision) and also object detection module (using detectron2). Thank you again for the authors' great work!
from syndata-generation.
An update, so I have trained Detectron2 faster rcnn (pretrained on COCO), and the result are quite low
I think I kept the original parameters, and my config is below
class Trainer(DefaultTrainer):
@classmethod
def build_evaluator(cls, cfg, dataset_name):
return COCOEvaluator("synthetic_train", output_dir=os.path.join(cfg.OUTPUT_DIR, "eval", dataset_name))
with open(cutpasted_dir / "label2id.json") as f:
label2id = json.load(f)
from PIL import ImageFile, Image
ImageFile.LOAD_TRUNCATED_IMAGES = True
register_coco_instances("synthetic_train", metadata=label2id, json_file=str(cutpasted_dir / "COCO.json"), image_root=str(cutpasted_dir / "images"))
register_coco_instances("kitchen_test", metadata={}, json_file=str(data_dir / "Kitchen_fold1_COCO.json"), image_root="")
cfg = get_cfg()
cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml"))
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # set threshold for this model
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")
cfg.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = 256
cfg.MODEL.ROI_HEADS.NUM_CLASSES = len(label2id)
cfg.DATASETS.TRAIN = ("synthetic_train",)
cfg.DATASETS.TEST = ("synthetic_train", )
cfg.DATALOADER.NUM_WORKERS = 10
cfg.TEST.EVAL_PERIOD = 5000
cfg.SEED = 42
cfg.SOLVER.IMS_PER_BATCH = 4
cfg.SOLVER.BASE_LR = 0.001
cfg.SOLVER.MAX_ITER = 25000
cfg.SOLVER.STEPS = (15000, )
cfg.SOLVER.WEIGHT_DECAY = 0.0005
os.makedirs(cfg.OUTPUT_DIR, exist_ok=True)
trainer = Trainer(cfg)
trainer.resume_or_load(resume=False)
trainer.train()
what did I miss here? Thank you!
from syndata-generation.
@cnut1648 any chance you still have that code lying around? Getting a 404 :)
from syndata-generation.
Related Issues (18)
- could you please share some example training data and folders? HOT 1
- Error when running with defaults. HOT 7
- "distractor_files" variable referenced before assignment HOT 1
- ## local variable 'attempt' referenced before assignment HOT 5
- How did you get the .pbm pictures? HOT 2
- 3D Rotation HOT 1
- Error in line 451. unbound local error HOT 2
- create_mask function is not defined HOT 3
- mask process HOT 8
- ".pbm" and "Foreground/Background segmentation:" HOT 4
- error discription
- Do you mean the masks like "NP123.pbm" in demo_data_dir/robjects_dir/honey_bunches ?
- what is the dataset Type? HOT 3
- background images HOT 2
- Applicability of code in 2D images and backgrounds
- Only uses one background at a time
- Demo Data Directory Structure
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 syndata-generation.