Giter Club home page Giter Club logo

Comments (14)

drewbo avatar drewbo commented on September 25, 2024

Yes, you can specify the geojson parameter and skip the label-maker download step

from label-maker.

shubham-scisar avatar shubham-scisar commented on September 25, 2024

I am trying to create labels but unfortunately it is not able to find the path,I have checked the path there is no issue with path.

(base) C:\Users\SHUBHAM>label-maker labels --dest U:\new_pune\pune_1 --config U:\pune_config.json
Traceback (most recent call last):
  File "C:\Users\SHUBHAM\Anaconda3\Scripts\label-maker-script.py", line 9, in <module>
    sys.exit(cli())
  File "C:\Users\SHUBHAM\Anaconda3\lib\site-packages\label_maker\main.py", line 104, in cli
    make_labels(dest_folder=dest_folder, sparse=sparse, **config)
  File "C:\Users\SHUBHAM\Anaconda3\lib\site-packages\label_maker\label.py", line 84, in make_labels
    mbtiles_file_zoomed, filtered_geo])
  File "C:\Users\SHUBHAM\Anaconda3\lib\subprocess.py", line 488, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\SHUBHAM\Anaconda3\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "C:\Users\SHUBHAM\Anaconda3\lib\subprocess.py", line 1207, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

This is my json file :

{
  "country": "india",
  "bounding_box": [1.09725, 6.05520, 1.34582, 6.30915],
  "geojson":"E:\\pune_corp\\labels.geojson",
  "zoom":19,
  "classes": [{ "name": "schools","filter":["has"]}],
  "imagery": "E:\\part1_cog.tif",
  "background_ratio": 1,
  "ml_type": "object-detection"
}

from label-maker.

drewbo avatar drewbo commented on September 25, 2024

@shubhamsharma1609 can you try the paths with single slashes (rather than double)?

from label-maker.

shubham-scisar avatar shubham-scisar commented on September 25, 2024

Tried but Getting this error :

Traceback (most recent call last):
  File "C:\Users\SHUBHAM\Anaconda3\Scripts\label-maker-script.py", line 9, in <module>
    sys.exit(cli())
  File "C:\Users\SHUBHAM\Anaconda3\lib\site-packages\label_maker\main.py", line 73, in cli
    config = json.load(open(args.get('config')))
  File "C:\Users\SHUBHAM\Anaconda3\lib\json\__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "C:\Users\SHUBHAM\Anaconda3\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "C:\Users\SHUBHAM\Anaconda3\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\SHUBHAM\Anaconda3\lib\json\decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 4 column 16 (char 95)

Invalid escape.

from label-maker.

drewbo avatar drewbo commented on September 25, 2024

@shubhamsharma1609 unfortunately I don't have access to a Windows machine to debug this. Can you check anything related to not finding the path (file permissions, file name, spaces, case, etc)?

from label-maker.

shubham-scisar avatar shubham-scisar commented on September 25, 2024

I am checking that.Also, I am utilising the geojson file having mutlipolygon but as per the documentation it is mentioned that only polygon should be there. Can you please guide how I can package this as .npz for creation of npz file as per label maker or any other approach ?

from label-maker.

drewbo avatar drewbo commented on September 25, 2024

@shubhamsharma1609 you can convert the MultiPolygon into a FeatureCollection of Polygons

from label-maker.

shubham-scisar avatar shubham-scisar commented on September 25, 2024

I am running in linux and getting the following error. Even when the geojson(containing feature collection) is supplied at the right path now it is giving bounding box error.Whereas in the documentation it is given as that the bounding box and country will be overridden by the geojson. If we can label every geotiff file with custom labels,this will prove to be very powerful.Please help.

(env) abc@linux:~/Downloads$ label-maker labels --config pune_config.json
Determining labels for each tile
Traceback (most recent call last):
  File "/home/abc/miniconda3/envs/env/bin/label-maker", line 10, in <module>
    sys.exit(cli())
  File "/home/abc/miniconda3/envs/env/lib/python3.8/site-packages/label_maker/main.py", line 104, in cli
    make_labels(dest_folder=dest_folder, sparse=sparse, **config)
  File "/home/abc/miniconda3/envs/env/lib/python3.8/site-packages/label_maker/label.py", line 89, in make_labels
    tilereduce(dict(zoom=zoom, source=mbtiles_to_reduce, bbox=bounding_box,
  File "/home/abc/miniconda3/envs/env/lib/python3.8/site-packages/tilepie/__init__.py", line 21, in tilereduce
    tiles = tm.tileslist(bbox=options.get('bbox'), zoomlevels=[zoom])
  File "/home/abc/miniconda3/envs/env/lib/python3.8/site-packages/tilepie/reader.py", line 68, in tileslist
    return proj.tileslist(bbox)
  File "/home/abc/miniconda3/envs/env/lib/python3.8/site-packages/tilepie/proj.py", line 106, in tileslist
    raise InvalidCoverageError(_("Wrong format of bounding box."))
tilepie.proj.InvalidCoverageError: Wrong format of bounding box.

from label-maker.

drewbo avatar drewbo commented on September 25, 2024

which version of label-maker are you using?

from label-maker.

shubham-scisar avatar shubham-scisar commented on September 25, 2024

label-maker 0.8.0. Also,my geojson is a feature collection only.

from label-maker.

drewbo avatar drewbo commented on September 25, 2024

If you have non-polygon features, you'll need to update to 0.9.0 (just released)

from label-maker.

shubham-scisar avatar shubham-scisar commented on September 25, 2024

The geojson consists of multi polygons in the form of feature collection.

from label-maker.

shubham-scisar avatar shubham-scisar commented on September 25, 2024

The geojson file which I have is created from the groundwork tool from azavea and I am using the same geojson file to create labelled dataset https://github.com/developmentseed/label-maker/issues/32 and I am unable to generate custom labels for the local file.

from label-maker.

drewbo avatar drewbo commented on September 25, 2024

Can you upgrade to 0.9.0 and show me the geojson file + config.json?

from label-maker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.