Giter Site home page Giter Site logo

image-augmentation-examples-for-machine-learning's People

Contributors

edjeelectronics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

image-augmentation-examples-for-machine-learning's Issues

UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 15: character maps to <undefined>

Hello,
First of all, Thanks for your code.
I got this error when try to run the code.

File "C:\Users\user\Documents\Coding\TFODCourse\withaugem.py", line 184, in <module> imgW_xml, imgH_xml, objects = read_annotation_data(xml_fn) File "C:\Users\user\Documents\Coding\TFODCourse\withaugem.py", line 70, in read_annotation_data tree = ET.parse(file) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\xml\etree\ElementTree.py", line 1229, in parse tree.parse(source, parser) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\xml\etree\ElementTree.py", line 580, in parse self._root = parser._parse_whole(source) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 15: character maps to <undefined>

I already tried to set a encoding when open the file but I got this error.

File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\xml\etree\ElementTree.py", line 580, in parse self._root = parser._parse_whole(source) xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 4

Thank you.

PD: This is my xml file.

<annotation>
	<folder>test</folder>
	<filename>CA00001.jpg</filename>
	<path>CA00001.jpg</path>
	<source>
		<database>Unknown</database>
	</source>
	<size>
		<width>832</width>
		<height>1096</height>
		<depth>3</depth>
	</size>
	<segmented>0</segmented>
	<object>
		<name>danger</name>
		<pose>Unspecified</pose>
		<truncated>0</truncated>
		<difficult>0</difficult>
		<bndbox>
			<xmin>427</xmin>
			<ymin>204</ymin>
			<xmax>828</xmax>
			<ymax>349</ymax>
		</bndbox>
	</object>
	<object>
		<name>gun</name>
		<pose>Unspecified</pose>
		<truncated>0</truncated>
		<difficult>0</difficult>
		<bndbox>
			<xmin>671</xmin>
			<ymin>209</ymin>
			<xmax>829</xmax>
			<ymax>323</ymax>
		</bndbox>
	</object>
</annotation>

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.